Debugging by USB on Xiaomi Mi A2 Lite: how to turn on and configure correctly

Xiaomi Mi A2 Lite is one of the few smartphones of the brand that runs on “pure” Android One instead of the proprietary shell MIUI. This feature simplifies many processes, but also adds nuances when activating the debugging mode via USB. Without it, it is impossible to use ADB, install custom firmware or restore data through a computer.

Turning on debugging on the Mi A2 Lite is different from the standard procedure on devices with MIUI: there are no hidden menu items for developers, but there are pitfalls. This article is unique steps for the A2 Lite model (codename daisy), which will not be suitable for other Xiaomi smartphones. Let’s analyze not only the basic activation, but also the solution of typical errors, for example, when the computer “does not see” the device or requests additional drivers.

It is useful for those who plan to:

  • 🔧 Install TWRP or custom firmware (for example, LineageOS)
  • 📱 Recover deleted files through ADB pull
  • 🖥️ Testing apps in Android Studio
  • 🔄 Unlock the bootloader in an official way

Why is the Mi A2 Lite different than the MIUI?

The main reason is that there's no proprietary shell. On MIUI devices, the path to developer mode is standard: Settings → About Phone → MIUI version (7 times tap). But the Mi A2 Lite runs on Android One, where:

  • 📛 No paragraph “Version” MIUI» — Instead, the assembly number is used.
  • 🔒 Some developer options are hidden deeper (e.g, OEM Unlock may be missing until the bootloader is unlocked)
  • 🔌 Drivers. ADB It is set differently (you need a Google signature, not Xiaomi)

In addition, the Mi A2 Lite has a locked bootloader by default, which means that even after USB debugging is enabled, some ADB commands (such as fastboot oem unlock) won’t work without first unlocking through Xiaomi’s official website.

📊 You've already tried to include debugging on USB on the Xiaomi?
Yeah, but it didn't work.
Yeah, it's working.
No, I'm just going to.
I don't know what that is.

Preparation of the smartphone: unlocking the menu “For developers”

Before you activate debugging, you need to open a hidden settings menu. On the Mi A2 Lite, it's done like this:

  1. Open Settings (the gear icon in the application menu).
  2. Go to the System section → The phone.
  3. Find the line Assembly number (usually at the bottom).
  4. Slap it 7 times in a row. After 3-4 taps, a notification will appear: "You are almost there!", and after the 7th, a message will appear: "You are a developer!"

If after 7 taps the menu does not appear:

  • ❌ Make sure you tap on the build number, not the Android version.
  • ❌ Check if you have a password/pattern lock installed. Without locking the screen, the developer menu will not open.
  • ❌ Restart your phone – sometimes the system cache resets the changes.

Make sure Android is at least 8.1 (the A2 Lite originally had 8.1 Oreo)

Set a password or PIN-code (print/pattern lock will not fit)

Connect your phone to charge (a charge below 20% may block some features)

Download ADB drivers for Android One (link in the next section)

-->

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

After unlocking the developer menu:

  1. Return to the main settings menu.
  2. Go to the new System → For Developers section (may be called “Developer Options”).
  3. Scroll down to the Debugging block.
  4. Activate the debugging switch over USB.
  5. In the confirmation window that appears, click OK.

The screen will show a notification saying, "USB debugging is on. Permit debugging for this computer?"

  • 🔐 Always check the print. RSA-Key (must match what is displayed on the PC).
  • 🖥️ If you are connecting for the first time, check the box “Always allow from this computer».
  • ⚠️ Never confirm debugging on public PCs (in internet cafes, universities, etc.) – this is a risk of data leakage.

💡

If debugging suddenly shut down after an Android update, check the USB default settings in the developer menu. Sometimes the system resets it to Charge Only.

To see if it works:

  1. Connect your phone to your computer through the original USB-cable (cheap cables often do not support data transmission).
  2. Open the command line (Windows) or the terminal (macOS/Linux).
  3. Enter the command: Adb devices
  4. If the device serial number appears in the answer (for example, 1234abcd device), the debugging works.

⚠️ Attention: On Mi A2 Lite with Android 10+ Additional permission may be required USB debugging (Security settings) in the developer menu. ADB It will make an unauthorised error.

Installation of ADB drivers for Xiaomi Mi A2 Lite

Without the right drivers, the computer won't recognize the phone in debugging mode. A2 Lite will do:

Operating systemDriver/PODownload linkNotes
Windows 10/11Google USB DriverOfficial Android websiteManual installation is required through Device Manager
macOS/Linuxadb (included in Android SDK)brew install android-platform-toolsInstalled through Homebrew or Package Manager
Windows (alternative)Xiaomi Mi DriverXiaomi Support PageYou need to choose the daisy model (Mi A2 Lite)

Instructions for Windows:

  1. Download Google USB Driver and unpack the archive.
  2. Connect your phone to your PC in debugging mode.
  3. Open Device Manager (Win + X → Device Manager).
  4. Find a device with a yellow exclamation point (usually under “Other Devices” or “Portable Devices”).
  5. Right-click → Update the driver → Search on this computer.
  6. Please indicate the path to unpacked Google drivers.

⚠️ Note: If Adb devices show offline after installing drivers, try: 🔄 Restart your phone and PC. 🔌 Connect the cable to another USB-port (preferably) USB 2.0 – They are more stable with the ADB). 📱 In the developer menu, enable Cancel debugging authorization, then connect again.

