How to Sign In to ADB on Xiaomi: A Complete Guide to Unlocking and Setup

What is ADB and why you need it Xiaomi owners

Android Debug Bridge (ADB) is a bridge between your Xiaomi smartphone and your computer that allows you to access hidden features, install custom firmware, remove embedded apps (bloatware), recover data after a crash, or even unlock the bootloader for advanced customization, but before you use ADB, it needs to be activated correctly β€” and on devices with MIUI, this process has its nuances.

Owners of Redmi, POCO and other Xiaomi lines often face problems when connecting to ADB: the system can block access, require additional permissions or not recognize the device at all. In this article, we will analyze all the steps from enabling debugging over USB to solving typical errors, including working with a locked bootloader and features of the latest versions of MIUI 14/15.

Important: ADB gives you complete control of the system, so careless actions can lead to data loss or β€œbricking” of the device. If you are a beginner, we recommend that you first learn the basic commands and create a backup through adb backup.

Preparation of the smartphone: enabling debugging by USB

The first step is to unlock access to the developer’s settings and enable debugging. On Xiaomi, this process is slightly different from standard Android because of the proprietary MIUI shell.

  1. Activate Developer Mode: Go to Settings β†’ About Phone β†’ MIUI Version and press it 7 times in a row until the notification β€œYou’ve become a developer” appears. Some models (e.g. POCO F5) may require you to enter a pattern lock.
  2. Turn on USB debugging: Return to the main settings menu, find a new section Additional β†’ Developer (or Settings β†’ System β†’ Advanced Settings β†’ Developer on MIUI 15). Activate the USB debugging switch.
  3. Allow debugging for your PC: When you first connect to your computer, an RSA request will appear on your smartphone screen. Be sure to tick "Always Allow from this computer" and click "Allow." If you don't, access to ADB will be blocked every time you connect.

⚠️ Note: On some models (Xiaomi 13 Ultra, Redmi Note 12 Pro)+) After debugging is enabled, you may need to unlock the bootloader through the official Mi Unlock tool. ADB It will work with restrictions (for example, root access is not possible).

If the For Developers section suddenly disappeared after the MIUI update, try resetting the application settings: Settings β†’ Applications β†’ Application Management β†’ Three Points β†’ Reset application settings.

πŸ“Š What Xiaomi model do you use?
Redmi Note 12/13
POCO F/X
Xiaomi 13/14
Redmi A
Another model

Install ADB on your computer: Windows, macOS, Linux

To connect to a smartphone, the PC must have ADB drivers and the tool installed, a process that varies depending on the operating system.

For Windows.

1. Download Google’s Platform Tools (official package with adb.exe and fastboot.exe).

2. Unpack the archive in the root of the C:\ disk (e.g., C:\platform-tools\).

Install the drivers:

  • πŸ”Œ Connect your smartphone to your PC in File Transfer (not Charging) mode").
  • πŸ–₯️ Open Device Manager, find Xiaomi with a yellow exclamation point.
  • πŸ“₯ Right-click. β†’ Update the driver β†’ Perform a search on this computer β†’ point the way to the folder platform-tools\usb_driver.

For macOS/Linux

Drivers are not required on these systems, but you need to add adb to the environment variables:

# For macOS (via Terminal)


brew install android-platform-tools




For Linux (Debian/Ubuntu)



sudo apt update && sudo apt install adb fastboot

After installation, check the connection with the command:

adb devices

If the device appears in the serial number list, the connection is successful. If not, restart the smartphone and PC, then try again.

πŸ’‘

If the adb device command returns a blank list, try switching USB connection mode on your smartphone: Settings β†’ Connection and Sharing β†’ USB Mode (select File Transfer or MTP).

First ADB Connection: Checking and Basic Commands

Now that the smartphone and PC are ready, we can get to work with ADB. Let's start by checking the connection and the main commands.

Step 1. Check the connection

