Why Xiaomi doesn’t connect to PC via USB, but charging is on

When you connect a Xiaomi smartphone to a computer, you see a lightning icon signaling the start of charging, but the computer is silent and does not display the device in the conductor, is one of the most common problems. Users often panic, believing that something has happened to the port or cable, but in most cases the problem lies in the software settings or specific behavior of the MIUI shell. Android defaults to “Charge Only” mode immediately after connecting to a new power source to protect your data from unauthorized access.

Ignoring this fact leaves files inaccessible, and attempts to sync or firmware through Fastboot or Recovery fail, and the computer simply doesn't receive a signal that the media device is there because the phone doesn't switch the data protocol, and understanding the reasons for this behavior is the first step to quickly solve a problem without going to the service center.

In this article, we will take a look at all the possible causes, from the commonplace cable to the hidden engineering settings, and provide a step-by-step algorithm of actions. You don't need a deep knowledge of programming, but attention to detail will be critical. We will look at both software failures and physical damage that can masquerade as software errors.

Primary Diagnostics and Physical Connection Check

Before you get into the wilds of system settings, you have to rule out the trivial physical reasons. Often, the cable that charges the phone well from the socket is not able to transmit data, because inside the cord, the veins that are responsible for transmitting the signal can be damaged, while the power veins remain intact. Visually, such a cable can look completely new and serviceable.

Try using another one. USB-It's also worth checking the port itself for dust, pocket pile, or oxidation, and mechanically locking the contacts can prevent you from correctly determining the type of connection. If you have the opportunity, connect the phone to another. USB-port, preferably located on the back panel of the system unit, directly to the motherboard.

  • 🔌 Try to replace the cable with a knownly serviceable analogue with data transmission support.
  • 🧹 Carefully clean the connector. USB Type-C soft brush or compressed air.
  • 💻 Connect the device to another port or computer to check.

It's important to understand that cheap gas station cables or accessories stores often have a simplified design where only two current contacts are soldered, and data transfer is technically impossible, no matter how long you wait, and if the situation remains the same after replacing the cable, we move to the software part.

Configure USB mode in the notification curtain

The most common reason Xiaomi isn't visible to a computer is because of the standard behavior of the Android operating system. For security reasons, when you connect to a new PC, the phone automatically selects Charge Only mode, which means that the electric current is coming in, but the logical bridge for the files is closed. You need to manually switch this mode.

Once you've connected the cable, unlock your smartphone screen and lower the top notification curtain, and you'll see the system message that you've got USB on, and you'll click on it and you'll open the mode selection menu, and that's where the setting you're looking for is hidden, without which your file manager won't see your computer.

⚠️ Warning: If you connect your phone to a public charger or an unknown PC, never change mode to File Transfer, as this may open up access to your personal data.

In the menu that opens, select File Transfer (or MTP). The computer should make a characteristic device connection sound, and a new disk with the name of your smartphone will appear in Windows Explorer. If there is no MTP option, it is possible that the phone has USB debugging enabled and the menu looks different, or the drivers are installed incorrectly.

Activation of the developer mode and debugging via USB

If the standard mode switching didn't help, or the mode selection menu doesn't appear at all, you need to activate the advanced system settings. MIUI Hidden a powerful tool for developers that allows you to manage behavior USB-Without this option, some types of connections may be blocked by the security system.

First, you need to activate the hidden menu. Go to Settings. → About the phone and find the item "Version" MIUI». You need to press this paragraph quickly. 7-10 Once in a row, until a pop-up message appears "You became a developer", and then a new section "Additional" or "Extended settings" will appear in the settings menu, where there will be an item "For developers».

Inside this menu, find the USB Debugging switch and activate it. The system will alert you to the risks, we agree. Also, this section may include the option "Default USB Configuration." Click on it and select "File Transfer (MTP)" that will cause the phone to always try to transfer data when connected, bypassing charging mode.

  • 📱 Make 7 quick clicks on the "Version" MIUI» menu-activate.
  • ⚙️ Find the “Developers” section in the advanced settings.
  • 🔌 Turn on the "Debugging by" switch USB» and select mode MTP.

Once you have debugging enabled, when you connect to your computer, you'll see a request on your phone's screen for debugging permission from that computer, and be sure to tick "Always Allow" and click "OK." Without that request, your computer won't get access to the file system, even if the drivers are installed correctly.

Installation and update of ADB drivers and interface

Often the problem is not the phone, but the computer’s operating system. Windows may not have the right drivers to identify an Android device in data mode, using a standard charging driver instead, especially for older versions of Windows or recent Xiaomi models.

To work properly, you need to install universal ADB drivers (Android Debug Bridge) that allow the PC to “communicate” with the phone in the command language. You can download the official Minimal ADB and Fastboot utility or install drivers through the official Xiaomi USB Driver tool. After installation, it is recommended to restart the computer.

