Lineage OS is becoming very popular as an alternate to your stock OS in the Android community. It is based on Android Nougat 7.1.2. More and more people are trying this OS everyday and the number in downloads is increasing. However, many people have stumbled upon the “Error 7” during the installation of Lineage OS in recovery.

This error usually occurs if you had a custom ROM previously installed on your device. Migrating from another ROM is usually the reason why error 7 occurs. Also if your TWRP recovery is of an older version, it will state the error 7.

ByPass/Fix Error 7 While installing Lineage OS 

Method 1:

Make sure if you’re migrating from another custom ROM, wipe your device to factory and clear all cache. You must return it to it’s stock condition. After returning the device to stock condition, try to reinstall the ROM again. If the problem persists then try out other methods below.

Method 2:

Try updating your TWRP recovery to it’s newest version. Sometimes using older versions of TWRP recovery can result in error 7. After updating the TWRP recovery to the latest version, try to reinstall the Lineage OS zip file. If the above steps did not resolve your issue then you need make sure that you downloaded the correct ROM,  according to your device and variant.

Method 3:

Step 1. Open the ROM zip on your PC or your phone using 7zip, WinRAR, File manager etc.

Step 2. Navigate to this path: META-INF » com » google » android » updater-script.

Edit LineageOS updater-script
Edit LineageOS updater-script

Step 3. Open the file updater-script in a text editor. You will see a bunch of lines with the command assert and the model name of the device next to it.

Step 4. There should be NO mismatch with the codename of the device in the script or otherwise you’ll get the Error 7 while flashing.

Step 5. You may either edit the code to match your device’s codename or delete all the lines having the code “assert & getprop”

Step 6. Save the file.

After trying the above steps carefully, try to reinstall Lineage OS zip file. Hopefully the methods mentioned above will fix the issue. However if you’re encountering any issues, let me know in the comments section. I’ll be glad to help.