Mode USB debugging is a hidden Android feature that allows access to the deep settings of the smartphone via a computer. Without it, it is impossible to install custom firmware, test applications using Android Studio, recover data after failures, or even simply transfer files using ADB. But manufacturers hide this option in the developer menu, which is disabled by default. Why? Because careless actions in this mode can turn your smartphone into a โ€œbrick.โ€

In this article you will find up-to-date instructions for all versions of Android - from outdated Android 5.0 Lollipop to fresh Android 15. We will analyze not only the standard method of enabling, but also workarounds for devices with locked settings (for example, on some models Xiaomi or Samsung with corporate policies). You will also learn how to check that debugging really works, and which ones 90% of users make when they first connect to a PC. three critical errors allowed by 90% of users when they first connect to a PC.

Why do you need USB debugging on Android

Many people mistakenly think that debugging mode is needed only by programmers. In fact, it comes in handy in a dozen everyday situations:

  • ๐Ÿ”ง Data recovery after a crash - for example, if the screen is broken, but you need to copy photos.
  • ๐Ÿ“ฑ Installation of custom firmware (for example, LineageOS or Pixel Experience) without official support from the manufacturer.
  • ๐Ÿž Fault diagnosis via ADB logcat - when the smartphone slows down, overheats or spontaneously reboots.
  • ๐Ÿ”„ Backup applications with their settings (for example, through Titanium Backup).
  • ๐Ÿ–ฅ๏ธ Managing your phone from a PC โ€”for example, for streaming games or remotely working with files.

Without USB debugging enabled, you will not be able to use Fastboot to unlock the bootloader, and this is the first step to install TWRP or root access. Even a simple command adb pull /sdcard/ to copy files from internal memory requires an activated mode.

โš ๏ธ Attention: on some devices (for example, Huawei or Honor c EMUI 12+) after enabling debugging, you may need additional permission in the menu Security โ†’ Additional settings โ†’ Allow USB debugging. Without this, the PC will not see the device.
๐Ÿ“Š Why do you need USB debugging?
Installing custom firmware
Data recovery
Application development
Fault diagnosis
Other

Preparing a smartphone: how to open the developer menu

Before enabling debugging, you need to activate the hidden menu โ€œFor developersโ€. This process is the same for 95% of devices, but there are nuances for individual brands. For example, on the Samsung Galaxy With One UI path. to the menu may differ from โ€œpureโ€ Android.

Standard instructions:

  1. Open Settings โ†’ About phone (or About the device).
  2. Find the item Build number (on some devices - MIUI version, Software version).
  3. Tap on it 7 times in a row. After 3-4 clicks, the notification โ€œYou have become a developer!โ€ will appear.

If the item Number assembly is missing:

  • ๐Ÿ“ฑ On Xiaomi/Redmi/Poco: Settings โ†’ About phone โ†’ MIUI version (tap on it).
  • ๐Ÿค– On Samsung: Settings โ†’ Information phone โ†’ Software information โ†’ Build number.
  • ๐ŸŽ On Realme/Oppo: Settings โ†’ About phone โ†’ Version โ†’ Build number.

After activating the developer menu, it will appear in the main list of settings (usually in the section System or Advanced).On some firmwares (for example, ColorOS) it can be hidden in Settings โ†’ Additional settings โ†’ Developer options.

โ˜‘๏ธ Preparing to enable debugging

Done: 0 / 4

Step-by-step guide: how to enable USB debugging

Now let's move on to the main thing: use the original USB cable, included with the smartphone. Cheap Chinese cables often do not support data transfer, only charging.

Action algorithm:

  1. Connect the phone to the computer via USB.
  2. Open the menu For developers (see previous section).
  3. Find the option USB debugging (sometimes called USB Debugging).
  4. Activate the switch. A warning will appear - click OK or Allow.
  5. A request to trust this computer will appear on the phone screen. Check the box Always. allow from this computer and click Allow.

If the option USB debugging is inactive (gray), check:

  • ๐Ÿ”Œ Is the cable connected to USB 2.0/3.0 port on the PC (not to the hub!).
  • ๐Ÿ–ฅ๏ธ Are drivers installed ADB (for Windows you need Google USB Driver or drivers from manufacturer).
  • ๐Ÿ“ฑ Is the phone screen unlocked (debugging does not work on a locked device).
What should I do if the developer menu disappeared after the update?

On some devices (for example, Samsung after updating to One UI 6) the developer menu may be reset. To return it, repeat the tapping procedure on Build number (7 times). If this does not help, try resetting to factory settings (but this will delete all data!).

On Android 12+ Google has tightened its security rules. Now, when you first connect to a new PC, you may be required to enter PIN code or pattern key directly in the debugging permission window. This is protection against attacks through connecting to infected computers.

Checking debugging: commands ADB

Enable debugging is half the battle. You need to make sure that the PC really โ€œseesโ€ your device. To do this, we use the utility ADB (Android Debug Bridge).

First install ADB:

  • ๐ŸชŸ For Windows: download Platform Tools from Google and extract to any folder.
  • ๐Ÿง For Linux/macOS: install via the package manager (sudo apt install adb for Ubuntu).

Then execute on the command line (or terminal):

adb devices

If everything is configured correctly, you will see the serial number of your device. If instead a message appears no devices foundcheck:

