[Nexus 6  General] najoor:
Android N Preview 2 npc91k (flashable & image with no encryption and dm verification)

This thread is for the second Android N Preview.

For Android N Preview 3 see: http://xdaforums.com/nexus-6/general/android-n-preview-3-beta-npd35k-t3381845

For Android N Preview 4 see: http://xdaforums.com/nexus-6/general/android-n-preview-4-beta-npd56n-t3399473

** DISCLAIMER: I AM NOT A DEVELOPER. I DO THIS AS A HOBBY AND SHARE MY FINDINGS IN CASE SOMEONE ELSE FINDS THEM USEFUL. **

** THIS WORKED ON MY DEVICE BUT IT MAY NOT WORK ON YOURS. APPLY AT YOUR OWN RISK **​

** The following are instruction for installing Android N Preview 2 image released by Google on 4/13/2016. After the installation you will have TWRP recovery 3.0.2-0 with the data partition erased and unencrypted if you use method 2, which means you will have ~ 3GB more space and ~ 10 seconds faster boot speed **​

Always backup your data before flashing something a total stranger gives you!

Method 1: Flash update through TWRP recovery (keeps your data and current recovery)

1- You need to have TWRP installed on your phone.

2- Download this flashable zip..

3- Copy to the phone internal storage and flash via recovery.

4- Reboot. Your data should still be intact and your OS is upgraded to N Preview 2. If your internal storage is unencrypted before flashing it remains unencrypted.

For some people this didn't work. It seems to be the case when you have been encrypted by your previous Android N installation, in which case TWRP seems to have difficulty reading the file, and that seemingly Preview 2 doesn't play nice with TWRP. It works best when you are unencrypted and your recovery is 3.0.2-0. Thanks to [MENTION=3204620]gammaxgoblin[/MENTION], [MENTION=3803976]blitzerking1[/MENTION], [MENTION=5294656]Michael in ATL[/MENTION], [MENTION=5803877]HueyT[/MENTION], and [MENTION=3516517]PhillyFlyer[/MENTION] for debugging and hints.

Method 2: Flash update using a computer (wipes everything, unencrypts data, and upgrades TWRP)

1- ALL of your data including the internal storage will be lost so make a backup. (If you know what you are doing and you are coming from unencrypted Marshmallow you can modify the instructions to not lose data but I won't help you with that).

2- Download this file. Note that it is NOT a flashable zip.

3- Unzip into a folder of your choice on your PC.

4- Open a command window (cmd) and cd to this directory. then run the following:

flash-all

5- Wait until prompted, then press key to reboot the phone.

6- Your data is wiped and your OS is upgraded to N with unencrypted internal storage. Your TWRP is also upgraded to 3.0.2-0.

Technical details: this is a repacking of the Google image with a modified Kernel and removed userdata and recovery images. Everything else is stock.

Problem downloading from Mega on a mobile browser? Change the page setting to "Request desktop site".

About root and other issues

To obtain root after installing this update you should flash SuperSU 2.71 (or higher) in recovery. Get it from here: http://xdaforums.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133. Despite the fact that SuperSU 2.71 is supposedly re-written for Android N, there are still some apps that seem to have a problem obtaining root. The commonest complaint on this thread so far has been about Adaway. If you want to block Ads just manually do what Adaway does. Download a hosts file from any ad block list server such as http://winhelp2002.mvps.org/hosts.htm, copy the files on your sdcard, boot the phone into recovery, and using the TWRP file manager replace the file /system/etc/hosts with this file and set its permissions to 644 (rw-r--r--).