The Xperia Z2 was, contrary to its name, the third iteration of Sony’s now dead Xperia Z line. The smartphone, being Sony’s flagship mobile hardware back in 2014, packed in the latest specs. A Snapdragon 801 paired with 3 gigs of RAM and a 3200mAh battery to juice it all still sounds pretty decent in 2017. But the device is more than 3 years old at this point having been launched at the start of 2014. The last official update it received from Sony was Android 6.0.1 Marshmallow. Developers have done a pretty good job of keeping the device updated though. And now we are seeing some pretty decent Alpha builds of Android 8.0 Oreo-based custom ROMs like LineageOS 15.0.
The LineageOS 15.0 alpha build in question here is the result of a collaboration between XDA members opendata, rcstar6696, akshay2shah, and iXaidyiu. Like any other custom ROM carrying the LineageOS moniker, this one too offers the same basic set of features. Therefore, its development is of utmost importance for the Xperia Z2. Many other Android Oreo custom ROMs that may arrive for the Xperia Z2 will, after all, be based upon the LineageOS code. Which is why the developer believes LineageOS is your best option for upgrading to Android Oreo as of now. If and when your favorite custom ROMs based on Android Oreo make an appearance, you can dirty flash them over LineageOS for easy installation.
This is still an alpha build though as already mentioned and it is bound to have bugs. Alpha builds are prone to more bugs and errors that beta builds and are generally not recommended. The currently known list of bugs includes, but may not be limited to the following:
- Video recording does not work. The developer opendata has promised that this will be fixed in an update which is to arrive within a day or two at best.
- The 2.4GHz WiFi can be a bit slow on some Xperia Z2 devices.
- Miracast does not seem to be working.
- Some problems with the built-in file manager.
- Downloaded APKs cannot be installed by tapping the download complete notification. Installing APKs requires the use of a file manager instead.
- Users have also reported that the Bluetooth cannot be turned off.
- There are also some problems with mounting SD cards, as one user reports, where the SD card is detected as a new SD card after each reboot.
We can only expect the number of bugs to decrease as the development moves on but it may just increase as well momentarily as more users try out the ROM.
Before we get to how we must warn you again, this is an alpha build. There is a pretty good chance that you might face even more issues than the ones already listed above. Moreover, flashing custom ROMs and third-party software on your device can render it useless. AndroidBlog will not be held liable for any kind of damage occurred to your device during or after the installation process. Please proceed at your own risk.
- Your device must have an unlocked bootloader.
- Install ADB and Fastboot on your PC.
- Ensure that your Xperia Z2 has enough battery left, preferably above 50%, to prevent any accidental shutdown during the process.
- LineageOS 15.0 ROM – Download the ROM and extract the boot.img file from the zip.
- Gapps – The developer recommends installing Full Gapps but notes that it is not necessary.
- Baseband Patch for D6502 – Baseband patch for users of the 3G variant of Xperia Z2.
- TWRP Recovery 3.1 – Download and rename to twrp.img
How to install LineageOS 15.0 on Xperia Z2
- Download the ROM and Gapps and transfer the zip files to your Xperia Z2. D6502 users should also download the baseband patch.
- Boot your device into fastboot mode. To do this, power it off and then connect it to your PC via a USB cable while holding down the Volume Up button. The LED on the top turns blue when your device is in fastboot mode.
- Launch ADB on your PC now and enter the following command to flash the boot image file you extracted from the ROM. Replace the green text with the path leading to the boot.img file. For example, C:\Users\username\Desktop\boot.img.
fastboot flash boot pathTo\boot.img
- It is advisable to put the extracted boot.img into your ADB installation folder beforehand. This way, the command you have to type in ADB is simply reduced to:
fastboot flash boot boot.img
- Once flashed, flash the downloaded TWRP image file with the following command. Once again, it would be easier to just place the recovery image into your adb installation folder so you wouldn’t need to type out its path.
fastboot flash recovery pathTo\twrp.img
- Disconnect your phone when the flashing is complete.
- Power it on and then press the Volume Up button as soon as you see the LED turn Pink/Purple while the Sony logo is displayed on the screen. This will boot your phone into TWRP recovery, indicated by an orange LED.
- Go to Wipe -> Advanced Wipe and select system, data, Dalvik cache, and cache partitions then swipe at the bottom to wipe them.
- Now select Install from the TWRP main menu and select the ROM file. Tap on Add more zips and select Gapps. D6502 users should also similarly select the baseband patch.
- Swipe to flash all the three files.
- Once the flashing is complete, you’ll notice a Reboot system button at the bottom. Tap on it.
When your Xperia Z2 boots up now, you will be greeted with the LineageOS boot animation, with Android 8.0 Oreo waiting behind it. The first boot will take a while so be patient.