Modify update images to install with TWRP - ZTE Axon 7 Questions & Answers

Hello devs,
please can somebody discribe how to modify the original update image, that we can install the image with TWRP without overwriting the TWRP recovery , fastboot a.s.o.
That would be great.

You can use a Archive Software like (7zip) to replace files in your update.zip . I didn't try it so no idea if it works.

I know, with 7zip we can open the files, but the point is, how to modify the update script that the recovery will not be overwritten a.s.o.

Frank Bearson said:
I know, with 7zip we can open the files, but the point is, how to modify the update script that the recovery will not be overwritten a.s.o.
Click to expand...
Click to collapse
If all you are worried about is overwriting TWRP then just flash TWRP in TWRP before you reboot

Related

[Q] custom recovery problem?

http://forum.sdx-developers.com/index.php?topic=7108.0
On the original post by inxane he says to 2. Download the recovery and put it in C:\Program Files (Program Files (x86) if you are on 64 bit)\Samsung Electronics\SWUpgrade\Models\Binary. DELETE THE FILE ALREADY IN THERE OR YOU MAY PERMA-BRICK YOUR INTERCEPT...
Is the recovery just the cm01 tar file at the top because this link >http://www.sdx-downloads.com/devs/inxane/intercept/recoveryv14.tar can no longer be found.
sorry first time working with the intercept, i was going to try adb method but i heard the recovery goes away after you reboot.
From my experience, the CM01.tar file needs the recovery.rfs extracted. When you download SWUpgrade, you want to delete the file inside the Binary Folder and replace it with the recovery.rfs which happens to be Inxane's CM Recovery. The latest should be 2.5.1.0.
The reason it exists as a .tar file is becuse CM Recovery recognizes system files as .tar extensions. So if there was a case you wanted to reflash CM Recovery for some reason, you can do it inside CM Recovery so long as it's in the .tar container. Otherwise, you need the recovery.rfs file on the PC side.
From my experience, If you move CM01.tar to the Binary folder and run SWUpgrade, the upgrade won't start and it'll just hang.
alpha-niner64 said:
...the upgrade won't start and it'll just hang.
Click to expand...
Click to collapse
THANK YOU!!! I was wondering why it was hanging/just rebooting...
[Wrong link! My bad!]
I read that the Intercept can re-install it's stock recovery after rebooting the phone.
Recovery
Read this too
Basically someone is suggesting to just flash a root kernel (SlapKernel) with SW Upgrade. I'm going to try it out right now.
[EDIT] Flashing SlapKernel worked fine (and I wasn't rooted before...), and it's way more responsive so far. I suggest you follow these instructions

Need help to create a TWRP update from OTA

I just receveid an OTA update, but the installation stuck because the system is rooted.
I found the update.zip file on my Handy, but it contains some directory (Meta-inf, patch and system) and a big file update.app that I believe contais all the update file.
Is it possible to extract the file from update.app and then create an update that can I launche from TWRP? And if so how could I do it?
Thanks
You can't.
flash back a stock recovery.
After ulocking bootloader and root the OTA didn't work with original recovery that's why I wanto to create an update that works with TWRP
did you try?
ItalianWolf said:
did you try?
Click to expand...
Click to collapse
Yes I reinstalled the original recovery that you can find in t he root package and I completely unroot the phone using the unroot command in SuperSu.
Then I launch the update but after reboot it stuck at 11%, so I create the dload folder in my handy memory and copied there the content of update.zip and then forced the update. In this case, after reboot, it load until 99% that it reboot, but the installed version is still the 170 and not the 188.
Here worked, from post #393 to # 397 and #400
Stock recovery in root zip maybe too old.
Edit:
Ops perhaps it work on full update packages.
ItalianWolf said:
Here worked, from post #393 to # 397 and #400
Stock recovery in root zip maybe too old.
Edit:
Ops perhaps it work on full update packages.
Click to expand...
Click to collapse
What does here mean?
Which thread?
Thanks
Harlock1978 said:
What does here mean?
Which thread?
Thanks
Click to expand...
Click to collapse
Sorry, forgot link: http://forum.xda-developers.com/p8l...-lite-android-6-0-marshmallow-t3305550/page40
You need the Huawei Update Extractor Tool, and do the following:
Load the UPDATE.APP file inside the HUET
Extract boot.img, system.img, and cust.img, from UPDATE.APP inside the HUET
Flash the respective files via Fastboot
so if I am on Marshmallow beta, should I flash the recovery that comes with the marshmallow or the recovery of the B052 rom ?
AmINoS007 said:
so if I am on Marshmallow beta, should I flash the recovery that comes with the marshmallow or the recovery of the B052 rom ?
Click to expand...
Click to collapse
If you have to, flash the B052 recovery... you can always flash the Marshmallow recovery if it doesn't let you update.
I only flashed boot.img, cust.img, and system.img, when I upgraded; didn't flash Marshmallow's recovery at all.
Don't think you can even get OTA updates on the Marshmallow beta anyway (even via a normal bootloader-locked device).
Sorry for my late answer but I was travelling only with a Mac and I couldn't use Huaweu Update extractor.
This are the file that you can find in UpdateApp 188:
00.SHA256rsa.img
01.crc.img
02.curver.img
03.verlist.img
04.efi.img
05.fastboot1.img
06.boot.img
07.recovery.img
08.recovery2.img
11.cache.img
13.dtimage.img
14.dsp.img
15.fastboot.img
16.hifi.img
17.mcuimage.img
18.modemimage.img
19.modemnvm1.img
20.teeos.img
21.trustfirmware.img
And also the following directory:
META-INF
patch
system
Which file should I install, I didn't find a system.img and there are two different recovery
Thanks
You should not install any OTA with TWRP...
Flash back the stock recovery, update, then flash the twrp again, it's way easier and more secure, than doing a flashable zip from an OTA update without knowing what to do with the file within.
The OTA updates usually doesn't contain the SYSTEM.IMG file you are looking for, it contains individual files and scripts to patch up the current system partition to work with the new update.
From the two recoveries you should use the RECOVERY.IMG (the one without the 2 in it).
But again, I do recommend to flash the original recovery(not the one in the update), do the update, and put twrp back.
Where can I find the original recovery from ALE-L21C432B170, so that I can flash the original recovery again?
TIA
I found the original recovery and flashed it then I did a complete unroot and tried again to do the OTA update but it stopped at 11%.
Is there a different way to update?

How to update manually with an OTA package?

My tablet is lenovo yoga tab 3 plus, YT-X703F.
I rooted my tablet, but I want to install an update. I have downloaded the OTA package, can I update by simply replace files? If it's possible, how to deal with those .p files?
Thank you.
zkn1021 said:
My tablet is lenovo yoga tab 3 plus, YT-X703F.
I rooted my tablet, but I want to install an update. I have downloaded the OTA package, can I update by simply replace files? If it's possible, how to deal with those .p files?
Thank you.
Click to expand...
Click to collapse
No as I told you before, you cannot replace the partition images since the update does not contain full images but only patch files (.p files which contain only differences) and a special update format for the system image. Since you have a modified system image (and boot image) it is likely that when you manually apply the patch you will brick your device!!
But to give you some background, the .p files are applied using the apply_patch recovery function (source code is here), whereas the system image patch is applied using the updater recovery function (source is here)
However, as I said fiddling with this is highly risky and I can only repeat myself that the easiest solution is to approach other Chinese users and ask them to boot TWRP and make backups of system and boot partitions of the version you are running and send them to you so that you can flash them via fastboot or TWRP.
matshias said:
No as I told you before, you cannot replace the partition images since the update does not contain full images but only patch files (.p files which contain only differences) and a special update format for the system image. Since you have a modified system image (and boot image) it is likely that when you manually apply the patch you will brick your device!!
But to give you some background, the .p files are applied using the apply_patch recovery function (source code is here), whereas the system image patch is applied using the updater recovery function (source is here)
However, as I said fiddling with this is highly risky and I can only repeat myself that the easiest solution is to approach other Chinese users and ask them to boot TWRP and make backups of system and boot partitions of the version you are running and send them to you so that you can flash them via fastboot or TWRP.
Click to expand...
Click to collapse
Alright, thank you

Is it possible to update to B381 (via OTA update) having a custom recovery?

Hi all,
I currently have a P9 Lite with VNS-L31C432B371 firmware installed.
Recently, I received the VNS-L31C432B381 update via OTA. Unfortunately, when the phone reboots into recovery mode, the update does not even start; instead, I get redirected to the custom recovery (TWRP 3.1.0.-2, system partition read-only) "homescreen".
Is there a way to update to B381 without wiping the entire phone?
Thank you for your time.
The OTA update system uses the EMUI stock recovery so no, there is no way you can update your phone through the updater by using the custom recovery
SALVO9 said:
The OTA update system uses the EMUI stock recovery so no, there is no way you can update your phone through the updater by using the custom recovery
Click to expand...
Click to collapse
Ok, thank you!
Another question: is there a way to obtain the stock EMUI recovery and flash it to execute the update?
_n0153_ said:
Ok, thank you!
Another question: is there a way to obtain the stock EMUI recovery and flash it to execute the update?
Click to expand...
Click to collapse
Yes.
Download your build's update.zip, extract the zip to desktop, you'll then have an update.app (you probably need the full ~2GB build, not OTA, e.g I use B370);
Extract recovery.img from the update.app via HuaweiUpdateExtractor;
boot to bootloader;
fastboot flash recovery recovery.img.
Done.
JHD94 said:
Yes.
Download your build's update.zip, extract the zip to desktop, you'll then have an update.app (you probably need the full ~2GB build, not OTA, e.g I use B370);
Extract recovery.img from the update.app via HuaweiUpdateExtractor;
boot to bootloader;
fastboot flash recovery recovery.img.
Done.
Click to expand...
Click to collapse
Thank you!
I succeeded in extracting and installing the recovery from the update.zip. Unfortunately the OTA failed anyway.
At this point, I think I should just wipe the phone and install the complete update from here.
_n0153_ said:
Thank you!
I succeeded in extracting and installing the recovery from the update.zip. Unfortunately the OTA failed anyway.
At this point, I think I should just wipe the phone and install the complete update from here.
Click to expand...
Click to collapse
Well I , like you, had a custom recovery. The 3-button method didn't work for me and even after restoring the stock recovery I was unable to install the update.
I unpacked the Update.APP file and flashed through fastboot the BOOT, RECOVERY, VENDOR and SYSTEM .img files and I was succesful but now I have the Model number as generic_a15 and Build number NRD90M test-keys. I can only assume some of the other img files carry the information about my phone. At the moment is stable enough but I can't open the Security menu.
If someone has any idea on how to flash the other img files, please let me know
okaar said:
Well I , like you, had a custom recovery. The 3-button method didn't work for me and even after restoring the stock recovery I was unable to install the update.
I unpacked the Update.APP file and flashed through fastboot the BOOT, RECOVERY, VENDOR and SYSTEM .img files and I was succesful but now I have the Model number as generic_a15 and Build number NRD90M test-keys. I can only assume some of the other img files carry the information about my phone. At the moment is stable enough but I can't open the Security menu.
If someone has any idea on how to flash the other img files, please let me know
Click to expand...
Click to collapse
well, if you flash your oeminfo zip, you should get it back
mjz2cool said:
well, if you flash your oeminfo zip, you should get it back
Click to expand...
Click to collapse
I only have old oeminfo.img packages, do you know how I can build one? There is a PRODUCT.img but it is considerably bigger than the oeminfo package that I have seen.
I flashed all the old B370 files, update.zip and update...hw_eu.zip, with DC Phoneix (a non free tool but saved me from.a bricked phone). After that, I flashed the new package and got the Security settings and Developer Options to work again.

[FIX] error 7 fastboot fix for vince

This is a "bloated out" verison of the miui fastboot rom, its JUST for fixing rom flashes with "ERROR 7"
it will NOT:
flash your recovery to stock (you KEEP you current recovery)
flash you system partition to stock rom (you KEEP you current system)
flashing cust (whatever this s#it is)
http://inzanedanii.de/vince_global_images_V9.2.13.0.FASTBOOT.zip
hope this will help you
I can't flash the zip. I 'm using AEX rom now.Why?
Buyaemathenaw said:
I can't flash the zip. I 'm using AEX rom now.Why?
Click to expand...
Click to collapse
need try reboot to bootloader (fastboot) and run the file .. so you need to extract the file
Thanks it works, now install lineage 14 to replace the stock Rom
can you tell how to flash it
dhimansandeep393 said:
can you tell how to flash it
Click to expand...
Click to collapse
I think u must use "adb" command from a PC or something equal with Laptop, and your Device must in "Fastboot" Mode
Then via cable data u can remote from the PC with "ADB Command, for more detail , u can search in google : replace booatloder via Fastboot
signi said:
I think u must use "adb" command from a PC or something equal with Laptop, and your Device must in "Fastboot" Mode
Then via cable data u can remote from the PC with "ADB Command, for more detail , u can search in google : replace booatloder via Fastboot
Click to expand...
Click to collapse
exactly. the phone needs to be in fastboot!
the file needs to be extracted on the desktop or your device and you need to run the .bat file, thats all
diedmaster said:
exactly. the phone needs to be in fastboot!
the file needs to be extracted on the desktop or your device and you need to run the .bat file, thats all
Click to expand...
Click to collapse
I tried running the .bat file but even after running it I still got error 7. What I did was unlock bootloader, flash twrp through fastboot, wipe data, boot into fastboot, run.bat file, open twrp and flash ROM, but I got error 7 still. Any idea what is happening?
Mubasher96 said:
I tried running the .bat file but even after running it I still got error 7. What I did was unlock bootloader, flash twrp through fastboot, wipe data, boot into fastboot, run.bat file, open twrp and flash ROM, but I got error 7 still. Any idea what is happening?
Click to expand...
Click to collapse
Dude just open any custom rom zip using winrar etc. don't extract the whole zip just extract the META-INF folder, then delete the META-INF from the custom rom zip, open the folder of META-INF that you have formerly extracted, open updater-script using notepad++ and remove the line starting with "assert...." save the updater-script file and copy the whole META-INF folder to the custom rom zip, copy this zip with modified META-INF to your phone and flash normly using TWRP.
rashidmalyk said:
Dude just open any custom rom zip using winrar etc. don't extract the whole zip just extract the META-INF folder, then delete the META-INF from the custom rom zip, open the folder of META-INF that you have formerly extracted, open updater-script using notepad++ and remove the line starting with "assert...." save the updater-script file and copy the whole META-INF folder to the custom rom zip, copy this zip with modified META-INF to your phone and flash normly using TWRP.
Click to expand...
Click to collapse
I tried that too but didnt work. Its working now though. Successfully booted into LOS 15.1. Had to flash and boot into xiaomi.eu after format data once to solve the error 7.
Mubasher96 said:
I tried that too but didnt work. Its working now though. Successfully booted into LOS 15.1. Had to flash and boot into xiaomi.eu after format data once to solve the error 7.
Click to expand...
Click to collapse
this wasnt working for everyone so yea

Categories

Resources