Install LineageOS on top of CyanogenMod ROM

lineageos

This post will guide you through the installation of LineageOS on top of CyanogenMod. While data could be preserved during the upgrade using the EXPERIMENTAL releases, this did not work for my OnePlus One so I had to go for the full upgrade and then use the Google Backup to restore my data.

DISCLAIMER: This is an experimental process and might damage your phone or affect the integrity of your data. It is always a good idea to use backups.

Required downloads

Installing TWRP

The instructions below work on Windows.

1. Open a command line and navigate to the directory where you have downloaded the SDK Platform Tools.

2. Disable the CM Recovery protection in Settings > Developer Options > CM Recovery option.

3. Put your device into bootlader mode – If this isthe first time you are using the SDK, you will probably need to accept the connection in your phone:

    adb reboot bootloader

4. Unlock the boot – this will wipe all your data!

    fastboot oem unlock

5. When the welcome screen appears, reboot your devide and enter into bootloader mode by pressing volume down + power buttons for 10 seconds. Once the recovery menu appears select the option to boot from bootloader.

6. Flash the TWRP image:

    fastboot flash recovery twrp-3.0.x.x-xxx.img

5. Wait until the flash process is completed and then reboot your device:

    fastboot reboot

Flashing LineageOS release

6. Shut down your device and boot it in TWRP recovery by pressing the volume down + power buttons until the logo appears.

7. Copy the LineageOS images to your phone.

8. Select ‘Install’ in your phone and select the LineageOS image.

9. Swipe to confirm Flash.

Install Gapps

10. Copy the Gapps package to your phone.

11. Select ‘Install’ in your phone and select the Gapps package.

12. Enable the checkbox to reboot your device after the installation is complete.

13. Swipe to confirm Flash.

That should be it. If you have any question, feel free to ask on the comments.

Mountain Lion installation errors in hard disk

Mountain Lion installation

Last week I tried to update my system from Lion to Mountain Lion but the installation failed and claimed the hard disk was damaged and couldn’t be repaired. After that my Macbook would only boot up the Mountain Lion installer continuously and wouldn’t let me access again my Lion disk.

I spent few nights trying hundred of workarounds and when I was about to erase the disk the light came. After trying to repair the volume with Disk Utility I saw the problem was an Invalid volume file count error.

That’s what I did to both up again my Lion installation, fix the problems in the hard disk and install Mountain Lion. You will need Disk Warrior and an external hard disk.

Recovering your previous Mac OS installation.

  • Boot in safe mode. Restart your mac and after the chime press and hold the Shift key until you see a progress bar.
  • If you haven’t done it yet, install Disk Warrior.
  • Go to Preferences > Startup Disk and select the volume that contains your old operating system.

Creating an alternative boot up volume

Fixing the disk

  • Boot with the volume you just created.
  • Run Disk Warrior and rebuild the volume.
  • Reboot your computer.
  • Disconnect the external hard disk.

Enabling file journaling again

  • Open the Disk Utility.
  • Select the volume that has your Mac OS system.
  • Choose Enable Journaling from the File menu.

Installing Mountain Lion

  • We are ready! Just run the installer again and enjoy Mountain Lion!
  • Remember to backup your data periodically.
Other things that didn’t work for my but may be helpul in other cases:
  • Boot from the Disk Warrior CD -> It didn’t show the volume with my old Mac OS system.
  • Boot from the recovery partition and try to fix the problem with the Disk Utility -> Disk Utility wasn’t able to fix the problem.
  • Boot in single user mode and try to fix the problem with fsck and fsck_hfs -> fsck wasn’t able to fix the problem.
  • Check this thread from the Apple Discussions, where Karl other useful workarounds.