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.

Android N Features – What We Know So Far

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.
    Open-command-window-here
  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.
    fastboot-devices

  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.

Read: Root Android N Developer Preview — Instructions

You can also flash TWRP now.


If you have faced any issue during the process, let us know through the comments. Questions and queries, are always welcomed at DroidOrigin.

  • rishabh harmilapi

    Could you upload vendor.img and system.img of npc56w build

  • Obvious

    Ok what’s it mean if I flashed the boot.img wiped cache and data on Preview 2 and it’s just stuck at the animation screen?

    • Hello. Several users here including me have successfully decrypted our 6P using this method. If you’re suffering from a bootloop (stuck on the animation screen), there might be a few cases, and I would need more information about it.

      1) Did you use the boot.img file from the following link? – https://drive.google.com/file/d/0B4yuQy7Zn1WSVVJSbWpGaU1sTlU/view

      2) Also, before flashing and wiping were you able to boot into Preview 2?

  • Eric Garcia

    So what happens when the new factory images come in next month and I want to update? How would I do this without going back to encryption? Can I just download the factory images from Google and flash as usual? Or do I have to flash the modified boot.img every time a new build number is released?

    • Hello Eric,

      No matter if you do a dirty update or a fresh one, you will have to flash the corresponding modified boot image before you boot back into the OS.

      What I basically do is, download the factory image and extract it completely. Then replace the original boot.img from the factory image with the modified boot, and make sure that I flash that one.

      • Eric Garcia

        Thank you Sir!

        • Glad we could be of any help. If you have any other queries, feel free to comment. 🙂

          • Eric Garcia

            One more quick question, do I have to flash the modified boot when I’m installing a custom ROM?

          • Most custom ROMs have kernel (boot) with disabled forced-encryption, so you wouldn’t need to flash the modified boot image.

            Also, for the custom kernels, 99% of them have forced-encryption disabled. So once you have decrypted, you might not need to decrypt again, until you flash a kernel that forces encryption.

  • Davor Lukenda

    Do you need unlocked bootloader for this?

  • Gabi

    Dear Sir
    I’ve tried your method on Nexus 6P NRD90U but i receive this error: FAILED (remote: device is locked.Cannot flash images).
    What i’m doing wrong?Could youj please help me?Thanks in advance

    • Hello. The error that you have mentioned indicates that the bootloader is locked. For this to work, you must unlock your 6P’s bootloader. We have a tutorial here: http://www.droidorigin.com/unlock-bootloader-install-twrp-and-root-nexus-6p/

      Kindly make sure that you take a full backup of everything on your device. Unlocking the bootloader will format your device, including the internal storage.

      • Gabi

        Thank you very much for your quick answer.I will read and try and i come back with results

  • Gabi

    unfortunately i can’t enable OEM unlocking because i have no access .i think i’m stuck

    • Why can’t you access the OS? Where exactly are you stuck?

      • Gabi

        let me explain.i bought this nexus 6p and everything work great but after i reset it asked for google account which i don’t know it.after many tries i was able to “step in” and i have access to settings but i cant enter developer mode with traditional 7 tap on build number and of course i can’t enable OEM unlock.Do you have any ideea how to manage this?

        • When you tap the build number several times in Settings > About phone, don’t you see a toast notification confirming that the developer options have been enabled?

          • Gabi

            nope

          • Yes. Constant 5-7 taps on build number. Once it is enabled, you will be seeing the new “Developer options” section just over “About phone” in Settings.

          • Gabi

            no, for me it doesn’t work because probably i;m not logged on google account.I’m able to install nova launcher to see all content but i can’t log with a new google account

          • That doesn’t matter if your Google account is logged in or not. It should work. We have a tutorial for this too: http://www.droidorigin.com/how-to-enable-usb-debugging-on-android-devices/

          • Gabi

            could i show on skype ?could you add me as gabigl2112

          • I have just contacted you personally over skype. Kindly edit the previous comment and remove your Skype username, for privacy reasons.

          • Gabi

            thank you i edit comment