Solving common connection errors

Even after you set up the debugging correctly, you can have problems, and here are the typical Mi A2 Lite bugs and their solutions:

Mistake.Reason.Decision
device unauthorizedUnconfirmed. RSA-keyDisconnect/connect the cable and confirm the request on the phone
no devices foundDrivers are not installed or the cable is faultyCheck the connection via another cable/port, reinstall the drivers
adb: insufficient permissionsNana Linux/macOS no rights USB-deviceAdd the sudo usermod rule -aG plugdev $LOGNAME and restart the PC
The phone does not respond to adbUSB Mode Dropped to “Only Charging”In the notification curtain, select File Transfer (MTP) or PTP

If the problem persists:

  • 🔍 Check if the antivirus is blocking debugging (for example, Avast or Kaspersky can block adb.exe).
  • 📵 Turn it off. VPN Proxies or Proxies – They Can Interfere Connection.
  • 🔄 In the developer menu, enable Undo debugging authorization, then connect again.
What if the fastboot can’t see the phone?
If the adb reboot bootloader and fastboot devices are not working: 1. Make sure the bootloader is unlocked (on the locked Mi). A2 Lite fastboot will show you FAILED (remote: unknown command)). 2. Try another one. USB-cable (preferably original from Xiaomi). 3. On Windows, disable driver signature: in the command line on behalf of the administrator, do: bcdedit /set nointegritychecks on Then restart your PC and reconnect.

Security: Risks of enabled USB debugging

Debugging mode gives you full access to the phone's file system and commands through ADB. This is useful for developers, but dangerous in the wrong hands.

  • 🕵️‍♂️ Data theft: through ADB You can copy photos, messages, passwords.
  • 🦠 Malware installation: an attacker can install an application with superuser rights.
  • 🔓 Unlocking the bootloader: if the phone is stolen, it can be easily reflashed.

How to minimize the risks:

  • 🔒 Turn off debugging when you don’t need it (in the developer menu).
  • 🖥️ Allow connection to trusted computers only.
  • 🔑 Use the complex PIN-code (not a pattern lock!) to lock the screen.
  • 🛡️ Install the app ADB AppControl from Google Play – allows you to manage rights flexibly ADB.

💡

Debugging by USB should be enabled only while working with ADB. After completing operations (firmware, backup), be sure to turn it off in the developer settings.

Additional settings for developers on Mi A2 Lite

In addition to debugging over USB, the developer menu has useful options for working with ADB:

  • 🔄 Do not turn off the screen – useful for long-term operations (for example, backup via adb backup).
  • 📶 Disable the absolute signal level – shows the real network level in dBm (useful for communication testing).
  • 🔋 Do not turn off background processes – prevents closure ADB-server.
  • 🖱️ Enable mouse pointer – allows you to control your phone from a PC via adb shell input.

For the Mi A2 Lite, the following are particularly important:

  • Unlocking OEM – is necessary to unlock the bootloader (will appear only after linking the Xiaomi account to the device).
  • Minimum width (dp) – allows you to emulate other screen resolutions (useful for testing application adaptability).

To reset all developer settings (e.g. before selling your phone):

  1. Go to Settings → System → Reset.
  2. Select Reset application settings.
  3. Confirm the action – this will remove all ADB permissions and reset the developer menu.

FAQ: Answers to Frequent Questions

Can I enable debugging over USB without a password on the lock screen?
No, on Mi. A2 Lite (as with all Android 8 devices)+) Developer menu and debugging USB require PIN-It's a security requirement of Google, if you forget your password, you'll have to reset your phone via fastboot).
Why did Android updates stop working?
Updates often reset ADB permissions. Solutions: In the developer menu, click Unauthorize debugging, then reconnect. Check if USB mode has reset to Charge Only (in the notification curtain). Reinstall Google USB Driver drivers on your PC.
How to turn on debugging if the phone does not turn on (hang on the logo)?
If Mi A2 Lite does not boot, but responds to a PC connection (vibrates or burns indicator), try: + Loudness down on 10 Connect your phone to your PC and type: fastboot continue If the device boots, turn on debugging in the standard way. If it doesn't work, run the phone through the Mi Flash Tool (you'll need an unlocked bootloader). ⚠️ Attention: Firmware via fastboot erases all data! Try to extract information using adb pull /sdcard/ (If the phone is sometimes loaded).
Do I need to unlock the bootloader to work with ADB?
No, USB debugging and unlocking the bootloader are different things. You can use ADB (for example, for backup or application installation) without unlocking. However, for: Install TWRP or custom firmware; Use fastboot flash commands; Get root rights; you will need to unlock the bootloader through the official Xiaomi website (link). On the Mi A2 Lite, this takes up to 720 hours of latency (according to Xiaomi rules).
Can I enable USB debugging via a computer if my phone doesn’t respond to touch?
If the sensor doesn’t work, but the phone turns on and responds to buttons, try: Connect the phone to the PC via USB. On your computer, open the terminal and type in: adb shell input text 1234 (where 1234 is yours). PIN-Then send the screen unlock command: adb shell input keyevent 82 (emulates pressing the button "Menu"), and then you can control the menu using the commands adb shell input tap X Y (tapa coordinates). If the sensor is completely dead, only the firmware via fastboot remains (the data will be lost).