[FIX][SOLVED]Status 7 Error with CWM or TWRP Recovery on Rooted Android!

How U like my 1st post?

  • Awesome

    Votes: 208 53.7%
  • Not bad

    Votes: 55 14.2%
  • Good

    Votes: 80 20.7%
  • Awful

    Votes: 44 11.4%

  • Total voters
    387
Search This thread

praneethkarnena

New member
Dec 23, 2018
1
0
I get a error: Zip file is invalid

When installing certain custom ROMs on rooted Android smartphones or tablets, you will encounter “Status 7″ error issues once in awhile with ClockworkMod (CWM) Recovery.

Status 7 error is caused while the ROM’s updater script file checks to see if the phone model of your phone is compatible with the ROM you are installing, called “asserts”.

“Asserts” is a safety mechanism so you don’t accidentally install another phone model ROM on your phone. E.g. You tried to install Galaxy S2 ROM on a Galaxy S3 and ending up hard-bricking your phone but you got Status 7 error which saved you.

Now, this safety mechanism is great but there are times where even if you have the correct ROM for your phone, you will get Status 7 error.

This is due to an error by the developer of the ROM in the updater script, causing havoc, making people install another custom recovery like TWRP recovery for no reason.

You can fix the issue by installing TWRP recovery but if you need to restore your CWM backups later down the line, you will have to re-install CWM recovery, causing a big hassle.

Also, if you update to the latest CWM Recovery using ROM Manager, usually this problem is fixed.

But what if you did update to the latest CWM Recovery and still happens? And yes, it does happen even when you update your CWM recovery.

If you simply don’t want to change your recovery (because if it ain’t broke, don’t fix it) or you still get Status 7 error after changing recovery, you can simply edit the updater script yourself to get rid of the asserts.

All you need is a computer and a zipping program! (You might be able to even do it on your Android device with AndroZip and text editor but I haven’t tried yet.)
MAKE SURE THE ROM YOU ARE INSTALLING IS COMPATIBLE WITH YOUR ANDROID DEVICE AS INSTALLING WRONG ROM CAN BRICK YOUR DEVICE!

Before we begin, e.g. Make sure if you are installing a ROM on AT&T Galaxy S3, the ROM zip file you downloaded is for AT&T Galaxy S3 not for Verizon Galaxy S3.


Step 1. Copy the ROM zip file to your computer and extract it using your favorite unzipping software.
71.PNG


72.PNG


Step 2. Once unzipped, browse to the META-INF/com/google/android directory. You will find two files called “update-binary” and “updater-script”.
73.PNG


Step 3. Rename “updater-script” to “updater-script.txt” and open with your favorite text file editor.
74.PNG


Step 4. Get rid of the line starting with “assert” to next semi-colon. Usually this is the first line or one of the first lines at the top of the text file. Just delete them.
5e70c76242c3.png


Step 5. Save file.
8c44068ac2f4.png


Step 6. Rename “updater-script.txt” back to “updater-script”.
200ad781582f.png


Step 7. Rezip all the files you’ve unzipped.
1859ac5f5f29.png


bd453c44dcc8.png


Step 8. Copy the new, edited zip file to your phone.
c2fa6516847c.png


Step 9. Try re-installing ROM, now it should install fine without Status 7 error.

I have tried several zipping softwares: Windows in-built, Winrar and 7-zip. I get an error: zip file is invalid.
Device: Zuk Z2 Plus
I have also tried with several versions of twrp.
 

thanas

Senior Member
Mar 13, 2006
335
210
I have tried several zipping softwares: Windows in-built, Winrar and 7-zip. I get an error: zip file is invalid.
Device: Zuk Z2 Plus
I have also tried with several versions of twrp.

i have fixed it some time ago. the manual unpacking and repacking was the issue. assayeds kitchen works plus it automatically makes an updater scripts and extracts information on mountpoints for it just in case.
however ive moved on from my porting attempt to trying to build from sources with a scratch made device tree
 

nbferr

Member
Jan 18, 2017
9
2
I have tried several zipping softwares: Windows in-built, Winrar and 7-zip. I get an error: zip file is invalid.
Device: Zuk Z2 Plus
I have also tried with several versions of twrp.

The way I did it was using 7zip, directly open the zip archive of the ROM, and edit the file contents inside 7ZIP so the zip file never changes, only the file inside it.
 
  • Like
Reactions: Norpan70
Sep 28, 2016
1
0
Remove this from your update script, don't forget to remove the .txt extension

Code:
getprop("ro.product.device") == "shieldtablet" || abort("This package is for \"shieldtablet\" devices; this is a \"" + getprop("ro.product.device") + "\".");

