How to enable debugging by USB if the Xiaomi screen is broken

The situation when the screen of the Xiaomi smartphone is broken, but the device continues to work, is one of the most stressful for the owner of the gadget. the black “glass” background hides the working system, which can be critical contacts, photos and documents. In such cases, the only hope is the USB debugging (ADB) function, which allows you to control the phone from the computer, but it requires pre-activation in the developer menu.

The main challenge is that the standard way to turn this option on requires visual interaction with the display, which is currently unavailable. If you have not previously activated the developer mode or turned on the corresponding switch, standard methods of connecting to the PC may not work, as the phone will go into “Charge Only” mode. However, there are several proven ways to bypass this barrier and access the file system.

In this article, we will look at scenarios ranging from mouse and adapter to Mi Cloud cloud services and specialized software. If the screen is completely black but the phone is responsive to sound and vibration, the chances of data recovery remain high. It is important to act consistently and not neglect to check the compatibility of the equipment, so as not to aggravate the situation with the damaged touchscreen controller.

Verification of the preconditions and status of the device

Before you start complex manipulations with the equipment, you need to conduct a thorough diagnosis of the current state of the smartphone Xiaomi. Often users mistakenly believe that debugging is turned off, when in fact it was activated automatically when you connected to the computer earlier. First, connect the device to the PC through USB-cable and listen carefully to the system’s sound signal or look at the notification indicator.

If your computer makes a characteristic device connection sound, and the Windows Device Manager defines Android ADB Interface or Xiaomi Composite ADB Interface, you're lucky that debugging is already on, so you can immediately switch to using the command line to retrieve data. However, if the system only defines the device as a Charger or Portable Device, additional activation techniques will be required.

⚠️ Note: If the smartphone screen is completely black and does not make sounds when connected, it is possible that not only the touchscreen, but also the display plume or power controller are damaged.

It is also worth checking whether the mode is on. USB-default configuration. On some firmware MIUI There's a setting that allows you to choose the action when you connect the cable. If the screen is at least partially responsive (artifacts or stripes are visible), try to touch or pump the notification curtain down and select File Transfer or Debugging. USB».

Use of USB-OTG and computer mouse

The most effective and affordable way to activate debugging without a working touchscreen is to use a USB-OTG adapter. This method allows you to connect a conventional computer mouse to the smartphone charging connector, turning the cursor into a full-fledged control tool. To implement this method, you will need the adapter itself (often bundled with modern models or inexpensively) and a wired USB mouse.

The process of connecting is simple: insert an adapter into the Xiaomi connector, and plug a mouse into it. If the screen is even slightly flashy or illuminated, you will see a cursor. Even if the image is missing, you can feel it, knowing the approximate location of the interface elements. After the cursor appears, you need to unlock the phone (entering the PIN-code or pattern lock with mouse) and go to settings.

☑️ Preparation for connection OTG

Done: 0 / 4

The algorithm of actions is as follows:

  • 🖱️ Find the Settings icon and click on it to open the system settings menu.
  • 📱 Go to the About Phone section and quickly click 7 times on the Version. MIUI», activate the developer mode.
  • ⚙️ Go back to the main settings menu, find “Advanced Settings” and select “For Developers».
  • 🔌 Activate the "Debugging by" switch USB» Confirm the action if necessary.

Once debugging is enabled, you can turn off the mouse and connect the phone to your computer to work via adb. This method works on most Xiaomi models, including Redmi and POCO, provided the charging connector is working.

💡

If you don’t have a wired mouse, some adapters OTG support the connection USB-It can navigate the menu using arrow keys and Enter.

Activation through the Mi Cloud service

If physical peripheral connectivity is not possible or the screen is not responsive at all, take advantage of the cloud capabilities of the Xiaomi ecosystem.Mi Cloud provides the “Find Device” function, which allows you to remotely control your smartphone, including the ability to log into debugging mode if the device was previously associated with an account.

To use this method, you need to go to the official i.mi.com website from any computer or other smartphone, log in to the same Mi Account that was used on the damaged device, and if the phone is connected to the Internet (Wi-Fi or mobile network), it will appear on the map.