If the drivers are already standing, but the device is defined as "Unknown Device," try updating them manually through Device Manager. Find your device (often marked with a yellow exclamation mark) in the list, right click → Update Driver → Select a driver from the list of available drivers. Select "MTP USB Device" or "Android Composite ADB Interface."

⚠️ Note: Do not install drivers from questionable aggregator sites, use only official sources or verified repositories to avoid malware introduction.

Sometimes it helps to completely remove the device from the controller. Turn off the cable, remove the unknown device from the list, then connect the cable again. The system will try to re-identify the hardware and install a clean driver. This method often solves the problem with the hung USB services on Windows.

MIUI specifics: USB settings and limitations

MIUI is known for its aggressive optimization and additional layers of protection that can block connection. Recent firmware versions have introduced the USB Protection feature, which requires you to enter a password or unlock the screen every time you connect to transfer data. If the screen is turned off or locked, data will not be transmitted.

Also, check the settings in the Developer section for the USB Configuration item. In some versions of MIUI, it may be forced to set the value "Charge Only"; change it to MTP. In addition, the "MIUI Optimization" feature in the developer menu sometimes conflicts with the ADB drivers. Try to disable it, but be careful: this can change the interface of some system menus.

What is MIUI Optimization and should it be turned off?
MIUI Optimization is a set of system improvements that speed up the interface and save battery life. Disabling this feature can change the view of the settings menu (and will become standard Android) and reset some application resolutions. Disable only to diagnose connection problems, after checking it better return the settings back.

Another important point is Safe USB mode. If it's on, the phone won't transmit data until you unlock the device and confirm the action. Make sure the screen is active when you connect. Also check if the Invisibility mode or file manager hiding mode is on, although this affects the visibility of files rather than the device itself.

Diagnostics through command line and ADB

For advanced users, a great way to diagnose is to use the command line, so if the computer sees the phone at the ADB level, then the physical connection and the underlying drivers are working, and the problem may be access rights or the file system, and this allows you to weed out problems with ports and cables.

Open the command prompt (cmd) on behalf of the administrator. Go to the folder where the ADB is installed, or write a path to it. Enter the command adb devices. If a device with a serial number and a status "device" appears on the list, then the connection is established. If the status is "unauthorized", look at the phone screen and confirm debugging.

adb devices


List of devices attached




7a8b9c0d device

If the list is empty or the device is hanging offline, the problem is deeper. Try restarting the ADB server with the adb kill-server followed by adb start-server command. This will force the PC-phone service to restart. Often this helps shake up the hung connection.

📊 What is the result of the adb device team?
Device found (device)
Device found (unauthorized)
List empty.
Error of execution of the command

Table of common errors and decisions

For convenience, we're going to organize the main symptoms and the ways to treat them, and this table will help you quickly navigate if the previous steps have failed, and each situation requires a personalized approach, but 90 percent of the problems are solved by the methods described above.

Symptoms.Probable causeMethod of decision
The phone is only charging, the menu does not pop up.Cable (no data lines) damaged or port contaminatedReplace the cable, clean the port, check in Device Manager
The computer makes a connection sound, but the disk does not appearMTP mode not selected or drivers not installedSelect “File Transfer” in the curtain, update drivers manually
The device is defined as an “Unknown Device”.Driver conflict or USB service failure in WindowsRemove the device from the controller, restart the PC, install ADB
ADB sees the device as unauthorizedNot confirmed on the phone screenUnlock the screen, press "Allow" in the dialog window

If none of the methods worked, perhaps the problem lies in the hardware of the smartphone itself — the power and data controller or the USB connector itself failed. In this case, the software methods are powerless, and a visit to the service center is required to diagnose and replace the plume or connector.

FAQ: Frequently Asked Questions

Why does a computer see a phone but not open folders?
Chances are, the phone screen didn't have a validated data permission. Unlock the device and click "Allow" in the pop-up window. Also check if Charge Only is on.
Can I transfer files without a USB cable?
Yes, you can use the built-in Mi Drop feature (Xiaomi Share), cloud services (Google Drive, Mi Cloud), or third-party applications like Send Anywhere and AirDroid that work over Wi-Fi.
Does the enabled flight mode affect the USB connection?
Usually no, flight mode disables wireless modules but does not affect wired connection. However, in rare cases, system failures can block ports, so try turning off and on flight mode to reboot network services.
What if the phone is only connected when it is off?
This is a sign of a serious software failure or damage to system files. Try booting up in Recovery mode and resetting your settings (Wipe Data), saving important data through Mi Cloud if possible.

☑️ Final check before going to the service

Done: 0 / 5

💡

Use the original cable from the kit – it is guaranteed to have all the necessary contacts for fast charging and data transfer at high speeds.

💡

In 80% of cases, the problem is solved by replacing the cable or switching the mode in the notification curtain from Charging to File Transfer.