How to extract recovery.img from the ASUS firmware? [7.0/8.0] [ZE552KL/ZE520KL] - Asus ZenFone 3 Guides, News, & Discussion

Hello guys, some time ago this device had more support from developers, someone could extract the recovery.img in order to keep it updated.
I wonder if anyone would know what the procedure is for extracting.
My device is the ZE552KL (Z012D).
I followed the steps in this tutorial, however, I did not succeed: https://tinyurl.com/yd3w4pxa
I followed all the steps and tried to extract recovery.img from the Zenfone 3 ZE552KL (Z012D) Asus firmware, however, there was a problem after applying the applypatch directive.
Error: patch boot.img: Only patches to EMMC targets are supported.
And I can not solve it.
install-recovery.sh (original extraction): https://hastebin.com/lupoqovila.bash
install-recovery.sh (change): https://hastebin.com/ofuqofezat.bash
Apllypatch directive used at the prompt: applypatch -b recovery-resource.dat boot.img recovery.img 28e9d4088f51c9dafb9189eb15f061c78be55a57 18791676 4a9f7c48e01aed3a46ac8d06618239dff9834caf: recovery-from-boot.p
Error:
https://imgur.com/a/JWfyr
I also asked for help at Zentalk, but so far no one has spoken.
https://www.asus.com/zentalk/tw/thread-147621-2-1.html
Please, I'll be grateful if anyone can help.

The recovery partition is #59, therefore to back it up you can use terminal emulator and type;
Su
dd if=/dev/block/mmcblk0p59 of=/sdcard/recovery.img
To flash, go to fastboot and type
Fastboot flash recovery recovery.img
Fastboot reboot
You need root for all this. You can convert the recovery image to be flashable via recovery but it only works with twrp, not stock.

wang1chung said:
The recovery partition is #59, therefore to back it up you can use terminal emulator and type;
Su
dd if=/dev/block/mmcblk0p59 of=/sdcard/recovery.img
To flash, go to fastboot and type
Fastboot flash recovery recovery.img
Fastboot reboot
You need root for all this. You can convert the recovery image to be flashable via recovery but it only works with twrp, not stock.
Click to expand...
Click to collapse
Thanks for taking note of my question, but what I really need to know is about recovery stock. It would not be logical for my use to perform custom recovery extraction, since it is already found in the .img format from the developer's available links (TWRP).
Following the tutorial steps of the links I indicated it is possible to make a kind of compilation using the official OTA file, processing on the device itself to generate the file recovery.img stock.
Again thank you for trying to help, any and all help is very welcome.

+1

Can someone post here stock recovery.img for ze520kl newest oreo firmware?

I'd like to know how to do this as well. I went through a lot of trouble to get Oreo installed after rooting and installing TWRP on my phone running Nougat, ended up having to go back to stock and install updates incrementally. As you noted, root is required to save the stock recovery.img, but since my device is not rooted now I can't root without installing TWRP first. That would put me in the same situation as the OP. The google translate of the link posted by the OP is a bit hard to understand, can someone else give an english explanation of how to extract recovery.img from firmware zip?
TIA
Update: I managed to follow the instructions in the OP's link, ended up with a similar applypatch command as he did and also encountered the same error with running the command over adb. I'm not sure if those instructions are for all asus devices, the one in the link is Asus P028 (Zenpad 10)
applypatch -b recovery-resource.dat boot.img recovery.img f448eeec56d4d87173858cd7aec25c36a7dfaaa7 18736380 9ebabd3eb6a59cfcaf0f4f048e2d8d6d870d7924:recovery-from-boot.p

ktl20 said:
Can someone post here stock recovery.img for ze520kl newest oreo firmware?
Click to expand...
Click to collapse
Here

Error
I keep getting
/sbin/sh: f448eeec56d4d87173858cd7aec25c36a7dfaaa7: not found
whenever i go through this. what am i doing wrong? T_T

