In this post, I want to share an idea that I had last year and may help secure your data on Xiaomi phones.

The scenario

You may be faced with a situation in which someone, normally a thief, constrain you to give away your PIN. Needless to say, together your PIN, he’ll have access to most of what you have on your phone.

A first approach

To protect against that kind of adversary, a first approach would be to add a second layer of protection to your most important apps and data.

For example, for apps you can use MIUI’s App Lock. This asks for your fingerprint or face unlock before opening some apps. For data, you could use MIUI’s password protection for specific folders.

However, that approach can quickly get out of hand, and make a pain to user your own phone. The strategy I will share protects your data further, while not impacting a lot on your daily phone use.

My solution

So you might know that MIUI has a feature called Second Space. That’s basically Android letting you create a second user for your device.

However, Xiaomi’s implementation has an interesting feature that is absent on AOSP - and I guess for many manufacturers. Whenever you unlock your phone, MIUI can take you to the first or to the second space depending on which PIN you type. Cool, uh?

On AOSP (at least until Android 9), you need to unlock the current user in order to switch to another one, through the notification shade.

Knowing that MIUI feature, we can use it to further protect our personal data.

Hands on

So let’s set it.

  1. Open the Settings. The Second Space configuration is placed in a different place depending on your MIUI version. On MIUI 11, it is under Special features -> Second Space. If you can’t see it, try searching for “Second Space” on the search bar.

  2. Tap “Turn on Second Space”, wait for the completion, and then press “Continue”.

  3. A screen will show up asking if you want to switch between the spaces using a password or using a shortcut. Press “using a password”.

  4. You’ll be asked for your first space password. Enter it, and you’ll be asked to set the password for the second space. Obviously, use a different one.

  5. You can skip setting a fingerprint.

  6. Good. By now you should have landed on the Second Space. We’ll further hide the fact that this isn’t the main space, doing the following:

  • Go to Settings -> Special Features -> Second Space (or wherever it is placed on your MIUI version).
  • Under “Second Space Settings” disable both options: “Home screen shortcut” and “Show notifications from First Space”.
  • Under “Other settings” disable “Second Space icon”.

And we are done.

Now you go on with your life, and just don’t place any personal data in the Second Space.

If, at any time, someone constrains you for your PIN, just give the secondary one. The phone will unlock, making them probably happy, but without any access to your data and apps. Isn’t it nice?

Caveats

So far, the only caveat I’ve experienced is the following. If you have been using your phone normally (in the First Space) and then coldly enter the secondary pin, the phone will take a longer time to unlock.

I hope this helps someone.