1

My android is multi-user. It is crazy to encrypt the entire device. How do I encrypt just a single user's account?

More specifically, the only thing I am trying to protect is my gmail account.

I know it should be possible, as I have such a feature on my Debian Gnu/Linux laptop. It would however require integration with the login manager.

2

Afraid not. We're talking about "device encryption" here, which – as the name suggests – encrypts the "device" (in this context, the "storage device"). All users have their data on the same storage device – so either you encrypt it or not.

While it's not possible to "encrypt a single user", there are possibilities to encrypt selected files and directories, which might be an acceptable alternative for you.

2
  • While this is technically a valid answer to the question, as originally stated. My experience is that these answers are not only useless, but often wrong. – ctrl-alt-delor Jul 5 '15 at 14:54
  • Thanks for the flowers, @richard – but put that way, there won't be any answer. So why are you asking? ;) There is no way to "encrypt just a single user's account". Is that more useful to you? As for the "often wrong": Please prove, not just accuse :) – Izzy Jul 5 '15 at 14:57
1

In Linux, encrypting user data usually involves just using an encrypted partition/container for the user's /home directory. All user data is stored there so the user is reasonably safe. In Android, all user data is stored on the same partition, the /data partition. The user data for apps goes into /data/user/(userid), the emulated external storage into /data/media. The binary files for apps are shared between users and are located in /data/app and /data/lib. In other words: user data can be all over the place.

Theoretically, you could create a partition for each user's data and emulated external storage, encrypt that and set up the mounting points/symbolic links so that all encryption is done transparently.

However, this would require some serious changes to the file system and probably to the ROM and kernel itself as well because the system must have the /data/user/x directories mounted at boot time. I've never heard of a (custom) ROM that does this, so if you want all your user data to be encrypted you'll have to program it yourself.

If your device has a lot of custom ROMs you might be able to download and modify an existing ROM with some boot scripts. This would probably be a lot of work though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.