How to install CyanogenMod 12 on Sony Xperia Z1 Compact – Part2

Shares

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

  1. Download Cyanogen build for Sony Xperia Z1 Compact 
  2. Extract boot.img from the zip to your computer, you will need this file for fastboot.
  3. 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.
  4. 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
  1. 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.

    CyanogenMode 12 Recovery

    CyanogenMod 12 Recovery

  2. From Cyanogen Recovery screen go to Apply update –> apply from ADB
  3. 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>
  4. 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.
  1. Power phone off
  2. Connect Phone to USB cable
  3. Get into Recovery Mode – power phone on and push Volume Down button
  4. 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

Sony Xperia Z1 Compact usb driver

Sony Xperia Z1 Compact usb driver

After installation – Reboot System now and Enjoy 🙂

Screenshot_2015-08-05-10-07-12

0 0 votes
Article Rating

Artur Krzywdzinski

Artur is Consulting Architect at Nutanix. He has been using, designing and deploying VMware based solutions since 2005 and Microsoft since 2012. He specialize in designing and implementing private and hybrid cloud solution based on VMware and Microsoft software stacks, datacenter migrations and transformation, disaster avoidance. Artur holds VMware Certified Design Expert certification (VCDX #077).

You may also like...

Subscribe
Notify of
guest
9 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Johanhs

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

Johanhs

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)

Jakob Janoch

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.

9
0
Would love your thoughts, please comment.x
()
x

FOR FREE. Download Nutanix port diagrams

Join our mailing list to receive an email with instructions on how to download 19 port diagrams in MS Visio format.

NOTE: if you do not get an email within 1h, check your SPAM filters

You have Successfully Subscribed!

Pin It on Pinterest