USB Debugging Mode is really put into Android for developers but us enthusiasts can use it for a number of different things. On most devices, this requires us to enable Developer Mode and into flipping a toggle. However, Xiaomi does things differently so let me show you how to enable USB Debugging Mode on MIUI.
There are a number of different things that we can do when USB Debugging Mode has been enabled. For instance, we can type “adb reboot recovery” or “adb reboot fastboot” while we are in the Android OS to be taken into those special boot modes. But, us enthusiasts have learned we can change core Android OS permissions this way as well.
Why a Second Toggle to Turn on USB Debugging?
That’s actually a good question and it’s something that has really only become popular within the Android community over the last couple of years. For instance, there’s a popular application that monitors your battery life usage called BetterBatteryStats. With Android 4.4 KitKat Google felt it was best to limit the access 3rd-party applications had to certain pieces of information.
In this case, it was the information that BetterBatteryStats had been collecting. Since that update was rolled out BetterBatteryStats has required root access in order to function properly (since it needed that secured data). But then along came some ADB commands that let you install BetterBatteryStats without having root access and all was well again.
As you can see, this is fundamentally different than simply booting into Fastboot Mode or Recovery Mode. It changes which apps have access to certain parts of data. For most OEMs, this can only be enabled if the user has logged into Android (through a PIN, pattern, password, fingerprint, iris scan, etc.). The thing is, Xiaomi feels this isn’t enough.
So, if you have a Xiaomi device with MIUI installed on it then let me show you how to fully enable USB Debugging Mode access.
How to Enable USB Debugging Mode on MIUI Xiaomi Devices
- First you will need to enable Developer Mode
- You will then want to go to the main page of the Settings application
- Scroll down and tap on the Additional Settings option
- Tap on the Developer Options menu
You may have to scroll down a bit to see this
- Then scroll down to the Debugging section
- You will want to tap on the toggle for the regular USB Debugging option
- Tap on the OK button at the bottom to confirm
This is just one level of USB Debugging Mode though
- Now scroll down a little more and tap on the toggle for the USB Debugging (Security Settings) option
- You will have to wait and confirm through three different warning pop-up messages
If the toggle enables properly then you won’t see an error message and can skip to Step #12
- Although, you will get an error message here if you do not have your SIM card inserted
- So be sure your SIM is in the phone if you want to fully enable USB Debugging Mode on Xiaomi MIUI devices
- With the SIM card in, after you tap the toggle mentioned in Step #8 you will not get an error message after it says Allowing
You can take your SIM card out of the phone after you have fully enabled USB Debugging Mode
Again, you can call Xiaomi paranoid by adding this layer of security or you can look at it as the company keeping their customers protected. Personally, I think this is too much and don’t really understand why Xiaomi would put this type of restriction in place.
Whether it is one SIM card or two, you still need to have the PIN, pattern, or password of the phone so that you can bypass the lock screen. I realize that Xiaomi has issues with resellers putting malicious apps on their phone but the company could go about this in a much better way.
What Are Xiaomi’s Alternatives?
First of all, Xiaomi could force the phone to do a factory reset on the first boot of the phone out of the box. This will wipe out any type of regular applications that have been installed and erase any special permissions that have been granted via USB Debugging Mode on MIUI.
Hackers, and nefarious people tend to be clever though, so they could get by this by unlocking the bootloader ahead of time (something that Xiaomi’s waiting period is supposed to prevent) and then installing the malicious app even after it has finished the factory reset.
But that’s the thing. If the bootloader is already unlocked then restricting USB Debugging Mode with a second toggle and requiring a SIM card isn’t going to stop anything. If the phone has already been compromised then they can bypass this secondary toggle without the user even knowing.
Just Warn the User at Boot
This is why I like how OnePlus has implemented their unlocked bootloader warning message. If a customer buys an Xiaomi phone from a reseller that has unlocked the bootloader then they should get this big warning screen each time they boot it up. This would prevent any suspicion that someone may have.
It would also alert the user that the reseller has tampered with their phone and that they need to get a refund or a replacement. So the factory reset on first boot would fix any issues caused by apps that have been granted special permissions via USB Debugging Mode.
And then the big warning screen will alert the user that someone is trying to bypass that security layer. I dunno, I’m not a security expert in any way but other, major OEMs who are outselling Xiaomi don’t have to add in this additional security layer. So it seems excessive to me.
But at least you now know how to turn on USB Debugging Mode on Xiaomi MIUI devices.
If this tutorial helped you in any way, please consider donating via PayPal, Patreon, Cryptocurrency, or GoFundMe. If you can't afford to donate then sharing this on social networks such as Facebook, Twitter, XDA, forums, etc. will also help a lot. I would also appreciate suggestions for Android tips and tutorials that you would like to see in the future.