If you look up how to bypass the Android lock screen, there seems to be endless examples.

  1. plug the phone into your PC, use ADB (Android debugging tools), disable the lock screen
  2. forgot password option can get some recovery code sent to your email
  3. "Emergency Call trick" was a bug in specific versions of Android that crashed the lock screen and let you into an encrypted device. how???
  4. etc

I'm sure there's limitations to those examples, but still, none of this is possible at all if the drive was actually encrypted. What's going on? I'm very confused. How do I encrypt my Android device so it's actually encrypted and worthless without the key?

1 Answer 1


You seem to be confusing two different security features that are intended to protect against two different types of attacks.

The three attacks you mentioned are to bypass the lock screen of the phone, and have nothing at all to do with encryption. They also only work in a specific set of circumstances.

Among other limitations:

  1. The phone must be already booted up. In order to do anything useful, the phone's OS needs access to the disk and therefore it must have the decryption key loaded in memory. Several of these types of attacks will not usually work against a phone that has only just been booted up but not yet unlocked for the first time after booting.
  2. The phone may have a bug. In your third example, bypassing the lock screen could only happen because someone made a mistake. Programmers are human too and they make mistakes. It sometimes happens that mistakes allow a security bypass.
  3. You have chosen to deliberately reduce security. In order to use your first example, the device owner must have enabled debug mode. This is not an easy thing to do - there are deliberately multiple complex steps that must be taken to enable it. You also need to allow each specific computer to use ADB, so this attack can only be done from a computer that the phone was previously connected to. Or, in your second example, you as the device owner have deliberately enabled a bypass of your security, trading it for convenience in case you get locked out of your device.

So what does device encryption do for you?

Device encryption protects your data from being accessed from outside the OS.

  • An attacker cannot reboot your device into "recovery mode" or de-solder the flash chip from the motherboard to read your data.
  • Every time your phone is rebooted (not just turning off the screen; only a full reboot), you must unlock it once before any data can be accessed. This is because Android encrypts the disk encryption key using your password/PIN/pattern, and the OS cannot access your data until that first unlock. (One way you can see this easily is if you reboot your device, then leave it locked and have a friend call you. Even though the friend is in your contacts, the caller ID will only show their number, not their name, because their name is stored on the not-yet-unlocked encrypted storage.)

If you want to add another layer of protection, some Android devices will allow you to add a password to the disk encryption. This adds an additional password prompt while the phone is booting up, and the phone will not boot until you have entered the password. However, unless you are afraid of nation-state level attacks against your phone and you plan to always keep your phone powered off and only turn it on when you need it, it is highly unlikely to be worth the trouble to set this password. (Again, remember the difference between disk encryption and the lock screen.)

  • 2
    Suggested edit: since Android 10, file file-based encryption renders pre-boot PIN useless. The user's PIN/password/pattern works as decryption key for the user's space. In older devices, where encryption was partition-based, you had the dual prompt (boot and then lock screen) Commented Oct 22, 2020 at 8:28
  • 1
    ahh, i simply forgot the fact that nobody turns off their phones, that's why the bypasses work for everyone. got it, thanks. i feel like using a strong password is a requirement, even for your average user, since the pin and especially pattern have to be trivial to brute force
    – Farzher
    Commented Oct 22, 2020 at 12:06
  • 1
    i just tried setting a password but they're forcing it to be in the realm of crackable "must be fewer than 17 characters", also "this can't include an invalid character". so there's no way to encrypt your android device from police for example. i can't imagine why else that limit exists. crazy
    – Farzher
    Commented Oct 22, 2020 at 13:20
  • 4
    @Farzher: Some security chips can be configured to allow an encrypted key to be decrypted only a limited number of times. If a chip, after being programmed with K1 and K2, acts as an oracle which, given input I, will encrypt I with K1, decrypt K2 using that, and report that, but it provides no way of reading out K1 and K2, and it only allows the indicated operation to be done five times, then a brute-force attack would be limited to five attempts before the information would become irrecoverable.
    – supercat
    Commented Oct 22, 2020 at 19:02
  • 1
    @Farzher what are you hiding that a 17-character string isn't enough to protect? Crackable sure, but it's non-trivial. As the old adage goes, you just need to outrun your slowest competition. I understand if you don't want to give a direct answer, but remember this is a consumer product not intended to maintain secure information of/for/from nation states - even hiding information from law enforcement is a debatable topic (more suited for politics or philosophy though).
    – TCooper
    Commented Oct 23, 2020 at 21:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .