Google’s latest flagship phone, Nexus 6P has forced encryption enabled, meaning the device will automatically encrypt itself on first boot.

This is, of course, a good thing from the security point-of-view, but if you’re planning on installing TWRP later, know that you’re going to have trouble with decrypting Nexus 6P from the recovery then.

TWRP doesn’t support decrypting yet on Nexus 5X and Nexus 6P. But there’s is a simple workaround to this, you can flash a modified boot image with Force Encryption and Verity check disabled so that the phone won’t encrypt itself on boot. Yes, this also means that you’re going to do a userdata format after flashing the modified boot to disable forced encryption.

Thanks to developer DespairFactor over at xda, we already have a modified boot for the Nexus 6P to disable force encryption and dm-verity. You can grab the modified boot image from the download link below and follow the instructions below carefully.

Downloads

[icon name=”download” class=”” unprefixed_class=””] MDB08K Nexus 6p Modified boot

Instructions
  1. Unlock the bootloader on your Nexus 6P.
  2. Download the modified boot image on your PC and open a command window inside the folder where you saved the boot image on PC. For this, do a “Shift + Right click” on any empty white space inside the folder and select “Open command window here” from the context menu.
  3. Connect your Nexus 6P to PC and boot it into bootloader mode with following command:
    adb reboot bootloader
  4. Once your Nexus 6P is in bootloader mode. Flash the modified boot image with the following command:
    fastboot flash boot decryptedboot.img
  5. Now format userdata to disable encryption. This will completely wipe all files on your device.
    fastboot format userdata
  6. Once userdata is formatted, reboot your Nexus 6P with the following command:
    fastboot reboot

That’s all. Your Nexus 6P won’t encrypt automatically upon first boot now. But you can still voluntarily encrypt your phone from Settings » Security » Encrypt phone.

Happy Androiding!

via xda