How to install CyanogenMod 12 on Sony Xperia Z1 Compact – Part2 – Installation
After preparation – See my post How to install CyanogenMod 12 on Sony Xperia Z1 Compact – Part1 you are ready to Install CyanogenMod 12 on Sony Xperia Z1 Compact.
[box type=”warning”] NOTE: You are doing it at your own risk, Make sure you have backup. For Sony devices you might want to create DRM keys backup first before you start.[/box]
Unlock bootloader.
First what you have to do is unlock bootloader. In order to unlock the bootloader on your Xperia Z1 Compact you will need to obtain a code from Sony. The following process will help you acquire this code so that you can flash a custom recovery.
- Open the Phone application on the Xperia Z1 Compact and enter
*#06#
to obtain the device’s IMEI. Save this for later use.- Optional: if you do not have a phone app, the IMEI can be found on the box or on the device in About Device -> Status.
- Put the device into fastboot mode:
- With the device powered down, hold Volume Up and connect the USB cable. The notification light should turn blue to indicate you are in fastboot mode.
- Open a terminal on the PC and enter:
fastboot getvar version
- If you receive the message <waiting for device> fastboot is not configured properly, please see fastboot for more details.
- Navigate a browser here
- Select your device and click the ‘continue’ button at the bottom of the page.
- Enter your email address, agree to the terms and select ‘Submit’
- Click the link from your email, enter your IMEI and continue
- The unlock code should now appear, write this down for the next step.
- In the PC’s terminal, enter the following command:
fastboot oem unlock 0xKEY
fastboot oem unlock 0xKEY
- KEY corresponds to the unlock code you were given.
The Xperia Z1 Compact’s bootloader should now be unlocked.
Replace boot loader.
Replace Sony bootloader by CyanogenMod boot loader.
- Download Cyanogen build for Sony Xperia Z1 Compact
- Extract
boot.img
from the zip to your computer, you will need this file for fastboot. - Put the phone into fastboot mode. With the device powered down, hold Volume Up and connect the USB cable. The notification light should turn blue to indicate you are in fastboot mode.
- Open a terminal on the PC with admin rights, access your platform-tools directory of the Android SDK, and enter the following:
fastboot flash boot /path_to_the_boot.img fastboot reboot
- While the device reboots, press the Volume rockers a few times to load recovery.
Install CyanogenMod on Sony Xperia Z1 Compact
- Once the device boots into CyanogenMod Recovery Mode, you can either use the physical volume buttons to move up and down or use touch screen. The home button is used to confirm your selection.
- From Cyanogen Recovery screen go to Apply update –> apply from ADB
- Open elevated command prompt and run below command
C:\Users\akrzy_000\AppData\Local\Android\sdk\platform-tools>adb.exe sideload cm-12.1-20150729-NIGHTLY-amami.zip Total xfer: 1.00x C:\Users\akrzy_000\AppData\Local\Android\sdk\platform-tools>
- Reboot System
After installation and reboot your phone should boot into brand new and shiny CyanogenMod 12.X. Be patient, it might take few minutes (up to 5, but I’ve seen first boot time almost 10 minutes) to boot up for the first time. On my phone, first boot, took about 2 minutes.
Install google apps on Sony Xperia Z1 Compact.
- Power phone off
- Connect Phone to USB cable
- Get into Recovery Mode – power phone on and push Volume Down button
- From Cyanogen Recovery screen go to Apply update –> apply from ADB –> and run below command
C:\Users\akrzy_000\AppData\Local\Android\sdk\platform-tools>adb.exe sideload gapps-5.1-x86-2015-07-17-15-08.zip Total xfer: 1.00x C:\Users\akrzy_000\AppData\Local\Android\sdk\platform-tools>
Troubleshooting:
If you get error message – device not found – you have to update or install driver for Sony Device in Device and Printers
C:\Users\akrzy_000\AppData\Local\Android\sdk\platform-tools>adb.exe sideload gap ps-5.1-x86-2015-07-17-15-08.zip loading: 'gapps-5.1-x86-2015-07-17-15-08.zip' error: device not found C:\Users\akrzy_000\AppData\Local\Android\sdk\platform-tools>
I always choose Sony Sa0109 ADB Interface Driver
After installation – Reboot System now and Enjoy 🙂
How to make a DRM key backup? I have a sony xperia z1 compact on lollipop (bootloader locked, not rooted). All the DRM backup tools only work on rooted devices. The only way to root a z1c is by unlocking the bootloader (which deletes all DRM keys). The only option I found is kingroot (but I don’t really trust this).
Is there an alternative way?
Best Regards
Johan
Thx the tutorial was very useful 🙂
Only the installation of Gapps didn’t work with Cyanogen Recovery.
I had to replace it with TWRP (found it on XDA forums)
what went wrong if it does not enter recovery mode after bootloader was replaced and doesn’t boot at all?
I hope you can help me.