How To Flash AOSP Rom Nougat 7.1 Rom On Xperia Z2

In Recovery Mode, select perform a full data wipe by selecting “wipe data/factory reset”. Use the Power button to select everything while in the Recovery Mode.

Then, perform a cache wipe by selecting “wipe cache partition”.

Now this is optional, but it is recommended to perform a wipe of your dalvik cache as well. You will not get into boot loops or any other errors. From Twrp recovery, go to ‘advanced’ and then select “wipe dalvik cache”.

Then go back to the main Recovery screen and select “install zip from SD card”.

Now select “choose zip from sdcard”. Using your volume keys, navigate to the Nougat 7.1 CM14.1 ROM zip file that you copied to your SD card and select it using the Power button. Confirm the installation on the next screen and the installation procedure should start now.

Nougat 7.1 Gapps: Repeat the above step for the Gapps zip file as well and install it on your tablet.

After the installation completes, go to “+++++Go Back+++++” and reboot the phone by selecting “reboot system now” from the recovery menu