Error “Search for a device unexpectedly closed” on Xiaomi: reasons and 7 ways to solve

You tried to connect Xiaomi smartphone to your computer through Mi PC Suite, enable debugging mode by USB Or activate Find Device, but instead of the expected result, you see a message that says, "Device search is unexpectedly closed." This error can appear on both the phone screen and in the program on the PC, interrupting sync, backup, or even blocking access to Mi Account features.

The problem is typical for Xiaomi, Redmi and POCO base MIUI (Especially versions 12-14), but the reasons are not always obvious: in some cases, security settings are to blame, in others, conflicting services Google, and sometimes the error masks more serious malfunctions in the firmware. In this article, we will analyze all possible scenarios why a failure occurs, and offer proven ways of eliminating – from basic to advanced, including working with the system. ADB and reset.

Before you go to the instructions, make sure that the problem is not related to temporary failures of Xiaomi servers. To do this, check the status of services on the official website or on Xiaomi Twitter.

What does the error mean: “Search for the device is suddenly closed”?

The message “Device search closed unexpectedly” appears when the system is closed. MIUI cannot complete the scanning process or connect the device to a Mi Account, computer or other gadget:

  • 🔌 Connecting to PC via Mi PC suite MTP-regime;
  • 🔍 Find Device (including remote lock);
  • 📱 Synchronize contacts, notes and backups;
  • 🔄 Update the firmware through OTA (If the error is related to servers).

In most cases, the failure occurs due to:

  1. Conflict of access rights between MIUI and Google services;
  2. Unstable Internet connection (especially when using the Internet) VPN proxy);
  3. Older version of Find Device or Mi PC Suite;
  4. The com.miui.cloudservice (responsible for cloud synchronization) service is out of order.

Less commonly, the problem lies in hardware limitations, such as if you’re using a non-original USB-Type C cable or connecting to a port. USB 3.0 on a PC that conflicts with the Xiaomi protocol.

📊 What function did you have an error with?
Connection to PC
Search for the device (Find Device)
Synchronization of data
Firmware update
Another problem.

Reason 1: Conflict with Google Services

Starting with MIUI 12, Xiaomi tightened security policies, leading to frequent conflicts with Google Play Services.If your device has outdated versions of Google services installed or they work with errors, the system can block access to Find Device and Mi features. PC Suite, issuing a message about the unexpected closure.

To test this hypothesis:

  1. Open Settings → Applications → Application Management;
  2. Find Google Play Services and check the version.
  3. If the version is outdated (for example, 23.18.13 with the current 24.0)+), Update it through Google Play.

If the update doesn’t help, try clearing the cache and service data:

  1. Go to Settings. → Annexes → Google Play Services;
  2. Press Warehouse. → Clear the cache and Clear the data;
  3. Repeat the same for the Google Play Store app;
  4. Reset the device.

💡

If the error persists after cleaning the cache, try temporarily disabling battery optimization for Google Play Services: → Battery → Optimizing the battery → All applications → Google Play Services → No restrictions.

Reason 2: Mi Account or Xiaomi Cloud Issues

The error is often related to a misfunctioning Mi Account, especially if:

  • 🔄 You have recently changed your password or email;
  • 🌍 Use it. VPN/proxy (Xiaomi servers can block suspicious servers) IP);
  • 📱 There are several Mi accounts on the device;
  • ⏳ It’s been over 30 days since the last authorization.

For diagnosis:

  1. Open Settings → Xiaomi account;
  2. Check that you are authorized (if not, log in again);
  3. Press Sync and make sure all switches are active.
  4. If the sync is disabled, turn it on and restart the phone.

If the problem is VPN/proxy:

⚠️ Note: Xiaomi servers are blocked IP-addresses from certain regions (e.g. Russia, Belarus, Iran) if you use VPN To get around the restrictions, try connecting to servers in Hong Kong, Singapore or Germany – they are less likely to cause errors.

Also check the status of the Xiaomi cloud:

ServiceHow to checkWhat to do when a failure occurs
Mi CloudOpen i.mi.com in your browserIf the site is not loaded, wait for the servers to recover.
Find DeviceGo to Settings. → Memory. → BackupTurn off and turn on the device search again
Mi PC SuiteRun the program on PCUpdate to the latest version or reinstall

Reason 3: Device Search app malfunctions

Find Device app (built into the MIUI) may fail because of:

  • 📦 Damaged files after updating;
  • 🔄 Conflict with other services (e.g. Google Find My Device);
  • 🛠️ Rooting or modifying the system (if you have installed custom firmware).

To correct:

  1. Open Settings → Applications → Application Management;
  2. Find the Device (Find Device)
  3. Press Warehouse. → Clear the cache and Clear the data;
  4. Reboot the phone.

If this doesn’t work, try disabling and turning the function back on:

  1. Go to Settings. → Xiaomi account → Mi Cloud;
  2. Turn off the device search switch;
  3. Wait 1-2 minutes and turn it back on.
  4. Confirm the action through SMS or email if required).

