Install Linage OS onto OnePlus One

Installing Linage OS to OnePlus One following the official instructions is a piece of cake. But sometimes cakes don’t turn out as they supposed to be.

Source: https://wiki.lineageos.org/devices/bacon#get-lineageos-for-the-oneplus-one

Enable USB debugging on your device

Installing LineageOS from recovery:

Download the LineageOS install package that you’d like to install or build the package yourself.
Optionally, download 3rd party application packages such as Google Apps (use the arm architecture)
If you aren’t already in recovery, reboot into recovery:
With the device powered off, hold Volume Down + Power.
(Optional, but recommended): Tap the Backup button to create a backup. Make sure the backup is copied onto your computer as the internal storage will be formatted.
Go back to return to main menu, then tap Wipe.
Now tap Format Data and continue with the formatting process. This will remove encryption as well as delete all files stored on the internal storage.

Return to the previous menu and tap Advanced Wipe.

Select the Cache and System partitions to be wiped and then Swipe to Wipe.
Place the LineageOS .zip package, as well as any other .zip packages on the root of /sdcard:
Using adb: adb push filename.zip /sdcard/
You can use any method you are comfortable with. adb is universal across all devices, and works both in Android and recovery mode, providing USB debugging is enabled.
Go back to return to main menu, then tap Install.
Navigate to /sdcard, and select the LineageOS .zip package.

Follow the on-screen prompts to install the package.

(Optional): Install any additional packages using the same method.
Note: If you want any Google Apps on your device, you must follow this step before the first boot into Android!
(Optional): Root the device by installing the LineageOS su add-on (use the arm package) or using any other method you prefer.
Once installation has finished, return to the main menu, tap Reboot, and then System

Download the LineageOS zip-File (latest is https://mirrorbits.lineageos.org/fu…age-14.1-20170323-nightly-oneplus3-signed.zip)

Updating OS:

  1. Wipe Cache/Dalvik
  2. Update META-INF/com/google/android/updater-script file if necessary.
  3. Install OS

Edit:

Edit the archive file META-INF/com/google/android/updater-script

Remove all the lines with assert:

assert(oppo.verify_trustzone(“TZ.BF.4.0.1-85373”) == “1”); (the Trustzone “TZ.BF.4.0.1-85373” value may vary)

Save the file (take care to save the file inside the archive, I work with Total Commander) and close the archive

Transfer this file to your phone and install via TWRP in recovery mode

Useful information:

A “dirty flash” refers to the process of flashing a new version of your ROM over the top of the one you have, without using the “Wipe Data/Factory Reset” option in recovery. Even if you intend to dirty flash the update, you should always wipe cache and dalvik cache.

Wipe Data/Factory Reset

This option erases all data on the device. Every application, and all data generated by those applications, will be erased. If you do not wipe data, all the data files generated by every app on the system will persist through an upgrade. This includes the data files generated by core system apps, like the phone dialer, the Android UI, its option menus and core features. Remember, everything you do on Android is an application that generates data! NOTE: The storage you see when you connect to USB will not be erased.

Wipe Cache

Every application on the system, even those that run things like your UI and the options menus, generates cache files. These cache files are more or less unique to the current installation of Android you are using, and are generated dynamically. These cache files help Android load and run faster. When changing ROMs or updating to a new version of a ROM, you should always wipe the cache partition, or you’re gonna have a bad time: Force closes, boot loops and sluggish performance are just some of the perils that await you.

Wipe Dalvik Cache

Android executes programs inside of software system called the “Dalvik Virtual Machine.” The DVM interprets and runs APK files for Android. Dalvik maintains its own cache to again improve performance for your device by offering faster app loading and execution. The Dalvik Cache is again unique to the current installation you are running, and it should always be wiped whether you’re installing a new ROM or simply updating versions.

Leave a Reply

Close Menu