Can you help me aswell? I have XPERIA Z3
What should I delete exactly?
PHP:
(getprop("ro.product.device") == "D6602" || getprop("ro.build.product") == "D6602" || 
 getprop("ro.product.device") == "D6603" || getprop("ro.build.product") == "D6603" || 
 getprop("ro.product.device") == "D6643" || getprop("ro.build.product") == "D6643" || 
 getprop("ro.product.device") == "D6653" || getprop("ro.build.product") == "D6653" || 
 getprop("ro.product.device") == "z3" || getprop("ro.build.product") == "z3" || 
 getprop("ro.product.device") == "leo" || getprop("ro.build.product") == "leo") || abort("E3004: This package is for \"D6602,D6603,D6643,D6653,z3,leo\" devices
this is a \"" + getprop("ro.product.device") + "\".");
ifelse(is_mounted("/system"), unmount("/system"));
ui_print("Target: Sony/leo/leo:N/NPD56N/1000106:user/release-keys");
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "backup");
unmount("/system");
show_progress(0.500000, 0);
ui_print("                 ,....,                 ");
ui_print("           .,lx0XNWWWNKOd:.             ");
ui_print("        .:eek:WMMMMMMMMMMMMMMMXo.          ");
ui_print("      .oWMMMMMMMMMMMMMMMMMMMMM0,        ");
ui_print("     cWMMMMMMMMMMMMMMMMMMMMMMMMMO.      ");
ui_print("   .OMMMMMMMMMMMMMMMMMMMMMMMMMMWd.      ");
ui_print("  .KMMMMMMMMMKkdlllldkKMMMMMMMO.        ");
ui_print("  OMMMM`  x;.          .;xWMX;          ");
ui_print(" :MMMM  ..`               .;.           ");
ui_print(" KMMM  .o;                              ");
ui_print(".MMM  .0M;                              ");
ui_print("'MM` .KMMl                              ");
ui_print(".MN  xMMM0                              ");
ui_print(".NM ,MMMMM:                           ..");
ui_print(" dM :MMMMMW'                         .k ");
ui_print(" .N cMMMMMMW;                       'Xc ");
ui_print("  ,x;MMMMMMMMx.                   .oW0. ");
ui_print("   ,.NMMMMMMMMWx'                lNMK.  ");
ui_print("     ,NMMMMMMMMMMXx:'.     ..:o ,MMO.   ");
ui_print("      .kMMMMMMMMMMMMMMNXXXNMMW  NWl.    ");
ui_print("        ,OMMMMMMMMMMMMMMMMMMK  Xd.      ");
ui_print("          .oKMMMMMMMMMMMMMKc  :.        ");
ui_print("             .:okKNWWWNKdl'  '          ");
ui_print("                 ''...`',  +'           ");
ui_print("                                        ");
ui_print("                carbonrom.org           ");
show_progress(0.750000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/platform/msm_sdcc.1/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") ||
  abort("E1001: Failed to update system image.");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "restore");
unmount("/system");
show_progress(0.200000, 10);
ui_print("Flashing boot.img");
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
show_progress(0.100000, 0);
ui_print("Enjoy CarbonROM!");
set_progress(1.000000);
 

mitomanu

