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.

๐Ÿ“Š Why do you need USB debugging?
Installing custom firmware
Data recovery
Application development
Control from a PC
Other

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.

  1. Open Settings and go to the section About phone (sometimes called About device or Phone information).

  2. Find line Build number (or MIUI version on 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!โ€.

  3. Return to the main menu Settings. Now a new section will appear there For developers (or Developer options, Developer options).

  4. Open this section and find the switch USB debugging (English USB debugging). it.

  5. Confirm activation in the window that appears by clicking OK or Allow.

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:

  1. Activate debugging according to the standard instructions (see the previous section).

  2. Connect the device to the computer and allow access (click Allow in the window that appears).

  3. Open the command line on your PC (Win + R โ†’ enter cmd) and run the command:

    adb shell settings put global adb_install_enabled 1
  4. Reboot your smartphone. Debugging should now work stably.

On devices with MIUI 12+ you may also need to disable MIUI protection:

  1. Go to Settings โ†’ Password and security โ†’ MIUI Protection.
  2. Disable the option MIUI Protection (password will be required).
  3. 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 ADB i Fastboot up 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:

  1. Through the settings:

    1. Open Settings โ†’ System โ†’ For developers.
    2. Find the switch USB debugging and deactivate it.
    3. Confirm the action in the window that appears.
  2. 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:

  1. Go to Settings โ†’ System โ†’ For developers.
  2. Find the section Revoke USB Debugging Permissions (or Revoke USB debugging authorizations).
  3. Click OK to 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 ADB and do:

    adb shell input keyevent 82

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