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

There are situations in which someone, normally a thief, will constrain you to giveaway your PIN. Needless to say, together with your PIN goes lots of you have on your phone. You could always try to protect the most important apps and data with something like MIUI’s app lock. However, to defend against that kind of adversary, that approach could 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.

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 difference to AOSP’s. When you unlock your phone, MIUI takes you to the default or to the secondary user depending on whose PIN you type. Cool, uh? As far as I remember, that isn’t how AOSP behaves. There, you need to unlock the current user in order to switch to another one, through the notification shade.

Knowing this, we can use it to further protect our personal data.

Just set the Second Space, create the new PIN as asked, and don’t place any personal data in there. Go on with your life. Now, if you happen to be ilegally constrained to say your PIN, just give them the secondary one. The phone will unlock, making them probably happy, but they still won’t have access to any of your data and apps. Isn’t it nice?

I’ve only experienced two caveats. One is that, If you have been using the main user normally and then enters the Second Space pin, the phone will usually take a somewhat longer to unlock. And the other is that sometimes the Second Space will get a bubble informing that there are some notifications for the main user. The actual notifications aren’t shown, but this could give away the trick. Hopefully there’s a way to disable it.

I hope this helps someone.