Fix problems with MIUI on installing apps from Android Studio

ADB May 16, 2017

Hello folks, I am back with yet another post in the Solving Technical Series. I know I have been writing too many posts on “Solving Technical” series over the past couple of months. Please bear this for a month more, there are surprises other than this coming up soon within the next couple of months, or so.

To begin with, MIUI is a ROM based on Android, and available widely for Xiaomi devices. Unfortunately, this has no resemblance to stock Android, as almost whole of the system has been modified and tweaked with custom options. More modifications were introduced in the Marshmallow builds, where the system was automatically encrypted.

The modifications also include lot more changes to the way MIUI devices on Android Marshmallow are used as devices for debugging. Going to settings and enabling USB Debugging and Install via USB Options will simply not work on MIUI Marshmallow devices. There are certain steps to be followed to get Debugging working properly on these devices.

In today’s tutorial, I will be using my Redmi Note 3, on MIUI 8 Marshmallow Global Beta build (7.4.22). Following are the steps on Stock Android.


  1. Open Settings -> About
  2. Tap Build Number 7 times. This enables Developer Options.
  3. Go back. Select Developer Options
  4. Enable USB Debugging and Verify over USB options. Done!


  1. Go to Settings -> About Phone
  2. Tap on MIUI version 7 times. This enables Developer Options
  3. Sign in with your Mi Account, if not already done so.
  4. Go to Settings -> Additional Settings -> Developer Options
  5. Enable the following options : OEM Unlock (if present on your device) , USB Debugging , Install via USB, Verify apps over USB
  6. Disable “Turn on MIUI optimizations” (PS. This cannot be disabled if you are not signed in with your MIUI account). It will ask you to reboot your phone (Shown Below) (PS. There is a bug in this build where it still shows “Turn on” instead of “Turn off” , but since its a beta build, Deal With it)
  7. Go to Settings -> Additional Settings -> Privacy.
  8. Enable the Unknown Sources option. Done!

As you can see from above steps, not all changes are good, specially if you are a developer. Modifications with time to such developer options are one of the reasons why developers prefer custom ROMs over their stock build. For enabling one setting, we have to go and enable a few more settings, which is ridiculous on MIUI’s part. Such optimizations are not always good.

I’d also request Xiaomi to make these affordable devices much better for developers.