Impossible to install custom rom zip with TWRP

bob_bricoleur

Member
Jun 26, 2018
6
0
0
Hi, earlier, I wanted to change the rom of my mi 5s. I've got an error 7 follow by "Failed to update system image" on twrp during the flash. I tried many things: edit the installation script, format all the data, update and downgrade TWRP, lock and unlock bootlander and finally perform a fastboot flash using mi flash and the last one worked. But I am not longer able to flash a custom rom without getting error 7 after the "Patching system image unconditionally" message. I've tested lineage, pixel experience, miui, even 8.1 rom but same result. I'm stuck with fastboot global miui 10 (oreo :( )
Btw, I think that after the error the partition are corrupted since I can't repair them with TWRP.
I don't know what I can do more.I think that i figured out that I am able to flash system.img file using fastboot but I can't flash zip rom using recovery.
As anyone encounter this ?
 

SubwayChamp

Senior Member
Aug 6, 2016
2,359
956
173
Hi, earlier, I wanted to change the rom of my mi 5s. I've got an error 7 follow by "Failed to update system image" on twrp during the flash. I tried many things: edit the installation script, format all the data, update and downgrade TWRP, lock and unlock bootlander and finally perform a fastboot flash using mi flash and the last one worked. But I am not longer able to flash a custom rom without getting error 7 after the "Patching system image unconditionally" message. I've tested lineage, pixel experience, miui, even 8.1 rom but same result. I'm stuck with fastboot global miui 10 (oreo :( )
Btw, I think that after the error the partition are corrupted since I can't repair them with TWRP.
I don't know what I can do more.I think that i figured out that I am able to flash system.img file using fastboot but I can't flash zip rom using recovery.
As anyone encounter this ?
This usually happens when a partition is missed the way that TWRP doesn´t recognice the exact model and this error 7 is a kind of protection to avoid further mistake.

Some TWRP has in-built the option to fix system issue in advanced settings or then of try to flash a system image this option could appear.

Can you upload from any of the roms the updater script that is inside?

Also sometime you did a repartition? Or flashed some GSI?
 
  • Like
Reactions: bob_bricoleur

bob_bricoleur

Member
Jun 26, 2018
6
0
0
This usually happens when a partition is missed the way that TWRP doesn´t recognice the exact model and this error 7 is a kind of protection to avoid further mistake.

Some TWRP has in-built the option to fix system issue in advanced settings or then of try to flash a system image this option could appear.

Can you upload from any of the roms the updater script that is inside?

Also sometime you did a repartition? Or flashed some GSI?
Here is a script from pixel experience:
https://pastebin.com/DXgKrB8Z

I have the error "E1001: Failed to update system image" or "E2001: Failed to update vendor image" or just error 7 if I remove all the abort and assert.
I never did a repartition or flashed a GSI.
 

SubwayChamp

Senior Member
Aug 6, 2016
2,359
956
173
Here is a script from pixel experience:
https://pastebin.com/DXgKrB8Z

I have the error "E1001: Failed to update system image" or "E2001: Failed to update vendor image" or just error 7 if I remove all the abort and assert.
I never did a repartition or flashed a GSI.
Just to be sure I guess you removed all the lines with getprop and not only the words.

Try first flashing persist image through fastboot.

If not flash the rom not through fastboot but using EDL mode and MiFlash tool, if you have unlocked bootloader you can send device through adb with: adb reboot edl or through fastboot with: fastboot oem edl
 

bob_bricoleur

Member
Jun 26, 2018
6
0
0
Just to be sure I guess you removed all the lines with getprop and not only the words.

Try first flashing persist image through fastboot.

If not flash the rom not through fastboot but using EDL mode and MiFlash tool, if you have unlocked bootloader you can send device through adb with: adb reboot edl or through fastboot with: fastboot oem edl
Yep I removed all the line:)

I managed to flash a full fastboot rom with mi flash and I think that during the process, a persist image was flashed. So i'm runing a stock miui. I even managed to flash Twrp and magisk. But I can't flash a rom through TWRP even after that :crying:
 

SubwayChamp

Senior Member
Aug 6, 2016
2,359
956
173
Yep I removed all the line:)

I managed to flash a full fastboot rom with mi flash and I think that during the process, a persist image was flashed. So i'm runing a stock miui. I even managed to flash Twrp and magisk. But I can't flash a rom through TWRP even after that :crying:
Some times causes different results flashing the fastboot full image through EDL mode (download mode) instead of through fastboot mode.

It could be the issue the TWRP version if there is other available.

And you could try deleting the recovery partition with fastboot erase recovery, then boot (don´t flash yet) to recovery using fastboot boot whateveriscalled.img, then in TWRP flash the TWRP image or the installer zip, then reboot for first time to TWRP and try again.