wang1chung said:
The recovery partition is #59, therefore to back it up you can use terminal emulator and type;
Su
dd if=/dev/block/mmcblk0p59 of=/sdcard/recovery.img
To flash, go to fastboot and type
Fastboot flash recovery recovery.img
Fastboot reboot
You need root for all this. You can convert the recovery image to be flashable via recovery but it only works with twrp, not stock.
Click to expand...
Click to collapse
when I type su and enter, on adb shell show error "/system/bin/sh: su: not found". my device is unrooted. I did this for boot and recovery backup before rooting. I'm using Zenfone x00rd (Live L1)

Related

[RECOVERY] Reverting to original(STOCK) recovery

WARNING: IN THE EVENT THAT ANYTHING GOES WRONG, I WILL NOT BE HELD ACCOUNTABLE. I CANNOT STRESS THIS ENOUGH!!!
EDIT: I FORGOT, BEFORE CHANGING RECOVERY OR DOING ANYTHING, ALWAYS DO A NANDROID BACKUP!!!
If you have flashed a custom recovery (clockwork, j_r0dd, etc.) but you want to
1) accept OTA updates but cant do so with the custom recovery
2) send your phone for repair and not void your warranty
3) or UNROOT YOUR PHONE,
it should be easy to revert back to your stock recovery that came with your phone.
NOTE: THIS PROCEDURE WILL ONLY WORK IF THERE IS AN AVAILABLE OTA UPDATE FOR YOUR PHONE!!!
YOU WILL HAVE TO RE-ROOT YOUR PHONE IF YOU WANT ROOT ACCESS AFTER UPDATING! DO NOT RE-ROOT IF YOUR PHONE IS TO BE SENT FOR REPAIR!
Step 1) Download the OTA update. (I have a uploaded a sample update zip at
www . sidsoftinc . com / Blur_Version.0.3.9.MB300.Retail.en.03.zip
*remove the spaces)
Step 2) On completion, the phone should reboot and enter recovery mode, using the custom recovery to update. However, this should fail as most custom recoveries prevent original updates. Note the location of the downloaded update (likely at /cache)
Step 3) Power down the phone and enter into recovery mode manually
Step 4) Using ADB, pull the folder containing the update zip to your computer
Code:
adb pull /**storedlocation**/**nameoftheupdate**.zip update.zip
Step 5) Open the update.zip in your adb folder and look for a file called recovery.img (most likely in system folder)
Step 6) Open up the adb shell and flash the new recovery (recommended)
Code:
adb shell
su
flash_image recovery recovery.img
or you can place it in /system and it will be auto-flashed (not recommended)
Code:
adb push recovery.img /system/recovery.img
Step 7 (if possible) Make it permanent by deleting the custom recovery in /system
Code:
adb shell
cd system
su
mount -o rw,remount /dev/block/mtdblock1 /system
rm recovery.img
mount -o ro,remount /dev/block/mtdblock1 /system
exit
exit
Step 8) Reboot the phone and if you see a triangle warning sign, reboot your phone again. You should see your homescreen before it reboots to install the update again. This time, the original recovery will be used.
Once finished, your phone will be upgraded, unrooted and your applications and data will still be retained.
If you wish to install your previously used custom rom again, you must flash the custom recovery and install the rom, again
If I made a mistake, please do inform me. Thank you
I'm trying to do this for the Tmo G2 and I have reverted using another technique but the clockworkmod is still there. I thought it would get removed!
I have no idea how to get rid of it. Can you give me alittle help?
Did your clockworkmod recovery flash itself into your nv ram. If so then no one can help you there. If you have an ota update and pulled it to your pc, send me a coy and I'll see if I can help you. If you can, send me your ota update zip to [email protected].
Sent from my Motorola Backflip using the XDA App
I'm honestly unsure if it flashed to the nv-ram. Possibly, basically if I do a system boot (power +vol down) and select recovery, it will load the HTC green text with white background then go into clockword recovery. I'm not exactly sure why it still does this.
I used the method on this FORUM THREAD to un-root and get back to stock (using the available files there and method 1-a). I'm just unsure why the clockwork recovery is still there. I'm hoping I can still get back to stock recovery. Possibly I just need to flash the stock recovery.img??
Also, I had some troubles initially with ADB, which is why I used the VISIONary method of rooting. I'd love to try out the gfree method since I believe my ADB is working correctly now and test out some other roms to see what I like the most.
I know you are probably in a different time zone that is way ahead of mine........but can't I just reflash the stock or update ota recovery.img in fastboot mode.......OR is this a bad Idea???
Many users have accidently accepted ota updates on custom rims and recoveries. for fastboot, I did mention that flashing stock recovery and update is possible via adb shell.
Sent from my Motorola Backflip using the XDA App
siidheesh said:
Many users have accidently accepted ota updates on custom rims and recoveries. for fastboot, I did mention that flashing stock recovery and update is possible via adb shell.
Sent from my Motorola Backflip using the XDA App
Click to expand...
Click to collapse
I tried flashing the stock recovery but I'm not sure why it didn't work, I had hboot and flash_image. I used the adb shell way as well. It gave me error in partitions or whatever. I don't know what to do.
do you have Blur_Version.0.3.10.MB300.Retail.en.03.sbf file?
I dont happen to have that file, but i do have Blur_Version.0.3.9.MB300.Retail.en.03.zip
if you need it.
Cockwork Mod
I'm pretty green so this may sound really dumb, but can you flash sbf files to your phone via Clockwork Mod, or does it have to be done via RSD Lite. I cannot get RSD to recognize my device in 4.7 or 4.8. Please help.
do you have a stock image for the huawei ascend for cricket or does anyone here have it?
Unrooting......
I download the RECOVERY file you supplied (thank you)
"Blur_Version.0.3.9.MB300.Retail.en.03.zip"
If I reboot into Recovery and just flashed that zip file, would it work that way to unroot?
Provided you are flashing on a MOTOROLA BACKFLIP, yes. However, you might want to flash the AT&T 2.1 update for the backflip instead, if you reside in the US. Flashing back any official firmware unroots your phone
I'm looking to root and unlock my AT&F Motorola Backflip (MB300).. Any suggestions?
Sent from my NexusHD2 using Tapatalk
OTA for Samsung Galaxy Ace is a CFG file, not ZIP
Hello,
Just for interest, I received an OTA for my Samsung Galaxy Ace but it didn't come as a ZIP file - it came as a CFG file (which is not a ZIP, but actually a proprietary package - which I can't remember the name right now).
However, I did find the stock recovery elsewhere in this forum, and I installed it. But that wasn't enough for the OTA to be installed - it still fails.
Corrupted?
siidheesh said:
Step 5) Open the update.zip in your adb folder and look for a file called recovery.img (most likely in system folder)
Click to expand...
Click to collapse
I can't find it. I have an Alcatel Pop C1 4015X. Help?
Trying to unroot Xperia Z2
I am trying to unroot using update files from the Sony Xperia Companion. I found the update files (I think). I used Flashtool to decrypt the FILESET, but there is no recovery.img in the decrypted folder. The folder I decrypted is in Xperia Companion/Sony Mobile Update Engine/localstorage/db/13740270 and that is the only folder that has decryptable files. They are named FILE_8977018 and similar before decryption and various .sin .ta files (examples auto-boot.ta, cust-reset.ta, simlock.ta). Am I using the right decryption to get the recovery.img?

