ZenFone 2 running CM13 (Marshmallow)

Guide: Install CyanogenMod on Asus ZenFone 2

CyanogenMod LogoCyanogenMod has been around since the early days of the Android OS, as the open-source community’s answer to phone OEMs/carriers who’ve stopped updating their devices, or for anyone simply looking for a near-stock Android experience on a non-Nexus phone. As you may know, the Android Open Source Project (AOSP) hosts the core of Android’s code that is not proprietary to Google. Device makers and hobbyists alike are encouraged to tinker with, modify and build their own Android ROMs like CyanogenMod. On the other hand, the Google Apps and Google Play Services bundled with any name-brand phone are proprietary. OEMs need to ask Google to certify their device to include Play Store access with their product.

Waiting too long for Marshmallow or Nougat update? Too much bloatware?

Many of us are paying full price for unlocked phones, or waiting it out until our next contract renewal when we can upgrade our phone at a subsidized price. Installing CyanogenMod (CM) can be a good way to get a newer Android version and eliminate the factory-shipped “bloatware” that’s slowing down your device, in between now and your next upgrade. It doesn’t even require rooting, on many devices.Asus ZenFone 2

In this guide, we are updating an Asus ZenFone 2 ZE551ML (WW) to CyanogenMod 13 (Android 6.0.1 Marshmallow) with the latest TWRP recovery and Google Apps. The steps will vary for each Android device, but resources like XDA-Developers and the CyanogenMod Wiki are excellent for finding model-specific information. Often devices have multiple variants referred to by their codenames, such as “Z00A” for the 1080p version of the ZenFone 2.

 

Step I: Unlock the Bootloader

Unlock bootloader on Asus ZenFone 2You need to first unlock the bootloader on your Android device. This is different from the SIM/Carrier lock on your device, i.e. unlocked phones are carrier unlocked, allowing you to use them on any network, but not bootloader unlocked.

As its name might suggest, the bootloader “boots” either the Android ROM or recovery image every time you switch your device on.

A “locked” bootloader always checks whether the code you’re booting is signed by the factory, whereas an “unlocked” one will let you boot custom recoveries, which in turn let you install custom ROMs like CyanogenMod.

Unlocking the bootloader on the Asus ZenFone 2 was easy because Asus has released a tool for developers, which is simply an .apk you need to run on your device. Visit the driver download page, select “Android” for OS, then expand the “Utilities” category to find the “Unlock Device App”. A few taps and restart of the device, then the bootloader was unlocked.

Note: Once unlocked, most devices will show an unlocked padlock on the splash screen when powering on. The ZenFone 2 inverts the colors of the splash screen, making the text “black on white” instead of “white on black”.

 

Step II: Install a Custom Recovery like TWRP or CWM

If you’ve ever flashed your phone with a stock ROM, such as an official update, you might’ve done it via the stock recovery. When you flash any ROM using the stock recovery, it checks if the file is digitally signed by the manufacturer, which the official update would be.

Since CyanogenMod is a custom ROM not signed by your manufacturer, a custom recovery such as TWRP or ClockworkMod is required to install it.

 

Step IIa: Install ADB and Fastboot on Your Platform of Choice

Android ADB and fastboot

To flash a custom recovery, you need to have the Android Debug Bridge (ADB) and Fastboot tools installed on your computer. Also, make sure you have the latest device drivers by downloading them from your manufacturer’s website or the Google USB Drivers page. If anywhere in this process you get stuck on a <waiting for device> prompt after issuing an adb or fastboot command, you should check Device Manager to ensure that the correct driver is set for your device.

You don’t need to install the entire Android SDK to get ADB and fastboot.

For Windows, download the latest version of the Minimal ADB and Fastboot tool. Tip: Once installed, it is also handy to add the Minimal ADB and Fastboot directory to your “Path” environment variable so you can call the commands “adb” and “fastboot” directly from the command line.

C:\Program Files (x86)\Minimal ADB and Fastboot\

On Debian-based distributions of Linux, you can install the android-tools-adb and android-tools-fastboot packages using the apt-get commands below:

sudo add-apt-repository ppa:phablet-team/tools && sudo apt-get update

If you use Ubuntu, the repository is already loaded and you can skip to the 2nd command below:

sudo apt-get install android-tools-adb android-tools-fastboot

 

Step IIb: Flash the Recovery Image to Your Device

Download the latest version of TWRP or ClockworkMod for your device. For our ZenFone 2, we went with TWRP 3.0.2. If you haven’t set up the environment variable, save the .img file in the same directory as your adb and fastboot binaries so it’s easy to get to later.

TWRP Recovery

Connect your Android device to your PC with the original USB cable (or a reliable replacement), then reboot it into bootloader mode, which should now be unlocked.

The key combination to access the bootloader on most phones is holding down Power + Vol Up, then releasing Vol Up once you feel your device vibrate. Continue to hold Power until you reach the bootloader screen.

If you have USB debugging on, you may issue the command below through ADB to accomplish the same: adb reboot bootloader

Once you see a black screen displaying an Android robot with its hatch open, you have successfully booted into bootloader mode. From your command prompt or terminal, type in the command:

fastboot flash recovery recovery.img

