It is rather often issue that users encounter “Error 7” code while installing custom Roms (for example, LineageOS). It mostly affects rooted Android smartphones or tablets. Status Error 7 arises in TWRP Recovery when the ROM’s updater script file does not contain a model of your phone, or if the phone model is presented but the script is created for other phone model, for running in other providers’ networks. In this case you have to install your device’s “native” script.
The ROM’s updater script file called “Asserts” is a safety mechanism. It checks the device’s model and version and the custom Rom version by the system variable ro.build.fingerprint getting from the Recovery. If the codes are matched, it permits installation. Otherwise it prohibits installation and you see error 7. The bright part of it is that your device hasn’t turned into a brick. Unlucky cases such as your data are met the requirements and you still get status 7 error happen. Fortunately they are very rare. They related to malfunction of a developer’s script.
To fix status 7 issue one has to check the correctness of the selected script. Whether it is correct for your Android model or not. If the error pops up again and again, you will face to modify the updater-script file. It actually checks if the model of your device is compatible with the ROM you are installing.
How to fix Status Error 7 for TWRP?
- Copy the zip ROM file to your PC and unzip it using your favorite archiver (for example, 7-zip);
- After unpacking find META-INF folder and go the META-INF/com/google/android line. In the last directory you will find two files called “update-binary” and “updater-script”. We are interested in the latter one;
- Rename “updater-script” to “updater-script.txt” and open it in any text editor (for instance, Notepad++);
- Now remove the line starting with “assert” to the next semi-colon. Usually it is the first or a few first lines in the beginning of the text file;
- Save the modified file;
- Rename “updater-script.txt” back to “updater-script”;
- Update all files you have unpacked;
- Copy the modified zip-file on your phone;
- Reboot your Android device to recovery mode and try to update it again. Status Error 7 should be gone.
You are welcome to share you experience with us. Write in Comments.
I tried all this but didn\’t work. I was trying to install lineage custom rom for tecno c7
no assert line in my rom but still gettin error 7. how to resolve it?
there is no assert in the file
now the line you have to delete is:
Thanks, this allowed me to install the RR rom. Now, since the getprop() functions apparently returns nothing on my device (my error message ended with "this device is.") – will I have to modify future updates as well? Or was this likely a one-off error?
Before going wuth any of the above, make sure your downloaded zip match the one from the hosting server, in other word check to see if your file is corrupted, for that use the hash (md5, sha1,…)
Absolutely right! Moreover, check if the latest version of the recovery (TWRP) is installed.
No asserts line in script
Now it gives ‘error 6’. After deleting lines up to ‘ui’
please help me to solve .
I am flashing lineage os 16 in samsung i9060
the model no. is correct but It is showing error 7
I didn't know where to delete, what's a semicolon? Pictures would be great, so I just edit the file to include the name given for "your device is ." That worked
I have redmi 20 pro
after zip i tried to flash rom
invalid zip error
please help
Thank you. This solved error 7 issue on Motorola Ospray 2015 single SIM
I'm having the same problem as Sourabh. After making the changes and rebuilding the zip archive, I get the "Invalid zip file format" error. Rebuilt the archive using 7Zip. Welcome any further suggestions.
i have same problem : invalid zip file format, after remove first line
Do I have to delete ui_print too
to solve "invalid zip format" with winrar
,don't zip the previous unzipped directory himself but only its content.(just select all files and right click and add to archive with winrar and select zip compression)
no assert line in my rom but still gettin error 7. how to resolve it?
my phone ish xiaomi redmi note 9 pro(joyeuse)