Clear the app's cache|Reboot the phone|Disable/enable the function in Mi Cloud|Check the authorization in Mi Account|Update MIUI last-minute-->

Reason 4: Malfunctions USB-plug-in

If an error occurs when connecting to a PC, the problem may be:

  • 🔌 cable USB (damaged or not original);
  • 🖥️ Computer drivers;
  • 🔄 Connection mode (e.g., the phone is defined as Charging, not File Transfer).

For diagnosis:

  1. Try another cable (preferably original from Xiaomi)
  2. Connect the phone to another USB-port (better) USB 2.0);
  3. On PC, update the drivers through Device Manager:
Start → Device Manager → Portable Devices → [Your Xiaomi] → Update the driver

If Windows does not find the driver, download them manually from the official website:

  • For Xiaomi/Redmi: Mi PC Suite;
  • For POCO: POCO Support.

⚠️ Note: If you are using MacOS, install Android File Transfer from Google's official website. Linux may require manual adjustment of udev rules to recognize the device.

Reason 5: Firmware failures or update conflict

The “Device Search Unexpectedly Closed” error may be a consequence of:

  • 📱 Failed update MIUI (For example, interrupted loading OTA);
  • 🔧 Version conflict (if you are back on the old firmware);
  • 🛠️ Damage to system files (for example, after rooting).

To check:

  1. Open the Settings. → The phone. → Version. MIUI;
  2. If an update is available, install it.
  3. If the error occurs after the update, try resetting the settings:
Settings → Additional → Recovery and Reset → Resetting settings

For advanced users: if the failure occurred after rooting or installing custom firmware, check the integrity of system files through ADB:

adb shell pm verify-installer --all

If the command returns errors for com.miui.cloudservice or com.xiaomi.finddevice, you will have to reflash the device via Fastboot.

How to stream Xiaomi through Fastboot?
1. Download the firmware for your model from the Xiaomi Firmware Updater website. 2. Unpack the archive and place the file flash_all.bat Fastboot Tools folder. 3. Connect your phone in Fastboot mode (press the Power). + Vol− off-phone). 4. Launch it. flash_all.bat on behalf of the administrator. ⚠️ All data will be deleted!

Reason 6: Blocking with antivirus or firewall

Sometimes third-party antiviruses (e.g. Avast, Kaspersky) or Windows firewall block the connection between the phone and the PC, perceiving it as suspicious activity. PC Suite or Find Device.

To rule out this cause:

  1. On PC, temporarily disable the antivirus;
  2. Add Mi. PC Suite in exception of firewall:
Control Panel → Windows Firewall → Allow interaction with the application
  1. On your phone, turn off the security. MIUI:
Settings → Privacy → Special Permits → Protection of MIUI → Disable

If the error has disappeared after the protection is turned off, add Mi. PC Suite and Find Device on the whitelist of antivirus.

Reason 7: Hardware malfunctions

In rare cases, the problem lies in physical injuries:

  • 🔌 USB-Type C port (oxidation, pollution, mechanical damage);
  • 📶 antenna Wi-Fi/Bluetooth (If an error occurs during wireless synchronization);
  • 🔋 Power Controller (can affect stability) USB-connection).

For diagnosis:

  1. Check the port. USB for the presence of foreign objects or corrosion;
  2. Connect your phone to another charger – if charging is unstable, the problem is in the port.
  3. Try connecting to your PC via wireless debugging (ADB over Wi-Fi):
Settings → About Phone → MIUI version (7 times press to enable developer mode)


Settings → Additional → For developers → Wireless debugging

If you suspect an antenna malfunction (for example, it does not catch Wi-Fi well), check the signal in Settings. → Wi-Fi → Network diagnostics, if the signal level is lower -70 dBm may need repairs.

💡

If the error only occurs when you connect to a PC, but all other functions work normally – the problem is 90% of the time with the cable, port or drivers, not with the firmware.

FAQ: Frequent questions by mistake "Device search unexpectedly closed»

🔍 Why the error only appears when you connect to a particular PC?
Chances are that the drivers are outdated on this computer, or the firewall is blocking the connection. Try updating the drivers through Device Manager or temporarily disabling protection.
📱 Can I correct the error without resetting the settings?
Yes, in most cases, cleaning the cache of Find Device and Google Play Services apps, as well as reconnecting your Mi Account, helps.
🔌 What to do if the phone is not detected on any PC?
Check the cable and port USB If the problem persists, try connecting through the phone. ADB via Wi-Fi or flash the device through Fastboot.
🌍 The error occurred after the region change in Mi Account?
Xiaomi blocks some features when you change region: try to return the previous region in your account settings or wait 30 days (the restriction period).
🛠️ Could the error be related to rooting?
Yes, if you have modified system files associated with com.miui.cloudservice. Try recovering original files via Magisk or reflash the device.