Substitute recovery.img with the specific path and file name (in quotes) of the TWRP or ClockworkMod recovery you downloaded earlier. Do not disconnect your device or close the window until the process has completed.

Now on your phone, cycle through the menu options using the Vol Up / Down keys until you see a red one marked “Recovery mode”, then use the Power button to select. If you installed the custom recovery correctly, it will now boot instead of the stock recovery that shipped with your device.

TWRP will first pop-up a screen asking if you want to use it in “read-only” mode but since we are proceeding to install a custom ROM, you need “write” access to the system partition. You can select “Don’t ask me again” checkbox then swipe right on the slider to confirm.

 

Step III: Flash CyanogenMod to Your Device

Download the correct CyanogenMod ROM for your device from get.cm, the official repository. For the ZenFone 2, there were only “nightly” builds available when we updated our device to CyanogenMod 13 (Android Marshmallow).

TWRP Advanced Wipe

If your device has the choice of a “snapshot” or “stable” build we would recommend that instead, but we have been lucky with nightly build 2016-08-18 for the Z00A.

We came across a few bugs with camera-related apps such as Skype (doesn’t run) and Snapchat (green horizontal lines), but the ASUS PixelMaster Camera works properly as long as optimizations are switched “Off” in the camera menu.

  • Nightly builds are “bleeding edge” with the latest features & bugs, reflecting the code commits that developers made to the repository for your device in the past day.
  • Snapshot builds are nightly builds that have proven to be generally stable during testing.
  • Stable builds are release-quality builds that have been approved by CyanogenMod.

First, you should erase the stock ROM that is still on your device. In TWRP recovery, tap “Wipe” then “Advanced Wipe”. Select all of the checkboxes except for “Micro SDCard”, then swipe to wipe (screenshot).

BACKUP ANY CRITICAL DATA: You will lose all apps and data stored on the internal memory.

ADB Sideload in TWRPWith your Android device still connected to your PC, tap “Advanced” then “ADB Sideload” in the next menu that appears (screenshot). Select the clear “cache” and “Dalvik cache” checkboxes (screenshot) then swipe the slider to enter ADB Sideload mode.

Open up a command prompt or terminal and issue the following command:

adb sideload cm-13.0-YYYYMMDD-NIGHTLY-XXXX.zip

Again, the path and file name should correspond to where you have stored your copy of CyanogenMod. Wait for the flashing to complete then do not restart the device yet; return to the ADB Sideload screen to sideload another file – the Google Apps package.

 

Step IV: Flash Google Apps to Your Device

No Android device should be without access to the Google Play Store. Sure, there are third-party app stores like the Amazon App Store and GetJar, but the quality and selection of apps on Google’s own Play Store is unparalleled.

By default, CyanogenMod ROMs don’t include the Google Play Services framework, which enables access to the Play Store in addition to features like Google account authentication, Gmail contact sync and enhanced location services.

Asus ZenFone 2 running CM 13

Luckily, you can manually flash Google Apps into a CyanogenMod installation. Follow the same sideload procedure as above, but instead of flashing the CyanogenMod .zip, download the GApps package that corresponds to your device from The Open GApps Project and substitute that .zip like so:

adb sideload open_gapps-x86-6.0-nano-YYYYMMDD.zip

For the Asus ZenFone 2, you should select “x86” for “Platform”, “6.0” for “Android” version and “nano” for “Variant”.

Why you use x86 rather than x86_64, despite the ZenFone 2’s Intel Atom processor being 64-bit, is because the ZenFone runs a 32-bit build of Android. Don’t select any larger variant than “nano” because flashing the other Google Apps (e.g. Gmail, Maps, Play Music) causes persistent Force Quit errors involving Google Play Services and Setup Wizard when you use the Play Store or access the Settings menu. Instead, you can always install the individual apps you want from the Play Store later.

Step V. Final Set Up

Once you have finished flashing the GApps package, feel free to reboot from TWRP recovery and follow the CyanogenMod setup wizard to set up your device with its brand new operating system.  The first time booting will take a bit longer than usual, so be patient and don’t interrupt the startup.

Especially with the smaller 2 GB/16 GB ZenFone, you’ll quickly appreciate how CyanogenMod 13 has a much lighter footprint on memory and storage than the ASUS ZenUI ROM.

Without the ASUS ZenUI bloatware, a previously laggy ZenFone 2 becomes buttery smooth, with just over 2 GB of internal storage consumed after a fresh install of CM 13. On average, there is over 700 MB of memory free at idle with the 2 GB RAM model on CM 13. This is a drastic improvement over ZenUI, which frequently causes free RAM to dip below 350 MB.

The one Asus app you’ll probably want to reinstall from the Play Store is the Asus PixelMaster Camera. The image quality and features of Asus’ own app greatly surpass that of the open-source camera app bundled with CM 13, which produced disappointingly noisy photos in our tests.

One thought on “Guide: Install CyanogenMod on Asus ZenFone 2

  1. hi. i just wanna ask if i can (and how) to revert back to the stock firmware after trying custom roms? Thanks in advance. :)

    kudos to your very informative blog.

Leave a Reply

Your email address will not be published. Required fields are marked *