Connecting Xiaomi Redmi Phone to Android Studio: A Complete Guide from Drivers to Debugging

Developing Android mobile apps requires testing on real devices β€” emulators don’t always accurately reproduce the behavior of a smartphone. If you own a Xiaomi Redmi (be it a Redmi Note 12, Redmi 10 or another model), you’ve faced the peculiarities of connecting to Android Studio, from the lack of a device in the list to ADB authorization errors. This problem is due to the MIUI security policy, which blocks debugging by default.

Unlike Google Pixel or Samsung devices, where it is enough to turn on Developer Mode, Xiaomi smartphones require additional manipulations: unlocking OEM Unlock, confirming your Mi Account account and installing proprietary drivers. In this article, we will analyze all the steps from preparing your phone to the first successful launch of an application through Android Studio, as well as solving typical errors such as unauthorized device or no permissions.

1.Preparation of the phone: Enabling the Developer Mode

The first step is to activate the hidden menu for developers. On Xiaomi Redmi smartphones, this process is standard for all models based on MIUI 12/13/14, but has nuances depending on the firmware version.

  • πŸ“± Go to Settings β†’ The phone.
  • πŸ” Press 7 times in a row on the item Version MIUI (A notice will appear saying, β€œYou have become a developer!")
  • πŸ”’ Return to the main Settings menu – there will be a new section Additional Settings β†’ For developers

If there is no MIUI version (relevant for some regions), try clicking on the Build Number or Android Version. On Redmi models with Global ROM, the path may differ: Settings β†’ System β†’ About Phone β†’ Kernel Version.

⚠️ Note: Some Xiaomi devices require a reboot after activation of the developer mode. USB and Unlock. OEM may not show up.

πŸ’‘

If after 7 taps nothing happens, check if the phone is Child Mode (child mode) or a third-party launcher that blocks system settings.

2. Set developer settings on Xiaomi Redmi

Once the developer mode is activated, you need to enable key options to work with Android Studio. Open the Developer section (path: Settings β†’ Additional settings β†’ Developers) and follow the following steps:

  • πŸ”§ Turn on Debugging. USB (USB debugging)
  • πŸ”“ Activate Unlocking. OEM (OEM Unlocking) is a must for custom recovery or rooting firmware
  • πŸ”„ In the Configuration section USB By default, select File Transfer (MTP)
  • πŸ›‘οΈ Turn off the check. MIUI down USB (MIUI Optimization β†’ Turn off) if it interferes with debugging

Pay special attention to the item Unblocking OEM. New Redmi models (e.g. Redmi Note 13 Pro)+) This option can be blocked until you link the device to your Mi Account and confirm the developer’s rights through the SMS. More about this in the next section.

Option.MeaningExplanation
USB debuggingIncluded.Allows Android Studio to interact with the device
Unlocking the OEMIncluded.It is necessary to unlock the bootloader (bootloader).
USB configurationMTP (or PTP)Data transfer mode compatible with ADB
Checking MIUI on USBDisconnected.Otherwise, the system will request confirmation each time it connects.

⚠️ Note: If the option is Unblocked OEM Inactive (grey), meaning that the device is blocked by the manufacturer, you will need to link Mi Account and wait 7-15 days to unlock it (Xiaomi policy for new devices).

Redmi Note 10/11/12|Redmi 9/9A/9C|Redmi K50/K60|Redmi A1/A2|Another model-->

3. Install ADB drivers and set up Android Studio

Even if the Xiaomi Redmi phone is properly configured, without the ADB (Android Debug Bridge) drivers, Android Studio will not be able to recognize it. Here is a step-by-step guide for Windows (for macOS/Linux, the steps are similar, but without installing drivers):

  1. Download Platform Tools: πŸ–₯️ Go to the official website of Android Developers πŸ“₯ Download the archive. platform-tools-latest-windows.zip (For other OSes, select the appropriate version) πŸ“ Unpack the archive into the root of the disk C:\ (for example, C:\platform-tools\)
  2. Install drivers for Xiaomi: πŸ”Œ Connect your phone to your PC through USB-cable (preferably original) πŸ–±οΈ In Device Manager, find a device with an exclamation point (usually an Android Phone). β†’ Android ADB Interface) πŸ”„ Update the driver manually, specifying the path to the folder C:\platform-tools\

Check the connection via the command line:

cd C:\platform-tools


adb devices

If the device is displayed with unauthorized status, confirm debugging on the phone screen.

For users of macOS or Linux, it is enough to install platform-tools through package managers:

# For macOS (via Homebrew)


brew install android-platform-tools




For Linux (Debian/Ubuntu)



sudo apt install adb fastboot

Drivers installed without errors|The phone is determined in the Device Manager|Adb devices show the serial number|On the phone screen appeared window confirmation debugging-->

4 Unblock Mi Account and Confirm Developer Rights

One of the unique features of Xiaomi smartphones is that it links the device to a Mi Account to unlock the bootloader. Without this step, the OEM Unlock option will remain inactive, and some ADB features will be limited.

  1. Create or sign in to Mi Account: πŸ“± Go to Settings. β†’ Accounts. β†’ Mi Account πŸ”‘ Register or log in (use a valid email)
  2. Activate Developer Rights: πŸ”§ Back to Settings β†’ Additional settings β†’ For developers πŸ”“ Click on Mi Unlock Status and link the device to your account. ⏳ Wait 7-15 days (depending on the model) and then you have the option. OEM Unlock will become active

If you bought a Xiaomi Redmi phone "with your hands", make sure that the previous owner untie his Mi Account. Otherwise, unlocking the bootloader will not be possible without his participation.