Open the command line (Windows) or terminal (macOS/Linux) in the folder with the platform-tools and type:

adb devices -l

If everything is set up correctly, you will see something like:

List of devices attached


a1b2c3d4e5f6      device product:tissot model:Redmi_Note_7 device:tissot

Step 2. Basic commands ADB

Team team.DescriptionExample
adb shellOpens the shell of the device to execute Linux commandsadb shell ls /sdcard/
adb pullCopies files from a smartphone to a PCadb pull /sdcard/DCIM/photo.jpg C:\Images\
adb pushUploads files from PC to smartphoneadb push app.apk /sdcard/Download/
adb installSet up APK-fileadb install com.example.apk
adb rebootReset the device in the specified modeadb reboot bootloader (for fastboot)

⚠️ Note: Adb shell su or adb root commands will not work on Xiaomi without first obtaining root permissions. This requires unlocking the bootloader through the Mi Unlock Tool and installing custom recovery (for example, custom recovery, TWRP).

On devices with MIUI 14+, the adb backup command may not work due to manufacturer limitations, in which case use alternative backup methods, such as through Mi PC Suite or third-party applications.

Is the smartphone connected in the mode "File transfer"?|Are drivers installed (for Windows)?|Is the device visible in the list after the command adb devices?|Is debugging permitted USB developer-setting?-->

Solving typical mistakes ADB Xiaomi

Even when you set it up properly, users often encounter errors, and let's look at the most common ones and how to fix them.

1. "Unauthorized" or "Device not found"

Reason: The smartphone didn’t give permission to debug or the RSA key was reset.

Decision:

  • πŸ”„ Turn it off and plug it back in. USB-cable.
  • πŸ“± On your smartphone, go to Settings β†’ For developers and revoke permissions USB-Debugging (option "Revoke permissions").
  • πŸ–₯️ On PC, delete the adbkey.pub file in the folder %USERPROFILE%\.android\ (Windows or ~/.android/ (macOS/Linux), Then reconnect.

2. "No permissions" when working with files

Reason: MIUI blocks access to system folders through ADB.

Decision:

  • πŸ”§ Use the command adb shell, then su (requires root).
  • πŸ“ To access /data or /system You may need a Magisk or custom firmware.
  • πŸ“± Check if the Data Protection mode is activated in Settings β†’ Confidentiality.

3.ADB works, but not all commands are executed

Reason: MIUI restrictions for unlocked devices.

Decision:

  • πŸ”“ Unlock the bootloader via Mi Unlock Tool (requires Mi Account binding and waiting) 7-168 hours).
  • πŸ“² Install. TWRP To circumvent restrictions (instructions depend on the model).
  • πŸ”„ Try using adb shell pm list packages to check available features.

What if ADB doesn’t see the device after the MIUI update?
After major updates (e.g., with the MIUI 13 on MIUI 14) the debugging authorization may be reset. In this case: 1. USB-cable. 2. In the developer settings, turn off and turn on Debugging again. USB. 3. Connect the cable and wait for the permission request (may not appear immediately). 4. If the request does not appear, restart the smartphone to fastboot (adb reboot bootloader) and check the connection through fastboot devices.

Alternative ways to connect to ADB without cable

If USB-The port of the smartphone is damaged or you prefer a wireless connection, you can use it. ADB via Wi-Fi or LAN. This method works for most Xiaomi devices with MIUI 12 and newer.

Step 1. Connect to USB and switch ADB to network mode:

adb tcpip 5555

Step 2. Turn off the cable and connect via IP:

Find out locally. IP-Smartphone address in Wi-Fi settings, then enter:

adb connect 192.168.1.100:5555

Replace 192.168.1.100 with your device’s current IP.

Step 3. Check the connection:

adb devices

If you have an IP-addressed device on the list, you're successful, and you can now use ADB without cable while your smartphone and PC are on the same network.

