Mode USB debugging on Android is a hidden feature that allows access to deep system settings through a computer. Without it, it is impossible to install custom firmware, restore data after a failure, or test applications via Android Studio. But enabling it is not so easy: manufacturers hide the option in the menu for developers, and on some devices (for example, Xiaomi or Huawei) additional manipulations are required.
In this article you will find up-to-date instructions for all versions of Android (from 5.0 Lollipop to 15), including devices with shells MIUI, ColorOS and One UI. We will analyze not only the standard activation method, but also bypassing blocking on Chinese smartphones, and also explain why debugging can suddenly turn off and how to fix it. If you need to connect to ADB for backup, root access or debugging applications, you have come to the right place.
โ ๏ธ Warning: Enabling USB debugging reduces the security level of the device. Never connect your smartphone to untrusted computers with active debugging - this can lead to data theft or installation of malware.
What is USB debugging and why do you need it
Mode USB debugging (English USB Debugging) is a communication protocol between an Android device and a computer that allows:
- ๐ง Install and debug applications via
ADB(Android Debug Bridge) - ๐ฑ Recover data after a reset or broken screen
- ๐ ๏ธ Receive root access using Magisk or SuperSU
- ๐ฅ๏ธ Manage your smartphone from a PC (for example, via scrcpy or Vysor)
- ๐ Flashing custom recovery (TWRP, OrangeFox)
Without debugging enabled, most of these operations are impossible. For example, if you forgot the pattern key, you can only unlock the device via ADB with activated debugging. The same applies to transferring data from a broken screen - app like Dr.Fone or Mobitrix require preliminary configuration.
However, there is a downside: when connecting to an infected PC, an attacker can steal your passwords, install spyware, or even block the device. data-i="65">enable USB debugging only for the duration of the necessary manipulations, and after completing the work, disable it manually ADB steal your passwords, install spyware, or even lock your device. That's why You should enable USB debugging only for the duration of the necessary manipulations, and after completing the work, disable it manually.
Preparation: what needs to be done before enabling debugging
Before activating the mode, complete several mandatory steps:
Charge the smartphone at least 50%|Install the original USB cable (not all cables support data transfer)|Download and install ADB drivers for your model|Disable screen lock (PIN, pattern) during setup|Check the Android version in Settings โ About phone-->
Pay special attention USB cable. Cheap cables often do not support data transfer, only charging. If the device is not detected when connected to a PC, try another cable or port USB 3.0 (usually blue).
Also. check whether drivers for your device are installed on your computer. For most brands (Samsung, Google Pixel, OnePlus), universal drivers are sufficient. Google USB Driver. For Xiaomi, Huawei or Realme may require separate installation from the official website.
โ ๏ธ Attention: In some devices (for example, Samsung Galaxy s One UI 6+) after updating the system, USB debugging is reset. If you previously enabled it, but now it does not work, check the settings again.
Standard method of enabling USB debugging (Android 5.0โ15)
The instructions are suitable for most devices on pure Android or with shells One UI (Samsung), OxygenOS (OnePlus), Stock Android (Google Pixel, Motorola). Xiaomi, Redmi or POCO there may be nuances - see the next section.
-
Open
Settingsand go to the sectionAbout phone(sometimes calledAbout deviceorPhone information). -
Find line
Build number(orMIUI versionon Xiaomi). Click on it 7 times in a row. After 3-4 clicks, the notification โYou are almost there!โ will appear, and after the 7th - the message โYou have become a developer!โ. -
Return to the main menu
Settings. Now a new section will appear thereFor developers(orDeveloper options,Developer options). -
Open this section and find the switch
USB debugging(EnglishUSB debugging). it. -
Confirm activation in the window that appears by clicking
OKorAllow.
After activation connect the device to the computer. A request will appear on the smartphone screen to trust this PC - check the box โAlways allow from this computerโ and click Allow.
If the "For Developers" section does not appear after 7 clicks on "Build number", try clicking on other lines in the "About phone" section: "MIUI Version", "Kernel Version" or "Model number". On some firmware, the trigger is hidden there.
Features of inclusion on Xiaomi, Redmi and POCO
Device Xiaomi (including sub-brands Redmi and POCO) have additional protection โ lock MIUI. Even after enabling debugging in the settings, it may not work until you complete additional steps:
-
Activate debugging according to the standard instructions (see the previous section).
-
Connect the device to the computer and allow access (click
Allowin the window that appears). -
Open the command line on your PC (
Win + Rโ entercmd) and run the command:adb shell settings put global adb_install_enabled 1 -
Reboot your smartphone. Debugging should now work stably.
On devices with MIUI 12+ you may also need to disable MIUI protection:
- Go to
Settings โ Password and security โ MIUI Protection. - Disable the option
MIUI Protection(password will be required). - Restart the device.
โ ๏ธ Attention: On some models Xiaomi (for example, Redmi Note 10 Pro or POCO X3 Pro) after updating the firmware, debugging is automatically disabled. To avoid this, after activation, run the command:adb shell settings put global adb_install_app_enabled 1
Problem solving: why. USB debugging does not work
If you have enabled debugging, but the computer does not see the device, check the following points:
| Problem | Cause | Solution |
|---|---|---|
The device is not detected c adb devices |
Drivers are not installed | Download Google USB Driver or drivers for your brand from the official website |
An error appears unauthorized |
The PC trust request has not been confirmed | Disconnect/connect the cable and allow access on the smartphone screen |
| Debugging is disabled after reboot | Reset developer settings | Run the command adb shell settings put global adb_install_enabled 1 |
The computer does not see the device in My Computer |
Data transfer mode is not activated | Swipe down the notification panel and select File transfer |
ADB gives an error device offline |
Port or driver conflict | Reinstall the drivers and try another USB port |
If the problem persists, try the following steps:
- ๐ Restart both your smartphone and computer.
- ๐ Use the original USB cable (preferably included).
- ๐ฅ๏ธ Check whether the
File transfer(MTP) mode is enabled in the notification panel. - ๐ ๏ธ Update
ADBiFastbootup to the latest version:
adb kill-server
adb start-server
What to do if debugging is enabled, but ADB does not see the device?
1. Open Device Manager on your PC (Win + X โ Device Manager).
2. Find your smartphone in the list (usually in the "Portable devices" or "Other devices" section).
3. Right-click โ "Update driver" โ "Search for drivers on this computer" โ "Select from list."
4. Manually specify the driver Android ADB Interface or Android Composite ADB Interface.
5. Restart your PC and try connecting again.
How to disable USB debugging after use
After finishing work with ADB it is recommended to deactivate debugging to increase security. You can do this in two ways:
-
Through the settings:
- Open
Settings โ System โ For developers. - Find the switch
USB debuggingand deactivate it. - Confirm the action in the window that appears.
- Open
-
Via ADB (if the screen does not work):
adb shell settings put global adb_debugging_enabled 0
Also do not forget delete trusted computersif you connected to someone else's PC:
- Go to
Settings โ System โ For developers. - Find the section
Revoke USB Debugging Permissions(orRevoke USB debugging authorizations). - Click
OKto reset all permissions.
Disabling USB debugging after use reduces the risk of unauthorized access to your device through vulnerabilities in ADB. This is especially true. important if you connected your smartphone to public computers (for example, in universities or coworking spaces).
Alternative activation methods (if the standard one does not work)
If the developer menu is not available or debugging does not turn on, try these methods:
-
๐ง For Samsung with One UI: Sometimes the โFor Developersโ section is hidden. return, do:
adb shell pm enable com.sec.android.app.launcher/.settings.SettingsActivity -
๐ฑ For devices with a broken screen: If the screen does not respond to touches, but USB debugging was enabled previously, connect via
ADBand do:adb shell input keyevent 82This command simulates clicking the "Developer Options" menu.
-
๐ For firmware without a developer menu: On some custom firmware (for example, LineageOS), enable it with the command:
adb shell settings put global development_settings_enabled 1
If none of the methods worked, check whether access to the developer settings is blocked by administrator policies (relevant for corporate devices). In this case, you may need to reset to factory settings.
FAQ: Frequently asked questions about USB debugging
Is it possible to enable USB debugging without access to the settings (for example, if you have forgotten) pattern key)?
No, if debugging was not enabled in advance. The only way out is to reset the device to factory settings via Recovery (this will delete all data). On some devices (Samsung c Find My Mobile), you can unlock the screen through your account, but this will not give access to debugging.
Why does the "Unidentified device" error appear when connecting to a PC?
This means that the computer does not have drivers for your smartphone. Download them from the manufacturer's official website (for example, Samsung USB Driver for Galaxy or Mi PC Suite for Xiaomi). Also check if you are using a "charge only" cable - it does not transfer data.
How to check if USB debugging is enabled without connecting to a PC?
Open Settings โ System โ For Developers and see the status switch USB debugging. If the "For Developers" section is missing, then debugging is definitely disabled (enabling it will automatically activate this section).
Is it possible to enable debugging via Fastboot if Android does not boot?
No, Fastboot does not provide access to Android settings. However, if you already have it unlocked bootloader, you can flash a custom one (for example, recovery (For example, TWRP) via Fastboot, and then enable debugging in the menu recovery (if it supports ADB).
Is it safe to keep USB debugging enabled all the time?
No, it creates security risks. Debugging allows anyone who connects your smartphone to. computer, execute commands with superuser rights (if the device is rooted). Disable it after use, or at least limit the list of trusted PCs.