Modern mobile threats are becoming more sophisticated, turning your Androidsmartphone into a source of constant advertising or a tool for data theft. The situation when malware blocks access to settings or prevents itself from being removed using standard methods is becoming more and more common. In such cases, connecting to a personal computer becomes the only effective way to bring the device back to life.
Using a PC allows access to system file system partitions and diagnostic tools that are inaccessible from the screen of the phone itself. You get the opportunity to force delete infected application files, clear the cache, or perform a hard reset without using the touch screen. It is important to understand that the process requires care, since working with system directories carries certain risks.
In this article we will examine in detail several proven methods of fighting viruses, ranging from simple antivirus scanning to using the command line. ADB. We will look at both software and hardware methods for isolating threats so that you can choose the best option for your device model.
Preparing equipment and enabling debugging
The first step is to correctly configure the interaction between your phone and computer. Without activating a special debugging mode, the PC simply will not see your device as an object for management, but will only use it as a flash drive. First, check the USB cable: it should be in good working order and provide not only charging, but also data transfer.
Go to the settings of your gadget and find the section About phone. Click seven times in a row on the item Build numberto unlock the menu for developers. After this, a new item will appear in the main settings menu For developers, where you need to activate the switch USB debugging.
When connecting the cable to the computer, a request for permission to debug from this computer will appear on the smartphone screen. Be sure to confirm the action by checking the “Always allow from this computer” checkbox. If the screen is locked by a ransomware virus, you will have to skip this step and move on to safe mode methods.
⚠️ Attention: Never enable USB debugging on other people's or public computers. This mode gives full access to the file system, which can lead to leakage of personal data.
ADB (Android Debug Bridge) is a universal command line tool that allows you to manage your device. Make sure that the appropriate drivers for your phone model are installed on your PC, otherwise the system will not recognize the connection correctly.
Diagnostics and removal through anti-virus scanners
The simplest, but not always effective method is to use anti-virus software on the computer. Many modern security solutions, such as Kaspersky, Dr.Web or ESET, can scan connected mobile devices. This method is suitable for removing Trojans that have not yet received superuser rights.
Connect your phone in file transfer mode (MTP) and run a deep scan in your antivirus. The app will check the internal memory and card SD for known signatures of malicious code. If the virus is located in a folder Download or has a standard structure, it will be detected and quarantined.
However, it is worth considering that advanced viruses can masquerade as system processes or hide in protected sections where a regular file manager and antivirus do not have access. In this case, the scan will show zero threat, although the problem will remain.
- 🔍 Update the antivirus signature databases before starting the scan for maximum efficiency.
- ⚙️ Select the “Full scan” mode rather than a quick scan to cover all memory sectors.
- 📂 Check the memory card separately, by disconnecting it from the phone and connecting it through the card reader to the PC.
If the antivirus on the PC does not see the phone, try changing the connection mode from “Charging only” to “File transfer” in the Android notification curtain.
For complex cases when a virus blocks the installation of applications or the operation of the system, deeper intervention through console utilities will be required.
Using ADB to forcefully delete applications
The tool ADB allows you to delete applications even in cases where the “Delete” button in the phone settings is inactive. This is a powerful method that requires working with the Windows or Linux command line. First you need to download Platform Tools from the official website of Android developers and unpack them into a convenient folder.
Open the command line in the folder with the utility and enter the command adb devices. If everything is configured correctly, you will see the serial number of your device. The next step is to obtain a list of all installed packages using the command adb shell pm list packages. You need to find the name of the virus package, which is often different from the name of the desktop icon.
adb shell pm uninstall -k --user 0 com.name.virus.package
This command will forcefully remove the specified application for the current user. Be extremely careful: removing a system package may cause your phone to become unbootable. Always check the package name on the Internet before entering the command.
⚠️ Attention: Do not remove packages whose names contain the wordscom.android,com.googleorcom.samsungunless you know exactly their purpose. This may “brick” the device.
☑️ Check before deleting via ADB
If the virus keeps coming back after removal, it may have device administrator rights. In this case, you first need to revoke the rights through the command adb shell dpm remove-active-admin, specifying the virus component.
Removing viruses through safe mode
Safe mode (Safe Mode) loads the operating system only with pre-installed applications, disabling all third-party software. This is an ideal way to remove a virus that is interfering with the normal operation of your phone. On most devices, to enter this mode, you need to hold down the power button and then long-press the “Power off” option on the screen.
In safe mode, third-party application icons become translucent or are marked with an icon. You can safely go to the settings, find the infected application and delete it in the standard way. After rebooting in normal mode, the phone should work correctly.
If the virus blocks entry to the menu or intercepts button presses, try entering safe mode using the volume buttons when you turn on the phone. The combination depends on the model: usually this is holding down the volume down button while the logo appears.
| Entry method | Actions | Efficiency |
|---|---|---|
| Through the menu | Hold "Mute" on screen | High (if the screen is working) |
| Buttons | Volume down when loading | Medium (depending on the model) |
| Via ADB | Command adb reboot safe_mode |
Maximum (requires a PC) |
What to do if safe mode does not turn on?
Try to remove the SIM card and memory card before turning it on. Sometimes malicious code is launched from an external drive.
After successfully removing the malware, be sure to reboot the device in the usual way so that all services start normally.
Full reset of settings (Hard Reset) as a last resort
If none of the software methods helped, there remains a radical solution - a full reset to factory settings. This procedure will delete absolutely all data from the internal memory, including photos, contacts and applications, but is guaranteed to clear the system of any software debris.
You can perform a reset through the Recovery menu. To do this, turn off the phone and hold down the combination of buttons (most often Volume up + Power). In the menu that appears, use the volume buttons to select the item Wipe data/factory reset and confirm the action with the power button.
Remember that after this procedure the phone will be like new. You will have to set up your account again Google and install applications. It is critically important to save important data to your computer or cloud storage before resetting, if technically possible.
⚠️ Attention: Make sure you remember the login and password for your Google account. After the reset, protection FRP (Factory Reset Protection) will work, and without account data you will not be able to activate the phone.
Hard Reset removes viruses in 99% of cases, but permanently erases user data. This is the last chance method.
Sometimes viruses are written to the partition recovery, but this is rare for ordinary users and is more common on devices with root access.
Prevention and protection against re-infection
After successfully cleaning the device, it is important to take measures to prevent the situation from repeated. The main reason for infection is the installation of applications from unverified sources. Try to download software only from the official store Google Play, where applications are moderated.
Regularly update the operating system and installed applications. Developers release security patches that close vulnerabilities that hackers exploit. Enable the function Google Play Protection in the application store settings for automatic scanning.
Do not follow suspicious links from SMS or instant messengers that promise winnings or require an urgent update of the banking application. Fraudsters often use social engineering to force the user to install a virus themselves.
- 🛡️ Install a reliable antivirus with web protection to block dangerous sites.
- 🚫 Prohibit the installation of applications from unknown sources in the security settings.
- 👀 Carefully read the permissions that requests the application during installation.
The security of your device depends primarily on your digital hygiene and caution when working with the Internet.
Is it possible to remove a virus if the phone does not turn on?
If the phone does not turn on at all, try entering Recovery mode and resetting the settings. If this is not possible, you will need to flash the device through a computer using special software (for example, Odin for Samsung or SP Flash Tool for MediaTek).
Will resetting the settings remove the virus from the memory card?
No, a standard reset affects only the internal memory of the phone. The virus will remain on the microSD card. The card needs to be formatted via a computer or in the phone storage settings after cleaning the system.
Is it dangerous to connect an infected phone to a PC?
The risk of infecting your computer is minimal if you have a modern antivirus installed and do not run executable files (.apk, .exe) directly from the phone. It is recommended to scan your phone immediately after connecting.
What is ADB and why do you need it?
ADB (Android Debug Bridge) is a developer tool that allows you to control your device via a computer. It is indispensable for removing system applications and viruses that cannot be removed in the usual way.