⚠️ Note: Wireless connectivity is less stable than USB. When a communication breaks (for example, when you reboot the device), you will need to re-run adb connect. To work constantly, add a command to autoboot or use scripts.

On some models (POCO X5 Pro, Xiaomi 12T) after the reboot, port 5555 resets, in which case you will have to temporarily connect to USB and repeat adb tcpip 5555.

πŸ’‘

Wireless ADB is convenient for debugging applications or transferring files, but is not suitable for critical operations (for example, firmware via fastboot).

Unlock the bootloader for full access to ADB

By default, the Xiaomi bootloader is locked, which limits the capabilities of ADB. For example, it is impossible to:

  • πŸ”§ Install custom recovery (TWRP).
  • πŸ“¦ Get root access through Magisk.
  • πŸ”„ Switching unofficial firmware (for example, LineageOS).

Step 1. Link your Mi Account to your device:

Go to Settings β†’ Xiaomi Account β†’ Mi Cloud and log in. Make sure the device is linked to your account (check Settings β†’ About Phone β†’ Mi Status).

Step 2. Download the Mi Unlock Tool:

The official tool is available on Xiaomi's website, install it on your PC and log in under the same account as your smartphone.

Step 3. Unlock the bootloader:

  1. Turn off your smartphone and press Volume Down + Power to log into fastboot.
  2. Connect the device to your PC and start the Mi Unlock Tool.
  3. Click Unlock and wait until it is completed (it may take up to 168 hours to wait for new accounts).

After unlocking, you will be able to:

  • πŸ“₯ Install TWRP Fastboot Flash Recovery twrp.img.
  • πŸ”§ Get root with Magisk (please stitch in) Magisk.zip recovery).
  • πŸ”„ Stripping custom kernels or firmware.

On devices with MIUI 15 and newer, Xiaomi has tightened its unlock policy, and now some models (such as Xiaomi 14) require an application to unlock through the official website, stating the reason.

FAQ: Frequent questions about ADB on Xiaomi

Can I turn on ADB if the smartphone is not turned on (hang on the logo)?
Yes, but only if the bootloader has been previously unlocked. Connect the device to the PC, press Volume Down + Power to log in to fastboot, then use the commands: fastboot devices fastboot continue If the bootloader is locked, you will need official repair or flashing through the Mi Flash Tool (with loss of data).
How to disable forced encryption on Xiaomi via ADB?
On some models (Redmi Note) 10 Pro, POCO X3 Pro) MIUI enforces encrypting user data, which interferes with the work with TWRP. To disable encryption: Log in to fastboot and run the patched kernel with the encryption disabled (look for forums) XDA Developers for your model. Or use the command (requires root): adb shell su -c "tune2fs -O ^has_journal /dev/block/by-name/userdata" ⚠️ This will lead to a data dump!
ADB sees the device, but no commands are executed ("device offline")
The problem often arises from: Incompatible version of adb (update Platform Tools); Antivirus conflict (add exception for adb.exe); MIUI failure (reboot your smartphone to safe mode and check again). Try to kill the ADB server and restart it: adb start-server adb-server
Can I use ADB to remove Xiaomi’s built-in apps?
Yes, but with reservations: πŸ—‘οΈ Without root, you can only disable applications: adb shell pm disable-user --user 0 com.miui.weather πŸ”ͺ The root can be removed completely: adb shell su -c "pm uninstall -k --user 0 com.miui.weather List of embedded application packages can be obtained by the command: adb shell pm list packages | grep miui ⚠️ Removing system applications can lead to unstable work MIUI!
How to back up with ADB if MIUI blocks the backup command?
Use an alternative method with adb pull: Create a list of important folders: adb shell ls /sdcard/ Copy them on PC: Adb pull /sdcard/DCIM/ C:\Backup\Photos\ For backup applications, use: adb backup -apk -obb -shared -all -f backup.ab (some devices will require confirmation on the smartphone screen). For a full backup (including settings), root and TWRP.