[Q] <HELP> deleted framework-res.apk [WiFi model]

Call me what ever you want, but it's too late...
I have a US WiFi Zoom and I accidentally deleted the "framework-res.apk" in /system/framework/, but I do have a backup in /mnt/sdcard/
Fastboot is still working, but I can no longer boot in recovery (I have/had CWM installed).
The normal startup get stuck on the boot screen.
As far as I understand you cannot flash a file directly from fastboot, but need a .zip file made in Linux for this purpose.
As I do not have skills, nor a Linux OS to build this, I would very much appreciate if someone could help out here, or direct me how to flash a file directly from fastboot.
Thanks in advance,
arc
Get wifi system image and fastboot flash system system.img
Or if you have USB debugging enabled, just use adb to copy the framework-res
Thanks, sangreal06,
I believe the USB debugging is only getting me into the /mnt/ folder.
But, if I understand you right, I can grab roebeet's root-prepped and updated HRI66 system.img here:
http://forum.xda-developers.com/showthread.php?t=995785
and flash it by:
Code:
fastboot flash system system.hri66.rootprepped.img
fastboot reboot
After the device reboot, you will need adb to fix su permissions:
Code:
adb remount
adb shell chmod 6755 /system/bin/su
is this correct?
Yes, but that file is for 3G. It is not compatible with wifi model
Thanks, sangreal06, for catching that one, it probably saved me a lot of grief. I guess the one to use will be Scourge1024's:
Stock MZ604 (Xoom Wi-Fi) recovery.img
or, am I better way of waiting for the stock SBF, announced to arrive within short?
Also, will this require that I re-root?
Thanks in advance,
arc
Boot into clockworkmod and flash the zip below.
How to get back into recovery: http://forum.xda-developers.com/showthread.php?t=1041192
File: http://dl.dropbox.com/u/18315605/XDA/Framework.zip
Thanks so much bwcorvus,
I'll d/l the recovery.img at [RECOVERY] ClockworkMod Recovery v3.0.2.5
and....
It worked perfectly, I'm back! I guess that's a mistake I wont do again. I really owe you one, put it on my tab.
arc

