The Custom Droid

Android Tutorials, Tips and Tricks

Disable Forced Encryption and Decrypt Nexus 6P

Decrypt Nexus 6P

So I was there at XDA-Developers, and a few users were going crazy since they couldn’t decrypt their 6P’s storage after installing the latest Developer Preview. The solution is no biggie, you just need to understand what’s going on and deal with it. We are here to help you disable forced encryption and finally decrypt Nexus 6P. This tutorial will cover any 6P running Android N Developer Preview, or latest Android Marshmallow build.

Advertisement

Android N Features – What We Know So Far

Decrypt Nexus 6P

Advertisement

What Is Forced Encryption?

Google wanted its users to have their data secured, and so they forced encryption on the Nexus 6P, to render a better sense of security. ‘Forced‘ in irony, that encryption will be enforced on the 6P at its first boot, and also that Google forced its own decision to the users. Like in the previous versions of Android, Google should have left this choice to the users, and saved all the trouble.

You will need to disable forced-encryption in order to make permanent changes to the device’s filesystem, like flashing mods, tweaks, etc. Until you disable forced-encryption, and decrypt your 6P, you would not be able to perform any such functions.

Forced-encryption is implemented on your device, through the kernel. So, if you would like to disable forced encryption on Nexus 6P, and decrypt it, you will first need to flash a kernel that has Verity Check disabled. Most custom kernels have this disabled, but it is always advised to head up first with the stock kernel, with Verity Check disabled.

After flashing the custom kernel (boot.img), it is imperative that you erase the complete device storage, so that all of the encrypted data and protocols could be removed.

Now, that you know what forced encryption is and how it works, you can begin with the process below.

Disable Forced Encryption And Decrypt Nexus 6P

Thanks to XDA Recognized Contributor – Tigerstown, for delivering modified kernel (boot.img) with Verity Check disabled, for Android N Developer Preview. The guy has also provided decrypted boot.img for the latest Android Marshmallow MCH19I and MMB29V builds. If you’re running MM, you can likely use the provided boot image, to disable forced encryption on your Nexus 6P.

Before you begin, you must install Android SDK and set-up, for ADB and fastboot access. Alternatively, you can also use 15 Seconds ADB Installer. Also, make sure to backup your complete internal storage. The process will wipe your device completely.

Download the kernel corresponding to your Android version and build number:

Instructions

  1. Downloading the modified boot image is where we start. And when that is done, you are ready to flash it on your 6P using fastboot. Power off your 6P completely. When it is off, press and hold the Volume Down and Power keys, until you see the bootloader screen (refer to the image below).
    Nexus 6P Bootloader Mode
  2. Connect your 6P to the PC while it is in boootloader mode.
  3. Open the folder where the modified ‘boot.img‘ file was downloaded. Press SHIFT key and right-click on a space inside this folder. Select Open command window here, from the menu that appears.
  4. Enter the following command:
    fastboot devices

    The command should return a device ID. In case it doesn’t, make sure that the device has been connected properly in bootloader mode.

  5. Enter the following command in the CMD window that just opened:
    fastboot flash boot boot.img
  6. By following the step above, you have ensured that the device would not encrypt the storage on boot. It is time to decrypt the device:
    fastboot format userdata
    fastboot format cache
  7. Finally, reboot your 6P:
    fastboot reboot

You have successfully disabled forced encryption and decrypted your Nexus 6P. Further, you can go ahead and root your device running Android N Developer Preview.

You can also flash TWRP now

If you have faced any issue during the process, let us know through the comments.

About the Author

Founder and Editor-in-Chief

Dhananjay has more than 11 years of experience in Android software customization and development, and has spent the past 10 years writing about it. He spends most of his prime time reading, learning and writing about Android and other open-source projects. He is also a community-taught web developer. Apart from that, he loves mountain biking and playing video games on his PlayStation.

Comments 2 Comments

  1. i just did everything here. still my n6p wont get past the google bootlogo. only if i knew aospa roms has force decryption ill never flash it even if it was a good rom

    1. Hi, the issue you’re facing is due to dm-verity. Not just AOSPA, even ROMs like LineageOS come with encryption now. What you can do is, boot into TWRP, then flash this file.

      After flashing, go to ‘Wipe’ > ‘Format Data’ and enter ‘Yes’.

      Once done, your phone should boot without encryption.

Leave a Reply

Comments are moderated, and published only if they are relevant to the topic and add value in a constructive way. If you disagree with something, please be polite and respectful. We suggest you read our comment policy before commenting.