Install AOSP ROM on Xperia Z2 Based on Android 6.0 Marshmallow

0

xperia-z2_1

If you own a Sony Xperia Z2 device then here is a good news for you. An AOSP Android 6.0 Marshmallow ROM is available for your device. Just last month Google released it’s latest Android 6.0 AOSP source code and developers have started porting it to their respective devices. Here is one such ROM for the Xperia Z2.

We have listed a detailed tutorial on how you can install the latest AOSP ROM through the fastboot as it comes in a system and boot image files. The tutorial also includes a way to flash the Google Apps and SuperSU package in order to root it.

However, you will need to have a custom recovery like TWRP installed on your device to flash the SuperSU and Google apps following the AOSP ROM installation.

It still remains an unofficial process and you might come across a glitch during the process as it involves issuing commands through adb and fastboot. If you have any prior experience in this, then you may find it simple.

Bug Alert

  • Camera not Working
  • Video playback colour calibration is wrong (Use MX player and it will work. However, not all apps can use MX player to play Videos)

Warning: Warranty may be void if you root or install a custom recovery on your device. We at DroidViews won’t be liable for any damage to your device whatsoever. We won’t be held responsible if you brick your device. Reader’s discretion is advised.

Backup Apps and Data
This process will wipe all of your data and apps. Hence, a backup is highly recommended. Once you install a custom recovery like TWRP, make sure you backup your system, data and all such partitions from the recovery. It will be helpful in case anything goes wrong.

Downloads

Here is a list of modified boot image that will help you install AOSP ROM without any complications. You will need to flash the given Sirius boot image and later flash the system image. That way, you will enjoy your AOSP Android 6.0 Marshmallow ROM on your Z2. If you need Root access then we have provided the link to the SuperSU build that supports Marshmallow. Also make sure you download the Sirius boot image and not the boot image from the system image folder.

  • Sirius Image modified boot image — Download | File: boot.img
  • System Image — Download | File: system.img
  • Marshmallow Gogle Apps  — Download | File: gapps-mm.fix.zip
  • SuperSU v2.52 – Download | File: BETA-SuperSU-v2.52.zip

How to Install AOSP ROM on Sony Xperia Z2 Based on Android 6.0 Marshmallow and Root it

Prerequisites

  • Make sure you have the exact device and variant. This works on Sony Xperia Z2 device only.
  • Make sure you have TWRP installed on your device.
  • Set up ADB and Fastboot on your computer. You can download the full Android SDK from here, or get the quick ADB and fastboot installer from here. For Mac or Linux OS, click here.
  • Install Sony USB Drivers on your computer.
  • Open Settings> Developer options and enable USB Debugging on your device.
  • Go to Developer options and enable Allow oem unlock. This is important.

Installation Instructions

  • Make sure you have downloaded the boot image, system, suitable Google apps and SuperSU zip files. Now transfer them to your PC. Also place the Google Apps and SuperSU package file into your device’s internal storage.
  • Make sure you have setup ADB and fastboot on your PC. Also accept Always allow from this computer when you plug in the device for first time to enable USB Debugging.
  • Now power off your device and unplug it from your PC.
  • Boot into the bootloader or fastboot mode. To do so, press and hold volume down and the power button simultaneously for 5-6 seconds. When you see the bootloader screen, connect your device to the PC using a USB cable.(Choose fasboot if option is available) You can also issue the following code, while connected to the PC, to boot into the bootloader.
adb reboot bootloader
  • Navigate to the location where you have placed the boot image and recovery files and extract them, if a zip file, to get files with .img extension. Rename the boot and system file to a simple one, like boot.img and system.img respectively just for your convenience.
  • While the folder with boot and recovery file is open, hold shift key on your keyboard and right-click on an empty space and select “Open command window here” option to launch a command prompt window.
  • Now type the following in the command prompt to check if fastboot is working correctly. It should provide the serial number of your device.
fastboot devices
  • Flash the modified boot image from Sirius by issuing the following command:
fastboot flash boot boot.img
  • Now if you are on and Lollipop ROM or custom ROM then factory reset and format system from recovery by booting into it. Remember to backup before you proceed.
  • Now flash the system image. Issue the following command for that:
fastboot flash system system.img
  • System will now be installed on your device. Now again flash the modified boot image from Sirius by issuing the following command:
fastboot flash boot boot.img
  • Now boot your phone into recovery mode. You can do this by turning your device off and then press and hold volume down and power keys at the same time. Or simply issue the following command while the device is still plugged in:
adb reboot recovery
  • Once into the recovery, you can backup or nandroid backup your current ROM.
  • Now return to the recovery home screen and tap Install and navigate to the Google Apps and SuperSU files and flash them simultaneously through the custom recovery by select it.
  • Confirm the swipe operation at the bottom to install the packages once selected.
  • Once the installation is complete, reboot to system.

Now you will have root access on your Xperia device. If the device doesn’t boot or gets into bootloop, you can always restore the ROM from the backup. Verify root using a root checker app that supports Android 6.0 Marshmallow.

For queries, comment down below. Like and share us on social platforms. If you need help with other devices, let us know.