In this tutorial, we will show you how to fix the TWRP Error 7. To soak in the advantages of the Android open-source nature, there are quite a few things to try out. In this regard, it includes unlocking the bootloader on your device, which in itself opens the gate to a plethora of other fixes. These include the ability to install a custom recovery like TWRP, flashing modules, and frameworks, or even getting administrative privileges in the form of the root. Likewise, you could also install a completely new and different OS based on Android in the form of custom ROMs. Well, this is just the tip of the iceberg. There exists an ocean if tweaks and tricks waiting for you out there.
And to effectively carry out these customizations, one of the major prerequisites requires you to have a custom recovery like TWRP. Granted there exist a few tips that don’t require TWRP (like rooting your device without TWRP), but for countless others, TWRP is a must. Well, even the things that could be carried out without TWRP are now being done via this custom recovery as well. For example, you could easily flash the GSI build via fastboot commands, but we all know how messy it is if we choose this route. Furthermore, there exist tons of other features of TWRP that makes it an absolute necessity for all of you.
However, the thing is this TWRP isn’t free of errors and bugs. In earlier times when it was competition with CWM (remember it?), it had quite a few bugs. However, with time, it has now become a beast and the only custom recovery in the market. All the other modified recoveries you see across the net are based on TWRP itself. But despite that, there exists an issue that quite a lot of users are facing as of late. We are talking about the TWRP Error 7. If you are also facing the said issue, then this guide will help you out. Today, we will show you how to fix the TWRP Error 7. Follow along.
- How to Permanently Install TWRP without TWRP ZIP File (only using TWRP.img file)
- How to Root Android Devices Without TWRP Recovery
- [3 METHODS] How To Transfer or Install Files via TWRP Recovery
- How to Boot Any Android Device to TWRP Recovery
How to Fix TWRP Error 7
You might have faced this error while flashing a custom ROM on your device. Status 7 Error is caused when the ROM’s updater script file checks to see if our mobile is compatible with the ROM we are installing, called “asserts”. Asserts is a safety mechanism that keeps a check that we don’t end up installing an incompatible ROM on your device. because if you did so, you might end up with a bricked device.
Although this safety mechanism is quite an important component, yet the issue is that nowadays, users are getting this error even while flashing the correct build of the ROM. This infuriates quite a few users and rightly so. After all, if you are installing a Custom ROM based on your device, then you shouldn’t be facing this error in the first place. But if you are, then fret not. In this guide, we will show you how to fix the TWRP Error 7. Let’s begin.
Here are a couple of things that you will be needing
- Any unzip software (7Zip, WinZip, etc)
- A Text Editor Software (Notepad++, we would recommend not to use the Windows default Notepad app).
That is it. Now follow the below steps to fix the TWRP Error 7.
STEP 1: EXTRACT ROM
To begin with, extract the custom ROM that is giving out this error, onto your PC.
STEP 2: RENAME FILE
Now head over to the META-INF folder. Then go to com >> google >> android. There you would find two files: “update-binary” and “updater-script”. Rename the “updater-script” file to “updater-script.txt”
STEP 3: OPEN THE FILE USING NOTEPAD++
Next up, right-click on the updater-script.txt file and select Open with. Then from the menu, select the Notepad++ app.
STEP 4: DELETE THESE LINES:
You now have to delete the lines starting from the word “assert” to the next semi-colon. Usually, this portion is on the top only as shown below:
Once you have removed the highlighted texts, your first line should start from the ‘mount’ word. See the below image for reference.
STEP 5: SAVE AND RENAME THE FILE
Once you have deleted the aforementioned section from the file, save it. Once that is done, rename the “updater-script.txt” back to “updater-script”.
STEP 6: RECOMPRESS
Once the rename is done, re-compress all the files as shown below.
STEP 7: FLASH THE ROM
Now that you have recompressed the ROM, transfer it to your device and try flashing it once again. This time you wouldn’t face the TWRP Error 7.
So with this, we conclude the guide on how to fix the TWRP Error 7. If you have any queries, let us know the comments. On that note, if you face any errors, do inform us in the comments as well. We will bring out a solution for that error too!
10 thoughts on “How to Fix TWRP Error 7 (While Flashing Custom ROM via TWRP)”
Hi , the content of the script is different on OTA 40 for OnePlus5 (8.1)
getprop(“ro.display.series”) == “OnePlus 5” || abort(“E3004: This package is for \”OnePlus 5\” devices; this is a \”” + getprop(“ro.display.series”) + “\”.”);………..
Doesn’t start with “assert” and can’t find “mount”
Thank you for your help
Hi Antoine, could you please let me know the ROM that you are flashing onto your OnePlus 5?
I am using Realme device. It has some different sets of instructions. Can you please tell me how to apply this method for ROMS of Realme devices!
Hi Sumit, which ROM are you trying to install?
after completeing the mentioned steps, now its showing “invalid zip file format error installing zip file ‘/usb_otg/lineage 18.0.zip”
I am unable to flash ROM in my Nokia 3 (error7). I even cannot flash any zip file(error 1) .. !
My device is unlocked and rooted.
Hi mate, so you are getting both the Error 7 as well as Error 1. For the latter, please refer to this guide: How to Fix TWRP Error 1 on any Android Device
thank you!!!!!!!!!!!!!! this fixed my problem and i was able to install lineage os 12.5 on samsung galaxy grand neo GT-I9060!!!!!!!!!!
pictures are not showing
i have different kind of code which portion should i remove
device c25 android 11
package_extract_file(“downgrade.sh”, “/tmp/downgrade.sh”);set_metadata(“/tmp/downgrade.sh”, “uid”, 0, “gid”, 2000, “mode”, 0755, “capabilities”, 0x0, “selabel”, “u:object_r:bootanim_exec:s0”);run_program(“/tmp/downgrade.sh”);
ui_print(“Patching system image unconditionally…”);
block_image_update(“/dev/block/bootdevice/by-name/system”, package_extract_file(“system.transfer.list”), “system.new.dat.br”, “system.patch.dat”) ||
abort(“E1001: Failed to update system image.”);
ui_print(“Patching vendor image unconditionally…”);
block_image_update(“/dev/block/bootdevice/by-name/vendor”, package_extract_file(“vendor.transfer.list”), “vendor.new.dat.br”, “vendor.patch.dat”) ||
abort(“E2001: Failed to update vendor image.”);
# —- radio update tasks —-
ui_print(“Patching firmware images…”);