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 Fastboot or 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. flag persist.adb.tcp.port=5555 via ADB.

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:

  1. Open Settings โ†’ About phone (or About tablet).
  2. Find item Build number (at Samsung โ€” Software information โ†’ Number assembly).
  3. Tap on it 7 times in a row. After this, a notification โ€œYou have become a developer!โ€ will appear.
  4. Return to the main menu Settings - a new section will appear there For developers (sometimes it is hidden in Advanced).
  5. Turn on the switch USB debugging and 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 (select File transfer or PTP).
  • ๐Ÿ›ก๏ธ 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.
๐Ÿ“Š What brand of your Android device?
Samsung
Xiaomi
Google Pixel
OnePlus
Huawei
Other

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:

  1. Download Platform Tools:
    • Official page: developer.android.com.
    • Extract the archive into a folder (for example, C:\platform-tools).
  2. 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.
  • Connect your phone:
    • Use USB 2.0 port (on some PCs USB 3.0 causes problems).
    • Select mode File transfer (MTP) or PTP.
    • Check the connection:
      adb devices

      If the device is displayed, everything is configured correctly. If not, reinstall the drivers or try a different cable.

    • 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 devices
      

      adb 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 PC
      

      adb 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 time
      

      adb 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 applications
      

      adb 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:

      1. Connect the phone to the PC and check if it is detected:
        adb devices

        If the device is visible, proceed to the next step.

      2. Try rebooting into Recovery:
        adb reboot recovery

        If that works, perform a reset via TWRP or stock recovery.

      3. If the screen doesn't work but the phone is on, you can try to copy important data:
        adb pull /sdcard/ C:\backup\
      4. For unlocked devices With the bootloader you can flash the stock firmware via Fastboot:
        fastboot flash system system.img
        

        fastboot flash boot boot.img

    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 in ADBor in Fastboot, but the computer makes a connection sound, try holding the buttons Vol Up + Power for 10-15 seconds. On some models, this forces the device to reboot into Fastboot.

    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 ADB on untrusted PCs.
    • ๐Ÿ“ฑ Set bootloader lock after flashing (command fastboot oem lock).
    • ๐Ÿ›ก๏ธ Use data encryption (included in Settings โ†’ Security).
    • If you sent the phone for repair, where you could enable debugging, follow these steps:

      1. Reset all settings (Settings โ†’ System โ†’ Reset).
      2. Remove all unknown devices from trusted in your Google account (myaccount.google.com/devices).
      3. Check for unfamiliar applications in Settings โ†’ Applications.

      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:

      1. Reinstall the drivers (use Zadig for forced installation libusb or WinUSB).
      2. Try another USB cable (preferably the original one).
      3. Connect the phone to a different port (preferably USB 2.0).
      4. Run the command adb kill-server, and then adb start-server.
      5. Check whether your antivirus or firewall is blocking debugging.

      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:

      • 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).

      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:

      1. Remove the device from trusted ones in your Google account (link).
      2. Enable the mode Lost Mode via Find My Device (locks the phone).
      3. Erase data remotely (if the function is enabled Remote wipe).

      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:

      • By default ADB via 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.

      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:

      • 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.

      For safe overclocking, it is better to use specialized kernels (for example, FrancoKernel) or applications like Kernel Adiutor (requires root).