How To Migrate From CyanogenMod To Lineage OS, Even If You’re On A Different Version

Installing Lineage OS on your Android device might not be so trivial in case you’re coming from a CyanogenMod background, the more so if the versions don’t correlate. However, it’s possible nonetheless. As most of you know by now, the open source project of CyanogenMod was discontinued in favor of Lineage OS. Since CM ROMs

Updated Mar 24, 2017How To's
Migrate from CyanogenMod to Lineage OS

As most of you know by now, the open source project of CyanogenMod was discontinued in favor of Lineage OS.

Since CM ROMs are no longer accessible through the official website nor are they being developed under the same name, it’s only natural that most users who wish to stay up to date with Android’s latest and greatest will therefore, have to move on via the Lineage road.

But don’t be misguided, even though Lineage is the natural successor of CyanogenMod, the move from one another isn’t as trivial as it might sound, and the more so, if you’re also upgrading to different version along the way.

Yet, it is possible.

Migrating From CyanogenMod To Lineage

The key for a successful migration lies in the custom Recovery you are using. In order to keep away from errors such as: failed signature verification and the likes, in this guide the use of TWRP is a requirement.

So go to TWRP website, search and download the Recovery that matches your device and install it; now, while there are plenty of methods to install a custom Recovery, I found that the easiest and most straightforward way to do so in my case is through, what I call “unmediated flashing”, that is, without using any specific flashing program.

The reason it works best for me, and might also be the most useful way for you, is that I experience issues with my PC detecting my Android device when the latter is in “Download” mode.

To bypass such issues the following method of installation can be done:

Requirements for “Unmediated Flashing” of TWRP

  • A twrp.img file.
  • ADB (Android Debug Bridge) installed.
  • Some devices may require IsoRec (Isolated Recovery) compatible kernel, so that you could boot into a Recovery that isn’t part of your ROM – if it’s relevant to your device it will be mentioned on the TWRP downloading page, so read it carefully.
  • USB debugging mode on.
  • Make a backup of your system [Optional].

Once you grab a TWRP .img file, open up your CLI tool (Terminal, PowerShell or whatever you normally use with adb) and access the shell as root user. it is important that you’ll know which partition is your device’s Recovery partition prior to commencing the flashing.

To do that use the following commands:

adb root
adb shell
ls -l /dev/block/platform/dw_mmc/by-name

As you can see in my example below, “RECOVERY” block points to mmcblk0p6 which means that 6 is my Recovery partition number – “p6” signifies the partition number.

Find your device's Recovery partition number

Find your device’s Recovery partition number

There are other ways you can use to tell which is your Recovery partition if you’re still unsure, using fdisk or parted to name a couple. So, if you’re unsure at this point which is your recovery partition – do not continue further until you have found out. Or alternatively, use a 3rd-party program (fastboot, heimdall) to flash TWRP instead.

Unmediated Flashing of TWRP

Now that you know which partition stands for your Recovery partition you can simply do the following:

Warning: the following may break your device’s ability to boot if done improperly, do not use unless you’re absolutely certain of what you’re doing.
Be extra careful for typos.

adb root
adb push TWRP.IMG-FILE /dev/block/YOUR-PARTITION-NAME&NUMBER

Now, if everything went successfully, upon your next reboot into Recovery mode you’ll be landing inside your new TWRP Recovery.

The hardest part is behind you, you’re now ready for installing Lineage OS.

Installing Lineage OS

To install Lineage OS from TWRP, you must follow the below sequence of instructions.

If you haven’t done so yet, it is recommended to backup all the important data on your device prior to continuing further.

A checklist of important data to back up you might overlook includes:




When you’re ready,

  1. Download and transfer the Lineage OS ROM and GApps you wish to flash to your device’s storage (this can also be done from within Recovery mode via adb).
  2. If you haven’t done so yet, boot your device into TWRP recovery.
  3. Select “Wipe” from TWRP main menu and do a “Swipe to Factory Reset” on the bottom of screen.
  4. Go back to TWRP main menu, tap on “Install” and select the Lineage OS ROM .zip file and GApps that you transferred to your device in Step 1.
  5. After selecting the .zip files, do “Swipe to Confirm Flash” on the bottom of the screen to begin the custom ROM installation process (this make take a while).
  6. Once the installation is completed, you’ll see “Wipe cache/dalvik” option, select it and then do “Swipe to wipe” on the bottom of the screen.
  7. Once cache & dalvik wipe completes, select “Reboot System” button.

After a few moments you’ll see the Lineage splash screen while the device is booting, note that this first boot, right after flashing a new ROM may take longer than a typical boot, during this time you may Keep Calm and IWF1 :)