USB debugging USB on Android via a computer is a powerful tool that provides access to the hidden functions of a smartphone, allows you to install custom firmware, restore data after failures, and even unlock the device in some cases. Without this mode, it is impossible to use ADB (Android Debug Bridge), Fastboot or specialized utilities like Odin for Samsung or SP Flash Tool for Mediatek. However, many users encounter problems: the computer does not see the phone, the drivers are not installed, and the developer menu does not have the required item.
In this article we will analyze the entire process from switching on USB debugging to setting up ADB on a PC, and also consider common errors and how to resolve them. The instructions are valid for all versions Android (from Android 5.0 Lollipop to Android 15) and works on devices Samsung, Xiaomi, Google Pixel, OnePlus and other brands. If you plan to flash a smartphone, restore data or test applications, this material will help you avoid common mistakes.
What is USB debugging and why do you need it
Mode USB debugging (USB Debugging) is a special function Androidthat allows the device to interact with a computer at a low level via a protocol ADB. Without it, most operations to control a smartphone from a PC are simply impossible.
Main use cases:
- ๐ง Installing custom firmware (LineageOS, Pixel Experience) via
Fastbootor TWRP. - ๐ฑ Data recovery after a reset or broken screen (using
ADB pull). - ๐ Testing and debugging applications in Android Studio.
- ๐ Unlocking the bootloader (Bootloader) on devices Google, Xiaomi, OnePlus.
- ๐ก Transferring files bypassing the standard MTP-protocol (for example, with a damaged file system).
It is important to understand that enabling USB debugging opens potential vulnerabilitiesIf you connect your smartphone to an untrusted computer, an attacker can gain access to personal data, install malware, or even install malware. steal accounts. Therefore, after completing the work, it is recommended to disable this mode.
โ ๏ธ Attention: On some devices (for example, Xiaomi or HuaweiUSB debugging is automatically disabled after a reboot. This is a security measure, but it can be bypassed by installing it. flagpersist.adb.tcp.port=5555viaADB.
Preparing the smartphone: how to enable developer mode and USB debugging
Before connecting the phone to the computer, you need to activate the hidden menu "For developers"** and enable it debugging. The process differs slightly depending on the version Android and the manufacturer, but the general scheme is the same.
Instructions for most devices:
- Open
Settings โ About phone(orAbout tablet). - Find item
Build number(at Samsung โSoftware information โ Number assembly). - Tap on it 7 times in a row. After this, a notification โYou have become a developer!โ will appear.
- Return to the main menu
Settings- a new section will appear thereFor developers(sometimes it is hidden inAdvanced). - Turn on the switch
USB debuggingand confirm the action.
On some devices (for example, Xiaomi s MIUI or Oppo s ColorOSs) may require additional configuration:
- ๐ Allow OEM unlocking (necessary for firmware).
- ๐ Enable
default USB configuration(selectFile transferorPTP). - ๐ก๏ธ Disable
MIUI protection(on Xiaomi) if it blocks connection.
โ ๏ธ Attention: On Samsung s One UI 5.0+ after enabling debugging, you may need to confirm the permission on the computer through a pop-up window on the phone. If the window does not appear, check the cable or USB port - they may be faulty.
Installing drivers and setting up ADB on a computer
For the computer to recognize your smartphone in debugging mode, you need to install drivers and configure ADB. Without this, even with debugging enabled, the device may not be detected or may not work correctly.
List of required software:
- ๐ฅ๏ธ ADB and Fastboot (part Android SDK Platform Tools).
- ๐ Drivers for your device (universal or from the manufacturer).
- ๐ Cable USB Type-C/Micro-USB (preferably original).
Step-by-step guide:
- Download Platform Tools:
- Official page: developer.android.com.
- Extract the archive into a folder (for example,
C:\platform-tools).
- Install drivers:
- Suitable for most devices Google USB Driver (included Android SDK).
- For Samsung download Samsung USB Driver from the official website.
- For Mediatek you may need VCOM Driver.
- Use
USB 2.0port (on some PCsUSB 3.0causes problems). - Select mode
File transfer (MTP)orPTP. - Check the connection:
adb devicesIf the device is displayed, everything is configured correctly. If not, reinstall the drivers or try a different cable.
- Connect the phone to the PC and check if it is detected:
adb devicesIf the device is visible, proceed to the next step.
- Try rebooting into
Recovery:adb reboot recoveryIf that works, perform a reset via TWRP or stock recovery.
- If the screen doesn't work but the phone is on, you can try to copy important data:
adb pull /sdcard/ C:\backup\ - For unlocked devices With the bootloader you can flash the stock firmware via
Fastboot:fastboot flash system system.imgfastboot flash boot boot.img
| Manufacturer | Required drivers | Download link |
|---|---|---|
| Google Pixel, OnePlus, Nokia | Google USB Driver | Included in Android SDK |
| Samsung | Samsung USB Driver for Mobile Phones | Official website Samsung |
| Xiaomi, Redmi, POCO | Mi PC Suite or Qualcomm Driver | en.miui.com |
| Huawei, Honor | HiSuite | Official website Huawei |
| Mediatek (MTK chips) | VCOM Driver + SP Flash Tool | Forum XDA Developers |
If adb devices shows unauthorized, check the phone screen - a window should appear asking for debugging permission. If it is not there, reconnect the cable or reboot the device.
Basic ADB commands for debugging and diagnostics
After successful connection, you can use ADB to control your smartphone. Here are the most useful commands:
Basic commands:
adb devices # Show connected devicesadb shell # Open a shell on the device
adb reboot # Reboot the phone
adb reboot bootloader # Reboot to Fastboot mode
adb reboot recovery # Reboot to Recovery
Working with files:
adb pull /sdcard/DCIM/ . # Copy photos to PCadb push file.txt /sdcard/ # Download file to phone
adb shell ls /sdcard/ # View folder contents
Debugging and logs:
adb logcat # View system logs in real timeadb logcat -d > log.txt # Save logs to file
adb shell dumpsys battery # Show battery status
Manage applications:
adb shell pm list packages # List all installed ones applicationsadb uninstall com.example.app # Uninstall application
adb install app.apk # Install APK
To work with Fastboot (for example, to unlock the bootloader) use:
fastboot devices # Checking connection in Fastboot
fastboot oem unlock # Unlock Bootloader (DANGER!)
โ ๏ธ Attention: Command fastboot oem unlock will completely reset all data on the device and may lead to loss of warranty. On some devices (for example, Xiaomi) you must first link your account Mi.
Is the manufacturer's account linked (for Xiaomi/Huawei)?
Has a backup of important information been made? data?
Is the phone at least 50% charged?
Are the correct drivers installed on the PC?
-->
Typical errors and their solutions
Even with proper configuration, problems may arise. Here are the most common errors and how to resolve them:
| Error | Cause | Solution |
|---|---|---|
device unauthorized |
Debug permission not confirmed | Reconnect the cable and confirm the request for phone |
no devices/emulators found |
The drivers are not installed or the cable is faulty | Reinstall the drivers, try a different port/cable |
adb: error: failed to get feature set |
Outdated version of ADB | Update Platform Tools to the latest version |
The phone is not detected in Fastboot |
The bootloader is not unlocked | Perform fastboot oem unlock (data reset!) |
E: failed to mount /system |
Write protection to the system partition | Use Magisk or custom Recovery |
If the device is detected as Qualcomm HS-USB QDLoader 9008, this means that the phone is in EDL (Emergency Download Mode). In this case, specialized software will be required for recovery (for example, QFil for Qualcomm or SP Flash Tool for Mediatek).
On devices with Android 11+ an error may appear adb: error: closed when you try get rootaccess. This is due to the tightening of the security policy. The solution is to use Magisk to temporarily obtain superuser rights.
What to do if the phone does not turn on, but is detected in ADB?
If the device does not respond to the power button, but is visible in adb devices, try the commands:
adb reboot recovery # Reboot into Recovery
adb shell input keyevent 26 # Simulate pressing the power button
If the screen is black, but the phone makes sounds when connecting USB, there may be a problem in the display or cable.
USB debugging without access to the screen (if the phone does not turn on)
The situation when the smartphone does not respond to pressing, but is detected by the computer, occurs after unsuccessful firmware or crashes. In this case, ADB may be the only recovery method.
Action algorithm:
On some devices (for example, Samsung s Exynos) you can use the Download Mode mode (press Vol Down + Power) to flash the firmware via Odin even without the home screen.
โ ๏ธ Attention: If the phone is not detected either inADBor inFastboot, but the computer makes a connection sound, try holding the buttonsVol Up + Powerfor 10-15 seconds. On some models, this forces the device to reboot intoFastboot.
Security: how to protect data when debugging via USB
USB debugging provides great opportunities, but also creates risks. Here's how to minimize threats:
- ๐ Always disable debugging after completion of work (in the menu
For developers). - ๐ซ Do not connect the phone to public computers (in cafes, airports, universities).
- ๐ Regularly change your Google account passwordif used
ADBon untrusted PCs. - ๐ฑ Set bootloader lock after flashing (command
fastboot oem lock). - ๐ก๏ธ Use data encryption (included in
Settings โ Security). - Reset all settings (
Settings โ System โ Reset). - Remove all unknown devices from trusted in your Google account (myaccount.google.com/devices).
- Check for unfamiliar applications in
Settings โ Applications. - Reinstall the drivers (use Zadig for forced installation
libusborWinUSB). - Try another USB cable (preferably the original one).
- Connect the phone to a different port (preferably
USB 2.0). - Run the command
adb kill-server, and thenadb start-server. - Check whether your antivirus or firewall is blocking debugging.
- Reset via Recovery (data loss).
- Using the function Find My Device from Google (if synchronization is enabled).
- Contacting a service center (for some models, a reset is possible via EDL or Test Point).
- Remove the device from trusted ones in your Google account (link).
- Enable the mode Lost Mode via Find My Device (locks the phone).
- Erase data remotely (if the function is enabled Remote wipe).
- By default
ADBvia Wi-Fi is disabled (must be enabled manually). - Added additional protection against unauthorized access (requires confirmation by Biometric or PIN).
- Some commands
ADB(for example,adb backup) may be limited. - Required root access.
- You need to edit files in
/sys/devices/system/cpu/. - Risk overheating and processor failure.
- On most modern smartphones, overclocking is blocked at kernel level.
If you sent the phone for repair, where you could enable debugging, follow these steps:
On devices with Android 12+, USB debugging is automatically disabled after 7 days without active use.. This is a security measure, but it can be bypassed if you regularly confirm trust in the computer.
USB debugging is a powerful tool, but potentially dangerous. Always turn it off after use and do not connect your phone to other people's PCs unless absolutely necessary.
FAQ: answers to frequently asked questions
My computer does not see the phone in ADB, although debugging is enabled?
Try this:
If all else fails, try another computer - the problem may be in the OS.
Is it possible to enable USB debugging if the phone is locked (forgotten) password)?
No, if debugging has not been enabled in advance. Without access to the settings, it is impossible to activate the developer mode. In this case, the only options left are:
On Samsung s Exynos sometimes flashing firmware via Odin in Download Modemode helps, but this does not work on all models.
How to disable USB debugging remotely, if the phone was stolen?
Unfortunately, it is impossible to disable debugging remotelyHowever, you can:
If there were included root access, an attacker can bypass some protections. In this case, the only reliable way is remote erasing.
Does USB debugging work on Android 15?
Yes, in Android 15 USB debugging works, but there are changes:
To enable debugging on Android 15 you may need to confirm the action via biometric authentication (fingerprint or facial recognition).
Can USB debugging be used to overclock the processor?
Technically yesbut:
For safe overclocking, it is better to use specialized kernels (for example, FrancoKernel) or applications like Kernel Adiutor (requires root).