What is USB Debugging Mode?
The universal and only way to make changes to your phone. The tool used by the Android Debug Bridge program (ADB for short). The main purpose of the bridge is to control the smartphone operating system at a deeper level. Let's look at the main features provided to the user by the debugging mode.
- Obtaining root rights. To fully edit system files and install applications with advanced functionality, you need to log in with super user rights.
- Flashing a phone as a way to optimize its operation, installing custom versions of recovery and the system itself is impossible without activating this mode.
- Working with backup, backup and recovery of the OS.
- Control over the functioning of the device at the hardware and software level.
- Transferring data between a computer and a smartphone.
- ADB running on the computer will perform the necessary actions with the device’s file system.
As you can see, the list contains all the most important actions with the phone that literally every user encounters.
If you want to be a full-fledged owner of your Xiaomi smartphone, adjust and customize its operation for yourself, then enabling the function in the settings is a must.
Why is USB debugging needed?
USB debugging mode enables advanced system features. After its activation it is possible to:
- flash a smartphone;
- get root rights;
- create or restore a backup copy of data;
- copy files and folders from your computer to your smartphone and back;
- install new software, including self-written software.
Answer
USB debugging mode is usually required to obtain root access (superuser rights) or modify and finalize firmware, in other words, making changes to the OS at a deeper level. This mode was originally created for developers; it allows you to:
- Optimize applications and the operating system itself
- Check how the created program functions with the OS
- Detect operational failures
- Test hardware components
- Update software
- Create a backup
- Access your smartphone's file system from your computer
- Restore your phone
- Receive detailed process statistics
The debugging service itself is called ADB (Android Debug Bridge). You can enable debugging mode on all Xiaomi devices through the phone/tablet settings. Depending on the version of your system, the location of the menu item you need may vary slightly.
- Go to the following path: Settings-General-About smartphone
- Find the line with the build number (miui version), then click on it about 7 - 10 times
- There should be a notification about enabling the menu for developers
- We return to the settings, go to “Advanced” and find the item “For Developers”
- In this menu we find the “USB Debugging” option and check the box next to it, that’s all.
It is worth mentioning that after connecting to the computer for the first time in debugging mode, you will need to confirm the connection on your phone.
If the smartphone is not detected, there are usually three reasons:
- The device is locked - you just need to unlock the smartphone
- Inappropriate usb port - use only rear ports and version 2.0
- Drivers are missing - download MI PC Suite or find drivers separately
Listen to the article |
Content
How to enable developer options
The first thing we need to do is become a developer.
Attention! Everything that then happens to the phone, what changes will affect the device, you are responsible for everything. This is the policy developed by Xiaomi; the company disclaims responsibility for all those innovations that you yourself, of your own free will, made in the device.
Go to “Settings”, then “About phone”, click on the MIUI version several times until the long-awaited inscription appears: you are a developer.
We return to the settings menu, then - “Advanced settings”, enter and see the new option “For developers” that has appeared.
Instructions on how to unlock the bootloader on a Xiaomi phone
Previously, you had to get approval to unlock the bootloader (write a letter to support) and wait several days. Now you don’t need to do this, but the so-called “timer” has appeared. Read more in the official instructions below.
Step 1: connect Mi account to phone
To unlock the bootloader, you must have a Xiaomi account on the device. If you don’t have one yet, read on how to create a Mi account. If an account is already linked on your phone, proceed to the second step.
Step 2: Linking your account to your device
Now you need to link your Mi account to your phone. To do this, follow these steps sequentially. Some of the steps have already been completed when checking the bootloader status using your phone. There are also visual screenshots there.
- We log out of our Mi account, this is necessary to avoid the appearance of an error
about the impossibility of verifying the device and account. - Switching from Wi-Fi to mobile Internet. This is a mandatory condition; otherwise the process will not work. Read how to set up mobile internet on Xiaomi.
- Go to the “About phone” item - click up to 7 times on the “MIUI Version” line.
- We return to the main settings menu, look for the sections “Advanced settings” - “For developers”.
- Click on the item “Mi Unlock Status”. We confirm our actions by agreeing to the warning that appears.
- Click on the “Link account to device” button.
- The MIUI system will require you to log in to your Mi account, log in.
- After successful login, your account will be linked to your phone.
- If the binding is successful, you will see the corresponding message.
- Ready. Now you need to wait until the mandatory period of 360 or 720 hours has passed.
- You can check how much time is left before unlocking using the final step.
If you encounter difficulties while linking your account to your smartphone, watch this video.
Step 3: download Mi Flash Unlock program
After the mandatory waiting period ends, you will need to download the Mi Flash Unlock program. You can download it from the official website en.miui.com/unlock/ or from our article. Afterwards, unpack the contents of the archive and, if desired, transfer it to the root of the system disk or leave it on the working disk.
I left the archive on drive D and unlocking the bootloader went fine.
Step 4: Launch Mi Unlock
Now we open the Mi Unlock program as an administrator, we see a white screen with text in Chinese (if the localized version is like mine, then in Russian), where the disclaimer rules are indicated. We agree and click on the appropriate button.
Step 5: Login to Mi account
We are presented with a new window that requires you to log into your Mi account. Enter your password and your ID (linked phone number or email). We carefully check the specified data and keyboard layout, since it is at this stage that many users have problems with the appearance of such a notification: “You entered your password and/or login incorrectly.” Click “Sign in”.
Sometimes a window with a procedure for checking unlock permission may appear; this may take several minutes.
Basic methods for connecting Xiaomi to PC
Step 6: Connect your phone to your computer
Then we return to the smartphone itself. Turn it off and put it in fastboot mode by simultaneously holding down the power and volume down keys. Using a USB cable, connect the phone to the computer.
Step 7: Unlock Process
The final final stage: the program checks the device, if all conditions are met, the process of unlocking the bootloader will begin. We wait a few minutes (in my case 25 seconds), and if everything was done correctly, we receive a notification about successful unlocking - three green checkmarks. Ready.
How to enable debugging mode on Xiaomi
In the phone this function is called Android Debug Bridge.
To activate it you need:
- In the settings, open the “General” section, where the “About smartphone” subsection is open;
- Click on the “MIUI Version” item several times in a row until you switch to the “For Developers” mode;
- In the “Advanced” subsection, go to the “For Developers” menu, where the “USB Debugging” option is activated.
After this, you can connect your smartphone to your computer and perform the necessary operations with it. When connecting for the first time, you will need to confirm the connection on your mobile device.
Activating developer mode
- Go to "Settings" .
- Click on the first tab “About phone” .
- Pay attention to the item “MIUI Version” , which we click on 5 times . A notification should appear indicating that you have become a developer.
Enable debugging
- Now we return to the original settings menu and go to “Advanced settings” .
- We see a new line “For developers” .
- A menu appears, in which we activate the checkbox next to “USB Debugging” .
USB debugging is enabled in the same way on all Android devices. The settings interface may change slightly, as well as the location of the sections. But the general scheme is almost the same everywhere.
Connecting via Wi-Fi and Mi Drop (ShareMe)
The following method is useful for a quick remote connection via a Wi-Fi network without using wires. It is better to use a laptop for this. You also need to download an application on your phone, this is ShareMe (formerly Mi Drop). This is a regular FTP access that works using similar applications.
ShareMe (MiDrop) – Transfer files without internet Developer: Xiaomi Inc.
Price: Free
- Download ShareMe (on some models it is installed as a standard application by default).
- We go in and provide all permissions.
- Go to the menu (upper left side) - “Connect to a computer”. Previously, this option was in Mi Explorer, but in the latest versions it was moved to Mi Drop.
- We check that the phone and laptop are on the same Wi-Fi network. If everything is correct, click on the “Run” button.
- We are asked to choose the type of connection: with or without a password. If you are on a home network, you can choose an unsecured connection.
- Afterwards, the FTP address will appear which must be entered in the computer line (example in the screenshot).
- Done, if you entered the address correctly, you will be given access to view files from your Xiaomi phone.
Recommendations for using debug mode
Even inexperienced users can easily understand the process of activating debugging mode. However, in the future you may encounter a situation where the mode does not work. The reasons may be the following:
- If the PC does not find the device, we recommend checking the cable used for connection. It is advisable to use the USB cable included in the kit for connection.
- If problems occur, you can try connecting to different ports on your PC, since there is a possibility that one of them will break.
- Check for drivers on your computer. They may not be installed. In this case, you can download and install the MIPCSuite program, which will allow you to perform all the required steps to debug the gadget.
Be careful when connecting your gadget to your PC. A request to allow USB debugging will appear on the screen - confirm it.
Risks of use
When enabled, the device allows enhanced access for various operations, making it vulnerable to malware and external attacks. The developers have tried to reduce the risk of threats, so when you connect your smartphone to each new PC, you will again receive a request for access permission.
When this option is activated, it is not recommended to use public chargers or public Wi-Fi networks.
In addition, if your device is lost or stolen, an attacker can obtain your personal data by bypassing your smartphone’s passwords and security system. Thus, it is better to disable debugging at times when you are not using it for your own manipulations with the operating system.
After the euphoria of the first days of using the device subsides, when your hands begin to itch from an irresistible desire to change something in the device, then Xiaomi’s USB debugging mode comes to the rescue. It's not hidden too deep in the phone, but it doesn't catch your eye. A useful feature in every sense, you can’t do without it.
Answers to popular questions
How to enable debugging on Mi A2 and other Android One models?
Go to “Settings” – “System”, and here select “About phone”. Then click 7 times on “Build number”. You will become a developer. And then just go to the item for developers and activate the checkbox. This instruction is suitable for absolutely all models from the Android One series.
Debugging is activated, but the computer still does not see the connected phone. What to do?
Most likely, the reason here is not in ADB mode, but in special drivers that need to be installed on the PC. Usually they are installed automatically when you connect your phone for the first time. But if this does not happen, read our article on connecting to a computer, there is an archive with the necessary drivers.
Can I enable scanning of applications that I install via USB?
Yes, there is a separate line for this in the developer section. It's called Installation via USB . By activating it, you will enable security checking via ADB or ADT.
How to connect to a computer?
Almost always the connection should be made via a USB cable. This method will provide full access to the file system and the ability to modify the firmware.
Windows XP and newer builds are programmed to automatically select drivers for Xiaomi MI4 and other models, so you most likely won't even have to do anything.
The only thing you need to do is follow these simple steps.
- Connect the cord to the Xiaomi Redmi Note 4 socket, and insert the other end into the USB connector on the PC.
- In the pop-up window on your computer desktop, select what you want to do with the connected device.
This is all that is required by the vast majority of users, but sometimes problems arise during the process or when connected, only charging occurs, but files cannot be transferred. This usually happens on devices that do not have global firmware, so they run localized builds of MIUI or custom Android-based systems.