How to fix Status Error 7 in TWRP Recovery?

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 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?


  1. Copy the zip ROM file to your PC and unzip it using your favorite archiver (for example, 7-zip);
  2. 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;
  3. Rename “updater-script” to “updater-script.txt” and open it in any text editor (for instance, Notepad++);
  4. 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;
  5. Save the modified file;
  6. Rename “updater-script.txt” back to “updater-script”;
  7. Update all files you have unpacked;
  8. Copy the modified zip-file on your phone;
  9. 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.

About Gavin

Editor @ Gavin is a mechanical engineer by trade, but he's also a tech enthusiast. He spends his time working on Android-Fix and enjoys blogging about the latest trends in the mobile industry. His hobbies include cooking, traveling, and playing soccer with friends.

18 thoughts on “How to fix Status Error 7 in TWRP Recovery?”

  1. there is no assert in the file

    now the line you have to delete is:

    getprop("ro.display.series") == "OnePlus 5T" || abort("E3004: This package is for \\"OnePlus 5T\\" devices; this is a \\"" + getprop("ro.display.series") + "\\".");
    show_progress(0.750000, 0);
    ui_print("Patching system image unconditionally...");
    block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "", "system.patch.dat") ||
      abort("E1001: Failed to update system image.");
  2. 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?

  3. 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,…)

  4. 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

  5. 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

  6. 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.

  7. 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)

  8. no assert line in my rom but still gettin error 7. how to resolve it?
    my phone ish xiaomi redmi note 9 pro(joyeuse)

Comments are closed.