Trying to flash an insecure boot.img, no luck.

I am desperately trying flash an insecure boot image on my TF300T, and I am just about at my wit's end. I have gone through the following process. (this is on a .29 TF300T btw)
Unlocked my TF300T with the ASUS tool, and then flashed CWM and got root using this guide.
Obtained .29 US firmware zip from the ASUS website.
Unzipped the "blob" file and then extracted all of the firmware components from it using BlobTools.
Renamed blob.LNX (one of the extracted files which is apparently the boot image) to boot.img for convenience.
Split boot.img into kernel and ramdisk using this set of scripts made for that purpose.
Changed the ro.secure=1 line in default.prop to ro.secure=0.
Packed everything back up again using that set of scripts.
flashed my new boot.img using the line fastboot -i 0x0B05 flash boot boot_new.img (boot_new.img is generated upon repacking)
and finally, I run fastboot -i 0x0B05 reboot only to find upon booting that absolutely nothing has changed! adbshell getprop ro.secure still gives a 1! I'm almost positive that I've done this all correctly, as I was able to get an insecure boot image onto a kindle fire just a few days ago. Could anyone tell me if I'm doing something wrong? Please
One thing to note, for some reason I could not run fastboot -i 0x0B05 boot boot_new.img to try out the new boot image as it would cause fastboot to give me an error and a red line of text to appear on the TF300T's screen detailing something about it being unable to find the command. Perhaps that is related to my problem?
I'd try taking the 'boot.img' file and putting back to simply 'blob' with no extension, then flashing via ADB or terminal emulator with root.
Code:
adb push blob /sdcard/ (Just place on root of Internal Storage if using term emulator or have easy MTP access. )
adb shell (Don't need if using emulator)
su (Give ROOT permission)
dd if=/sdcard/blob of=/dev/block/mmcblk0p4
reboot
See if that'll flash it for you.
"dd if=/sdcard/blob of=/dev/block/mmcblk0p4" This part I am NOT 100% sure about, you'll need the TF300's partition table, I know mmcblk0p4 is the Staging partition on the TF101, but not sure if it's the same on the TF300, just replace mmcblk0p4 with the STAGING partition label
Hope it helped.
Needs Root and BusyBox installed.

[Q] deleting a recovery

hello guys
I want to delete cwm (v6.0.1.9) to install twrp (v2.5.0.0).can anyone help me?
how i can delete CWM?
nasiroddin said:
hello guys
I want to delete cwm (v6.0.1.9) to install twrp (v2.5.0.0).can anyone help me?
how i can delete CWM?
Click to expand...
Click to collapse
Whoa! You don't delete a recovery Just install TWRP and it will overwrite CWM.
Follow the instructions in the TWRP thread using goomanager or download the CORRECT version for your device form the teamwin web site and use the following from a PC
rename the downloaded file to twrp.blob and reboot to the bootloader / fastboot screen
Code:
fastboot -i 0x0B05 flash recovery twrp.blob
fastboot -i 0x0B05 reboot
or from a terminal emulator on the device:
Save it to the root of your /sdcard directly (internal memory only) and rename it to twrp.blob
Launch terminal emulator or connect to your computer and open an adb shell, then type the following:
Code:
su
dd if=/sdcard/twrp.blob of=/dev/block/mmcblk0p4
Then reboot to complete installation.
sbdags said:
Whoa! You don't delete a recovery Just install TWRP and it will overwrite CWM.
Follow the instructions in the TWRP thread using goomanager or download the CORRECT version for your device form the teamwin web site and use the following from a PC
rename the downloaded file to twrp.blob and reboot to the bootloader / fastboot screen
Code:
fastboot -i 0x0B05 flash recovery twrp.blob
fastboot -i 0x0B05 reboot
or from a terminal emulator on the device:
Save it to the root of your /sdcard directly (internal memory only) and rename it to twrp.blob
Launch terminal emulator or connect to your computer and open an adb shell, then type the following:
Code:
su
dd if=/sdcard/twrp.blob of=/dev/block/mmcblk0p4
Then reboot to complete installation.
Click to expand...
Click to collapse
thanks
now I install twrp and i want to update from jb 4.1 to jb 4.2 and i downloaded jb 4.2 frimware (WW_epad-user-10.6.1.14.8) from asus global site.can you help me how to update my tablet to this version?(my tablet is unlocked so suggest me a way that doesn't cause a (hard or soft) brick) thanks a lot
nasiroddin said:
thanks
now I install twrp and i want to update from jb 4.1 to jb 4.2 and i downloaded jb 4.2 frimware (WW_epad-user-10.6.1.14.8) from asus global site.can you help me how to update my tablet to this version?(my tablet is unlocked so suggest me a way that doesn't cause a (hard or soft) brick) thanks a lot
Click to expand...
Click to collapse
You can just flash the update file from TWRP. You will loose your custom recovery and root if you flash the stock rom. So you would have to re-install TWRP and root again.
If you come from any kind of custom rom it's highly recommended to do a clean install of the stock rom. Wipe everything, don't restore apps from a backup (their data should be ok to restore), install all your apps from the Play Store.
Sent from my DROID4 using Tapatalk 2

20e semi stock fastboo/twrp flashable images

Hey guys,
This is for people who already unlocked the bootloader!!
Since there hasn't been any flashable images via twrp or fastboot, I have decided to create one for the stock 20e. Now it's semi stock because the twrp is included with the boot image I uploaded. I'm doing just 20e because im too lazy to go back and forth firmwares just to upload different versions of fw of stock.
You can flash them via fastboot or twrp.
To access fastboot you need to be rooted in your custom rom or stock:
1. Use terminal or adb shell and do these commands
Code:
Su
dd if=/dev/zero of=/dev/block/bootdevice/by-name/laf_a
Then reboot and hold the vol+ button while it's plugged into the PC
Don't worry about losing download mode on slot_a cause the other slot will still have it and you can switch to the other slot via fastboot or twrp then you can have download mode
To flash via fastboot:
Code:
Fastboot flash boot_a twrpboot_a.img
Fastboot flash system_a system_a.img
Fastboot flash vendor_a vendor_a.img
To flash via twrp:
1. Move these files to your internal sd or external.
2. Get into recovery mode and then hit install
3. Tap on select image and find the image files
4. Then flash them one by one.
5. Format data and reboot.
https://drive.google.com/folderview?id=1-1tRMeDK7sVzta9kKhAvfVF2B9XZu2ki
If you want to help out and upload the other firmwares, here are the steps:
1. Be on the firmware you want to make the image files for.
2. Make sure you are rooted!!
3. Use terminal from the play store or use adb shell
4. And do the following for each partition.
A. First SU in shell then
For system-
Code:
dd if=/dev/block/bootdevice/by-name/system_a of=/sdcard/system_a.img
For boot:
Code:
dd if=/dev/block/bootdevice/by-name/boot_a of=/sdcard/boot_a.img
For vendor:
Code:
dd if=/dev/block/bootdevice/by-name/vendor_a of=/sdcard/vendor_a.img
Then upload them to Google drive or wherever and share them if you can.
Does it work on G710EM?
Resync said:
Does it work on G710EM?
Click to expand...
Click to collapse
In theory it should.
can you upload the twrpboot for ulm21d?
Can you make the v35 twrp , thanks

Categories

Resources