Senior Member
Feb 4, 2014
272
377
CLUJ-Napoca
@orthodoxchurchisthebst, delete this
(getprop("ro.product.device") == "D6602" || getprop("ro.build.product") == "D6602" ||
getprop("ro.product.device") == "D6603" || getprop("ro.build.product") == "D6603" ||
getprop("ro.product.device") == "D6643" || getprop("ro.build.product") == "D6643" ||
getprop("ro.product.device") == "D6653" || getprop("ro.build.product") == "D6653" ||
getprop("ro.product.device") == "z3" || getprop("ro.build.product") == "z3" ||
getprop("ro.product.device") == "leo" || getprop("ro.build.product") == "leo") || abort("E3004: This package is for "D6602,D6603,D6643,D6653,z3,leo" devices
this is a "" + getprop("ro.product.device") + "".");

how? Open the zip with 7 zip but not extract. Go to meta-inf/android/google/android/updater(update)-script, open it (do no extract), and delete the lines. Save it and after that press update. Done! Reflash the zip. If you have the .md5 file copied in the same storage with your rom zip, deleted! Otherwise twrp will give you error on flash.
 
Last edited:
  • Like
Reactions: Shobhit31107

anil18

Account currently disabled
Jun 28, 2015
23
10
GB
meettomy.site
Or.. the most easy way is to flash a vendor image / firmware image as it has wiped the system vendor image.
and this is the reason why the twrp recovery is unable to read it.
in my case i have a poco f1 device i did the same (flashed the vendor/firmware image and it worked, ps: coreect me if i am wrong.
 

ObscureIdentity

New member
Jul 9, 2019
3
0
Falkirk
Das is gud. Fixed the issue for me when installing Resurrection remix. If anyone is having this issue make sure u fkin check if its compatible with ur device otherwise ull brick ur phone and there is no way back :p
 

Ignoranus

Senior Member
Oct 11, 2017
171
17
All I get now is there is the system saying "Could not find 'META-INF/com/google/android/update-binary' in the zip file."
 
Last edited:

robiul1897

New member
Jul 19, 2016
4
1
Not Worked the method

When installing certain custom ROMs on rooted Android smartphones or tablets, you will encounter “Status 7″ error issues once in awhile with ClockworkMod (CWM) Recovery.

Status 7 error is caused while the ROM’s updater script file checks to see if the phone model of your phone is compatible with the ROM you are installing, called “asserts”.

“Asserts” is a safety mechanism so you don’t accidentally install another phone model ROM on your phone. E.g. You tried to install Galaxy S2 ROM on a Galaxy S3 and ending up hard-bricking your phone but you got Status 7 error which saved you.

Now, this safety mechanism is great but there are times where even if you have the correct ROM for your phone, you will get Status 7 error.

This is due to an error by the developer of the ROM in the updater script, causing havoc, making people install another custom recovery like TWRP recovery for no reason.

You can fix the issue by installing TWRP recovery but if you need to restore your CWM backups later down the line, you will have to re-install CWM recovery, causing a big hassle.

Also, if you update to the latest CWM Recovery using ROM Manager, usually this problem is fixed.

But what if you did update to the latest CWM Recovery and still happens? And yes, it does happen even when you update your CWM recovery.

If you simply don’t want to change your recovery (because if it ain’t broke, don’t fix it) or you still get Status 7 error after changing recovery, you can simply edit the updater script yourself to get rid of the asserts.

All you need is a computer and a zipping program! (You might be able to even do it on your Android device with AndroZip and text editor but I haven’t tried yet.)
MAKE SURE THE ROM YOU ARE INSTALLING IS COMPATIBLE WITH YOUR ANDROID DEVICE AS INSTALLING WRONG ROM CAN BRICK YOUR DEVICE!

Before we begin, e.g. Make sure if you are installing a ROM on AT&T Galaxy S3, the ROM zip file you downloaded is for AT&T Galaxy S3 not for Verizon Galaxy S3.


Step 1. Copy the ROM zip file to your computer and extract it using your favorite unzipping software.
71.PNG


72.PNG


Step 2. Once unzipped, browse to the META-INF/com/google/android directory. You will find two files called “update-binary” and “updater-script”.
73.PNG


Step 3. Rename “updater-script” to “updater-script.txt” and open with your favorite text file editor.
74.PNG


Step 4. Get rid of the line starting with “assert” to next semi-colon. Usually this is the first line or one of the first lines at the top of the text file. Just delete them.
5e70c76242c3.png


Step 5. Save file.
8c44068ac2f4.png


Step 6. Rename “updater-script.txt” back to “updater-script”.
200ad781582f.png


Step 7. Rezip all the files you’ve unzipped.
1859ac5f5f29.png


bd453c44dcc8.png


Step 8. Copy the new, edited zip file to your phone.
c2fa6516847c.png


Step 9. Try re-installing ROM, now it should install fine without Status 7 error.

Even after all above mentioned steps followed correctly its showing same error
 

aboalmaqrizi

Member
Jan 24, 2020
5
1
very thx for helpfull i have same error 7 . my lenovo k6 with the nougat stock rom . and i trying install LineageOS 16.0 .
 

j.sinitson

New member
Sep 8, 2016
1
0
I encounter this problem every time I update the OS on my gts210vewifi.
Here are the quick steps to get the stuff done by every OS update:

1. Enable Developer-Options (tab on build-Number 7 times) on the device
2. Enable USB-Debugging in the Developer-Options on the device
3. Enable Root-Access for ADB in the Developer-Options on the device
4. Plug the device in your Desktop-Machine
5. Enable Data Transfer over USB on your device

6. Now ADB should detect your device on the Desktop-Machine:
Code:
$ adb devices
7. Enable ADB root-acess on the Desktop-Machine:
Code:
$ adb root
8. Login to your device from the Desktop-Machine as root:
Code:
$ adb shell
9.
Code:
$ cd /data/lineageos_updates/
10.
Code:
$ unzip lineage-16.0-20200303-nightly-gts210vewifi-signed.zip
11.
Code:
$ vim META-INF/com/google/android/updater-script
12. Delete that proofing line and save the file
13. Replace that script in the zip:
Code:
$ zip -r lineage-16.0-20200303-nightly-gts210vewifi-signed.zip META-INF/com/google/android/updater-script
14. Ensure the script is replaced:
Code:
$ unzip -p lineage-16.0-20200303-nightly-gts210vewifi-signed.zip META-INF/com/google/android/updater-script
15. Boot to the recovery mode and install that zip as usual
16. Don't forget to disable the stuff on your device you enabled above.
 

i Podius

New member
Oct 17, 2007
3
1
E1001: Failed to update system image.error: 1001

I had this error, and followed this guide, and then encountered a new error (well, two, actually). Below are the steps I followed to resolve them.

Code:
Invalid zip file format!
I was getting this error because I zipped the folder that was created when I unzipped the file. So, if I opened my newly-created zip file, the first thing I saw was a folder named "lineage-16.0-20200705-nightly-kltedv-signed" inside it, instead of the folders "install", "META-INF", "system", etc.

The "install", "META-INF", "system", etc. folders should be at the top level of the zip file.

I recreated the zip file by selecting all the files inside the "lineage-16.0-20200705-nightly-kltedv-signed" folder, rather than zipping the folder itself. This fixed the issue, getting me to the second error:

Code:
creating stash /cache/recovery/5a79362318d00cf4c316e86435b3ed38dd35082d/
script aborted: mkdir "/cache/recovery/5a79362318d00cf4c316e86435b3ed38dd35082d/" failed: No such file or directory
E1001: Failed to update system image.
mkdir "/cache/recovery/5a79362318d00cf4c316e86435b3ed38dd35082d/" failed: No such file or directory
E1001: Failed to update system image.error: 1001
cause: 101
[B][COLOR="Red"]Updater process ended with signal: 11
Error installing zip file '/external_sd/lineage-16.0-20200705-nightly-kltedv-signed.zip'[/COLOR][/B]

I was able to fix this issue by formatting the Data partition.
Although I had already done a wipe of the System, Dalvik, and Cache, I hadn't wiped the Data partition.
You can do this by selecting Wipe > Format Data and then typing "yes" to confirm.

Once the internal memory had been formatted, I was able to successfully install the new ROM.

Note: Doing this will wipe your files and data from the phone! Make sure you have a backup, first!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    When installing certain custom ROMs on rooted Android smartphones or tablets, you will encounter “Status 7″ error issues once in awhile with ClockworkMod (CWM) Recovery.

    Status 7 error is caused while the ROM’s updater script file checks to see if the phone model of your phone is compatible with the ROM you are installing, called “asserts”.

    “Asserts” is a safety mechanism so you don’t accidentally install another phone model ROM on your phone. E.g. You tried to install Galaxy S2 ROM on a Galaxy S3 and ending up hard-bricking your phone but you got Status 7 error which saved you.

    Now, this safety mechanism is great but there are times where even if you have the correct ROM for your phone, you will get Status 7 error.

    This is due to an error by the developer of the ROM in the updater script, causing havoc, making people install another custom recovery like TWRP recovery for no reason.

    You can fix the issue by installing TWRP recovery but if you need to restore your CWM backups later down the line, you will have to re-install CWM recovery, causing a big hassle.

    Also, if you update to the latest CWM Recovery using ROM Manager, usually this problem is fixed.

    But what if you did update to the latest CWM Recovery and still happens? And yes, it does happen even when you update your CWM recovery.

    If you simply don’t want to change your recovery (because if it ain’t broke, don’t fix it) or you still get Status 7 error after changing recovery, you can simply edit the updater script yourself to get rid of the asserts.

    All you need is a computer and a zipping program! (You might be able to even do it on your Android device with AndroZip and text editor but I haven’t tried yet.)
    MAKE SURE THE ROM YOU ARE INSTALLING IS COMPATIBLE WITH YOUR ANDROID DEVICE AS INSTALLING WRONG ROM CAN BRICK YOUR DEVICE!

    Before we begin, e.g. Make sure if you are installing a ROM on AT&T Galaxy S3, the ROM zip file you downloaded is for AT&T Galaxy S3 not for Verizon Galaxy S3.


    Step 1. Copy the ROM zip file to your computer and extract it using your favorite unzipping software.
    71.PNG


    72.PNG


    Step 2. Once unzipped, browse to the META-INF/com/google/android directory. You will find two files called “update-binary” and “updater-script”.
    73.PNG


    Step 3. Rename “updater-script” to “updater-script.txt” and open with your favorite text file editor.
    74.PNG


    Step 4. Get rid of the line starting with “assert” to next semi-colon. Usually this is the first line or one of the first lines at the top of the text file. Just delete them.
    5e70c76242c3.png


    Step 5. Save file.
    8c44068ac2f4.png


    Step 6. Rename “updater-script.txt” back to “updater-script”.
    200ad781582f.png


    Step 7. Rezip all the files you’ve unzipped.
    1859ac5f5f29.png


    bd453c44dcc8.png


    Step 8. Copy the new, edited zip file to your phone.
    c2fa6516847c.png


    Step 9. Try re-installing ROM, now it should install fine without Status 7 error.

    When I tried to rename it, it stayed as a text file. It didn't revert back to the original file.
    4
    A
    AndroTix
    When installing certain custom ROMs on rooted Android smartphones or tablets, you will encounter “Status 7″ error issues once in awhile with ClockworkMod (CWM) Recovery.

    Status 7 error is caused while the ROM’s updater script file checks to see if the phone model of your phone is compatible with the ROM you are installing, called “asserts”.

    “Asserts” is a safety mechanism so you don’t accidentally install another phone model ROM on your phone. E.g. You tried to install Galaxy S2 ROM on a Galaxy S3 and ending up hard-bricking your phone but you got Status 7 error which saved you.

    Now, this safety mechanism is great but there are times where even if you have the correct ROM for your phone, you will get Status 7 error.

    This is due to an error by the developer of the ROM in the updater script, causing havoc, making people install another custom recovery like TWRP recovery for no reason.

    You can fix the issue by installing TWRP recovery but if you need to restore your CWM backups later down the line, you will have to re-install CWM recovery, causing a big hassle.

    Also, if you update to the latest CWM Recovery using ROM Manager, usually this problem is fixed.

    But what if you did update to the latest CWM Recovery and still happens? And yes, it does happen even when you update your CWM recovery.

    If you simply don’t want to change your recovery (because if it ain’t broke, don’t fix it) or you still get Status 7 error after changing recovery, you can simply edit the updater script yourself to get rid of the asserts.

    All you need is a computer and a zipping program! (You might be able to even do it on your Android device with AndroZip and text editor but I haven’t tried yet.)
    MAKE SURE THE ROM YOU ARE INSTALLING IS COMPATIBLE WITH YOUR ANDROID DEVICE AS INSTALLING WRONG ROM CAN BRICK YOUR DEVICE!

    Before we begin, e.g. Make sure if you are installing a ROM on AT&T Galaxy S3, the ROM zip file you downloaded is for AT&T Galaxy S3 not for Verizon Galaxy S3.


    Step 1. Copy the ROM zip file to your computer and extract it using your favorite unzipping software.
    71.PNG


    72.PNG


    Step 2. Once unzipped, browse to the META-INF/com/google/android directory. You will find two files called “update-binary” and “updater-script”.
    73.PNG


    Step 3. Rename “updater-script” to “updater-script.txt” and open with your favorite text file editor.
    74.PNG


    Step 4. Get rid of the line starting with “assert” to next semi-colon. Usually this is the first line or one of the first lines at the top of the text file. Just delete them.
    5e70c76242c3.png


    Step 5. Save file.
    8c44068ac2f4.png


    Step 6. Rename “updater-script.txt” back to “updater-script”.
    200ad781582f.png


    Step 7. Rezip all the files you’ve unzipped.
    1859ac5f5f29.png


    bd453c44dcc8.png


    Step 8. Copy the new, edited zip file to your phone.
    c2fa6516847c.png


    Step 9. Try re-installing ROM, now it should install fine without Status 7 error.
    3
    When I tried to rename it, it stayed as a text file. It didn't revert back to the original file.

    Open up the txt file that you made. Then go to Save As and then for File Type select "All Files" and then for the File Name remove the .TXT so its just updater-script and not updater-script.txt then repack
    3
    Thank you very much for the reply!! However, that didn't work. When I removed what you suggested, and removed the .txt extension I'm getting another error as shown in the photo. Any other suggestions?

    Please check your zip file. The META-INF, system and boot.img file should be in the root of the zip and not in a folder

    The structure should be

    XXX.zip
    -> META-INF
    -> system
    ->boot.img
    ->other files and folder

    and not like this

    XXX.zip
    ->XXX
    ->META-INF
    ->system
    ->boot.img
    ->other files and folder
    3
    No assert found in rom

    I have tried 5 different roms and twrp and cwm and noting will install. Can't find assert in any of the row either.

    Dead phone and don't know what to do but have been trying to fix it for 6 hours.

    Please help!

    Thanks.