adb shell getprop ro.boot.verifiedbootstate

The value of orange means that the bootloader is unlocked, green is blocked.

What to do if Mi Account is not confirmed?
If you see an error when linking your account, "This device is already linked to another account," then the previous owner did not untie it: 1. Ask the seller to untie the device via the Mi Account website ("Find Device" section"). 2. If you cannot contact us, contact Xiaomi with a purchase check (for official dealers). 3. On some models, resetting via Fastboot helps (but it will delete all data!): fastboot oem clean_all

5. Solving Typical Connection Errors

Even after setting up correctly, errors can occur, and here are the most common problems and solutions for Xiaomi Redmi:

Mistake.Reason.Decision
device unauthorizedNo confirmed debugging on the phone.On the phone screen will appear a request – click β€œAllow”
no permissionsProblems with drivers or adbReinstall the driver manually or run adb kill-server, then adb start-server.
offlineUSB-cable does not support transmission of dataUse the original cable or check the USB port on your PC
device not foundADB does not see the deviceCheck if debugging is enabled and if drivers are installed correctly

If you can’t see your device after connecting to Android Studio, follow these steps:

  1. πŸ”„ Reset it. ADB-Adb kill-server adb start-server
  2. πŸ”Œ Turn it off and plug it back in. USB-cable (try another port)
  3. πŸ“± On the phone in the section For developers, turn off and turn on debugging by USB
  4. πŸ–₯️ In Android Studio, go to File β†’ Sync Project with Gradle Files

⚠️ Note: Some Redmi models (e.g. Redmi) 9T) post-refresh MIUI You reset your developer's settings. Always check them before you start.

πŸ’‘

If Android Studio doesn’t see the device, but Adb devices show it correctly, the problem is setting up the development environment. Go to Run β†’ Edit Configurations and select the target device manually.

6 First launch of the app on Xiaomi Redmi

Once you've set up everything, you just have to start the project on your device. Here's how to do it in Android Studio:

  1. Connect the phone: πŸ”Œ Use it. USB-cable (preferably from the set) πŸ“± On the phone screen, select File Transfer Mode (MTP)
  2. Select your device in Android Studio: πŸ–₯️ In the top toolbar, click on the drop-down list of devices πŸ“± Your Xiaomi Redmi should appear in the list (e.g. Redmi Note 12) 5G (Android 13))
  3. Launch the application: ▢️ Press the green Run button (or Shift) + F10) ⏳ Wait for the project assembly and installation APK device

If you have an Installation failed error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED, check the file AndroidManifest.xml For Xiaomi devices, you may also need to disable optimization MIUI:

adb shell settings put global hidden_api_policy 1

This command temporarily disables MIUI restrictions on calling hidden APIs.

7. Optimization of performance in debugging

Debugging on a real Xiaomi Redmi device can slow down due to background MIUI processes.

  • πŸš€ Turn on Do not turn off the screen in the developer settings
  • ⚑ Turn off window animation, transition animation and animation duration (set the value Animation disabled)
  • πŸ—‘οΈ Clear the cache. MIUI through settings β†’ Memory. β†’ Clear the cache
  • πŸ”‹ Activate High Performance Levels in Battery Settings for Android Studio

For models with a Snapdragon processor (like the Redmi K60), it is also useful to enable Force GPU Rendering in the developer settings.This will speed up the rendering of the interface, but can increase battery consumption.

πŸ’‘

If the app is slowing down on Xiaomi Redmi, try disabling MIUI Optimization in the developer settings.This will remove some system limitations, but may affect stability.

FAQ: Frequent questions about connecting Xiaomi Redmi to Android Studio

πŸ”Ή Why Android Studio doesn't see my Xiaomi Redmi, even though debugging is enabled?
Check the following points: Are drivers installed? ADB (Device Manager should not have exclamation points. MTP (Not Charging? Is the Debugging option activated USB and whether you've confirmed access on your phone screen. ADB-server (check with the adb device command). If the problem persists, try another one. USB-cable.
πŸ”Ή How to unlock OEM Unlock if the option is inactive?
This means that the device is locked by the manufacturer. You need: Link Mi Account to the phone (Mi Unlock Status section). Wait 7-15 days (duration depends on the model). After waiting, the OEM Unlock option will become active. Some models (for example, Redmi Note 11) require additional confirmation via SMS.
πŸ”Ή Can you connect Xiaomi Redmi to Android Studio without unlocking? OEM?
Yes, for normal application debugging, unlocking OEM Unlock is not necessary. It is only necessary if you plan: Install custom firmware (LineageOS, Pixel Experience) Get root rights through Magisk Unlock the bootloader for system modifications For standard development, it is enough to enable debugging over USB.
πŸ”Ή Why does the "device unauthorized" error occur when connecting"?
This error means that the phone doesn't trust your computer.Solution: Disable and reconnect. USB-The phone screen will be asking "Allow debugging by USB?" β€” If the request does not appear, check if debugging is enabled in the settings. Delete the old authorization keys: adb kill-server rm ~/.android/adbkey* # for macOS/Linux del %USERPROFILE%\.android\adbkey* # Windows
πŸ”Ή How to connect Xiaomi Redmi over Wi-Fi for debugging?
For wireless debugging: Connect the phone to USB and do it: adb tcpip 5555 Turn it off. USB-Connect to Wi-Fi: Adb connect IP_ARESS TELEFON:5555 (know IP You can set up β†’ The phone. β†’ Status) Disadvantage: each new connection to the network will have to repeat the procedure.