Many factors determine the overall security of a phone, its operating system being one of them. While Google provides several defensive systems that protect an Android smartphone against viruses and malware, Android is not entirely virus-proof, mainly because it runs on open-source code. Therefore, the source code of Android is freely available for app developers and hackers, which makes it easy to design an app for evil use. In contrast, Apple’s iOS is a closed-source operating system, which makes it less prone to malware. However, cases of iOS vulnerabilities being exploited by bad actors are also on the rise.
Apart from open source code, Android also allows you to download and install third-party apps and APKs outside of the Google Play Store, which makes it more vulnerable to viruses. When you browse the Internet on any given day, you are likely to find an array of illegitimate links and advertisements offering downloads and installations of video games, songs or apps. Although the links that redirect you to Google Play Store are safe, those that look suspicious might come from malicious third-party developers. Additionally, several smartphone manufacturers are adding a custom UI on top of stock Android, which makes it difficult for Google to provide the most secure version of the operating system (via Avast). If you are downloading files from Google Play Store, you should stay away from any viruses or malware, but just in case, having an extra layer of security is always helpful.