When malware infects your Mac, iPhone, or Android device, you might consider a factory reset to wipe the virus from existence. While the method can be effective, you'll also lose all of your important information. Even if you back up your data, you'll need to ensure that the backup is free from infection.