Problem Solution
The device does not appear in adb devices Check the cable, USB port, drivers. Restart the phone and PC.
Error unauthorized A trust request will appear on the phone - allow debugging.
device offline Disconnect and reconnect the cable, restart adb command adb kill-server && adb start-server.
Drivers are not installed Download USB Driver from the manufacturer's website (for example, Samsung USB Driver for Galaxy).

After a successful connection, try running a test command:

adb shell getprop ro.build.version.release

It should return the Android version of your device. If yes, debugging works correctly!

๐Ÿ’ก

If you often connect your phone to different PCs, add the file .android/adbkey.pub to a backup copy. If this file is lost, all previously trusted computers will be reset, and you will have to re-confirm access.

Common errors and how to avoid them

More than 60% of problems with USB debugging occur due to three errors:

  1. Using a non-original cable. Cheap cables often do not support data transfer, only charging. Symptom: The PC makes a connection sound, but adb devices does not see the device.
  2. Uninstalled drivers. Windows may automatically install the driver for charging, but not for debugging. Solution: manually update the driver via Device Manager, specifying the folder with Platform Tools.
  3. Locked screen. On Android 10+ debugging is automatically disabled if the screen is locked. Unlock your phone before connecting.

Other typical problems:

  • ๐Ÿ”’ MIUI optimization: on Xiaomi there may be an option in the developer menu Disable MIUI check - you need it turn off, otherwise debugging will be unstable.
  • ๐Ÿ›ก๏ธ Corporate policies: on work phones (with Android Enterprise) debugging can be blocked by the administrator.
  • ๐Ÿ”„ Reset settings: after updating Android, the developer menu is sometimes reset. Repeat activation (7 taps on Build number).
โš ๏ธ Attention: on Samsung Galaxy s One UI 5.0+ after enabling debugging, the notification โ€œDevice is connectedโ€ may appear in charging mode". Connect the USB mouse to the phone via OTG, unlock the screen and enable debugging manually.

USB debugging without access to settings

What should I do if the screen crashes and debugging was not enabled in advance? Or your phone is locked and you urgently need to copy data? There are several workarounds:

  • ๐Ÿ”ง Use OTG adapter + mouse. Connect your USB mouse to your phone via OTG, unlock the screen and enable debugging manually.
  • ๐Ÿ“ฑ Recovery via Find My DeviceIf synchronization with Google is enabled on your phone, you can try to unlock it remotely (but this will not work on all devices).
  • ๐Ÿ’ป Mode Fastboot. On some models (for example, Pixel or OnePlus) you can flash TWRP via fastboot, even if debugging is disabled. But this requires an unlocked bootloader.

For devices Samsung there is a unique method:

  1. Turn off the phone.
  2. Press Volume up + Power + Home (or Bixby for new models) to enter Download Mode.
  3. Connect to a PC and use Odin to flash the stock software with debugging enabled.

On Xiaomi with a locked bootloader, these methods will not work - you will need an official unlocker via Mi Unlock Tool, but this requires access to your account Mi and waiting 7-30 days.

๐Ÿ’ก

If debugging was not enabled in advance, the chances of recovering data without loss are ~30%. The best protection is to activate the mode in advance and make a backup via adb backup.

Security: risks and how to minimize them

USB debugging is like an open door to your smartphone. If you connect to an infected PC or use unofficial tools, you can:

  • ๐Ÿ•ต๏ธ Lose data (for example, via the command adb shell rm -rf /sdcard/).
  • ๐Ÿ”“ Get root access without your knowledge (if the device has vulnerabilities).
  • ๐Ÿ“ฑ Lock the phone (for example, through adb shell am broadcast -a android.intent.action.MASTER_CLEAR).

Security rules:

  1. Enable debugging Only on trusted PCs.
  2. After use, disable it in the settings.
  3. Do not connect the phone to public charging (risk Juice Jacking of data theft via USB).
  4. Use adb only from official sources (for example, Platform Tools from Google).

On Android 11+ a function has appeared USB debugging (charging only) โ€”it allows you to connect to a PC without transferring data. But this mode is not suitable for full debugging.

โš ๏ธ Attention: if you are selling or transferring a phone, be sure to disable USB debugging and perform a factory reset. Otherwise, the new owner will be able to access your data via adb backup.

FAQ: answers to frequently asked questions

Can I enable USB debugging without a computer?

Yes, the debugging itself can be enabled without a PC - just activate the developer menu and toggle the option. But to check the operation (adb devices) and use the commands, you will still need a computer.

Why does the PC not see the phone after enabling debugging?

The reasons may be different:

  • Drivers are not installed (download Google USB Driver or driver from the manufacturer).
  • The cable is used only for charging (try the original one).
  • The phone is not allowed access for this PC (check the notification on the screen).
  • USB port on The PC is faulty (try another port).

Also check that the menu For Developers option is enabled USB Configuration โ†’ File transfer (MTP) or PTP.

How to disable USB debugging?

Go to Settings โ†’ System โ†’ For Developers and deactivate the switch USB debuggingOn some devices (for example, Huawei) a reboot may be required.

Does USB debugging work on iPhone?

No, there is no analogue on iOS USB debugging in the same form as on Android. For diagnostics and development, Apple uses Xcode and protocol Lightning/USB-C with limited access.

Is it possible to enable debugging via recovery?

No, the mode Recovery does not provide access to Android settings. The exception is custom recovery like TWRP, but to install them, debugging must already be enabled.