The Mi Cloud functionRequirementsAbility to include ADB
Searching deviceInternet, GPSNo (location only)
Remote managementActive Mi Cloud, screen enabledYes (indirectly)
Erasure of dataPassword confirmationNo (data will be deleted)
Regime is lost.Locking the deviceNo.

Some firmware versions have a web-based remote screenshot or control feature, which can allow blind-activation, but the focus is on synchronization: if you have contact and photo synchronization enabled, you can recover data without debugging.

What to do if Mi Cloud is not enabled?
If you're not logged in to a Mi Account on your device, this method won't work, so you'll only have the option of OTG or replacing the display for visual control.

Application of third-party software and emulators

There is a category of software solutions that try to establish a connection with an Android device bypassing standard checks or exploit vulnerabilities in older versions. MIUI. One of the popular tools is the utility Vysor or Scrcpy, but they require that debugging USB For cases when it is turned off, you can try specialized utilities from manufacturers, such as Xiaomi. ADB/Fastboot Tools.

Some programs enable debugging via Recovery Mode. To enter it, you need to pinch the combination of the "Loud up" and "Power" buttons. In the Recovery menu, you control the volume buttons and choose from the power button. However, the standard Recovery menu of Xiaomi does not contain the option to enable ADB for user data, this feature is only available in a special engineering mode or via Fastboot.

Fastboot mode is triggered by pressing the Volume Down and Power buttons. By connecting the phone in this mode to a PC, you can try sending a command to reboot to Restore mode with debugging enabled, but this requires deep knowledge and can lead to data loss when resetting.

⚠️ Warning: Using third-party software from unverified sources to “break through” Android protection can lead to device lockdown or malware installation. Trust only official tools or verified open repositories.

If none of the software methods work, there is still the option of using Android Debug Bridge in conjunction with emulators, but this is more of a theoretical possibility that works extremely rarely on modern versions of Android due to enhanced security.

📊 Which method has been most effective for you?
USB-OTG adapter
Mi Cloud Service
Screen replacement
Third-party software

Working with ADB Command Line

Suppose you were able to enable debugging using one of the methods described above, you now need to configure your computer connection correctly. You need to have Platform Tools installed to work. After unpacking the archive, open the command line in the tool folder.

The first command to check the connection is adb devices: the first time you connect to a smartphone screen (if it shows anything), or the system, you should notice that you have debugging permission. If the screen is black, the only hope is that the permission was given earlier or the system will miss this step (which happens on old firmware).

adb shell


ls /sdcard/




pull /sdcard/DCIM/Camera/./backup_photos/

This set of commands will allow you to go to the device shell, the contents of internal memory, and copy the photo folder to your computer. Standard Linux-like commands are used to navigate the file system.

💡

Successful execution of the adb device command with the serial number display means that the data is accessed and you can start backing up.

Alternative methods and replacement of the display

In situations where software methods are powerless and data is critical, the most reliable, albeit expensive, way is to temporarily replace the display module. You do not need to buy the original screen; to extract data, any compatible module (even used or restored) will do as long as it transmits the image and reacts to touch.

Many service centers offer a “data recovery connection” service, where you don’t have to pay the full cost of a new screen, but only the work of the wizard and the rental of spare parts. AMOLED-screens where glass replacement is not possible or extremely difficult.

Also worth mentioning is the existence of HDMI-output stick devices (MHL/SlimPort) that allow you to display images from your phone to your TV. However, modern Xiaomi smartphones rarely support video transmission via USB-C, so this method only works on flagship models with support for USB 3.1 and higher.

Can I turn on the debugging if the phone is not turned on?
If the phone doesn't respond to buttons and doesn't vibrate when you connect the charger, it's not software-enabled to debug. It requires a diagnostic at a service center to check the power chain.
Is data erased when you connect your mouse via OTG?
No, connecting the mouse via USB-OTG is a safe procedure and does not affect the safety of data in the internal memory of the smartphone.
Does the method work with OTG on all Xiaomi models?
The vast majority of modern Xiaomi, Redmi and POCO models support USB-OTG, but on very old budget devices (released before 2016), this feature may not be hardware.