How to extract recovery from boot.img and flash it alone? - Android Q&A, Help & Troubleshooting

Hi, I have boot.img from another custom ROM. I like the recovery contained in it but can't flash the kernel. Is it possible to extract the recovery only from the kernel and flash it alone.
fastboot flash recovery recovery.img
How do I get the recovery.img
boot.img containing 4 files, 0, 1, 2, 3 which I can extract, but how do I know which is the recovery?

Related

[KERNEL] About flashing kernel for all Roms

Hi,
Because i like to test many different Roms with kernels, i created my own script to flash properly with the recovery.
Often, the Kernels are available for a Rom in particular, in a zip file containing a boot.img with the kernels modules contained in /system/lib/modules
The problem is that to start, Android does not need that kernel, but also the image of a micro file system (zImage) containing startup instructions, but also a list of parameters to pass to the kernel.
The boot.img is the concatenation of the kernel with its startup parameters, and zImage.
To properly replace a kernel, so we need to retrieve the current settings, the current zImage, and reform the boot.img with the new kernel, and of course, replace the modules.
This recovery script make these step:
- Extract the kernel from the boot.img file
- Get the boot parameters of actual kernel.
- Get the actual zImage
- Rebuild the boot.img with new kernel, old boot parameters, old zImage
- Replace the modules in /system/lib/modules
- Flash the new boot.img
Before do that.
Download the kernel from other Rom, you want to flash
Extract from the zip file, boot.img and /system/lib/modules directory
Get my kernel_flash.zip
Extract it.
Replace the system/lib/modules content with the new one.
Replace the boot.img with the new one.
Rebuild you zip file with 7zip (www.7zip.org)
This zip file containing:
META-INF
boot.img
kernel
system
version.txt
And flash it under recovery.
I tested these method with Senses Roms, with AOKP or AOSP Roms. Always in my system started succefully.
You should be able to flash this kernel on any ROM (except the boot stock that has an offset of 256 bytes incompatible with the script)
As is, this kernel_flash.zip file contains a yoda kernel 2.1, overclocked to 1.5 Ghz, you can test with your ROM.
Sorry for my english.
Thank you to Google for translation assistance
Thank you for the kernel to yoda (my kernel_flash.zip contain 3.0.16-yoda_v2.1)
Thank you to all XDA developers who allowed me to further my understanding
looks promising, but does this work also for s-on users ? i dont know if you knew this already, but there is https://play.google.com/store/apps/details?id=com.joeykrim.flashimagegui&hl=en this app in playstore, which works for both s-on and s-off users, and also flashes recovery
gav-collins1983 said:
looks promising, but does this work also for s-on users ? i dont know if you knew this already, but there is https://play.google.com/store/apps/details?id=com.joeykrim.flashimagegui&hl=en this app in playstore, which works for both s-on and s-off users, and also flashes recovery
Click to expand...
Click to collapse
For s-on:
After flashing kernel under recovery, only /system/lib/modules files are copied
Keep in Recovery,
You need to flash the kernel with fastboot.
Open a terminal
with adb, pull the boot image:
Code:
adb pull /tmp/newboot.img boot.img
Restart in fastboot mode
Code:
adb reboot bootloader
Flash the boot.img file
Code:
fastboot flash boot boot.img
fxjumper said:
For s-on:
After flashing kernel under recovery, only /system/lib/modules files are copied
Keep in Recovery,
You need to flash the kernel with fastboot.
Open a terminal
with adb, pull the boot image:
Code:
adb pull /tmp/newboot.img boot.img
Restart in fastboot mode
Code:
adb reboot bootloader
Flash the boot.img file
Code:
fastboot flash boot boot.img
Click to expand...
Click to collapse
would it flash the kernel if you are using 4ext recovery ?
Pacattack said:
would it flash the kernel if you are using 4ext recovery ?
Click to expand...
Click to collapse
My phone is S-OFF
4ext recovery flash the kernel.
I know 4ext dispose a S-ON mode to flash the boot.img on the first boot, but i don't know if it works in this case.
Try it

[Q] Flashing boot img

I am S-On. What are the proper steps to flash a Rom, but also having to flash the boot.img? Thank you for any help.
Wmckinnon46 said:
I am S-On. What are the proper steps to flash a Rom, but also having to flash the boot.img? Thank you for any help.
Click to expand...
Click to collapse
Flash Rom in twrp. Pull boot.img out of the Rom's zip file and place in your working fastboot directory. Reboot to fastboot/bootloader from twrp. Command from your pc will be
fastboot flash boot boot.img

LG L9 II D605 - Flash CWM via Flashify (help)

Hello. I have d605 with 20g and root via kingroot. I want flash varcains CWM. But when i execute loki flash, it says loki aboot version does not match device and fails. When i try flash zip for flash from other recovery - try flash via stock 3e recovery, it says instalaion aborted and error 255. So i want flash it via app Flashify, but its risk. Did someone already tried it? And how to do it? Select flash zip (in flashify) and select cwm*.zip or unpack recovery.img and select flash recovery (in flashify) and put unpacked recovery img?
PS it can be also twrp, i want just working recovery for flash CM11
Thanks for help.
https://play.google.com/store/apps/details?id=com.cgollner.flashify&hl=en
Features:
1 - Flash boot and recovery .img without even needing to go to recovery.
Click to expand...
Click to collapse
Which means you have to extract recovery.img from the zip file and flash recovery.img via flashify.
When I select flaah recovery in Flashify and select CWM .zip, it says i have to select file with .img file. And in that zip is the recovery.img file.
shhnedo said:
Which means you have to extract recovery.img from the zip file and flash recovery.img via flashify.
Click to expand...
Click to collapse
I think I explained it in a fairly simple way. You need the .img file, NOT THE .ZIP file.
It doesnt work . I unpacked recovery.img from cwm.zip. Then opened Flashify and selected recovery flash, and put unpacked recovery.img (before it i make recovery backup). It said flash successful and then i used reboot recovery. But it shows only black screen with text like "fastboot mode stared udf start". I must remove battery and put back, then it normal booted to android... Reboot to recovery always open the black screen with that text and is needed battery remove (fixed via recovery restore from backup in flashify, then reboot recovery opens stock 3e recov.)
Please What now? Thx

is BOOT.img is Recovery ?

Hello
how to find recovery img file on stock rom , I seen a post in that mentioned boot.img is recovery . extract and flash it to get stock recovery
Boot.img is kernel. Recovery is recovery.img
Root your device. Install file good manager.explore system files.you will find recovery.img

how create zip file from update.app file?

Any body can help me how to repack update.app (stock rom) into flashable Zip
My phone have unlocked bootloader and have twrp.
Impossible to flash stockroom with update.app file via twrp.
I`ve tired using custom rom so many bug.
I want rolling back into stockrom with keep twrp n unlocked bootloader.
I've lost my backup
Sorry bad English
Device SCL-L21
1. extract boot.img and system.img for update.app using huawei update extractor
2. copy them into fastboot folder on your computer
3. go into fastboot mode and type this on you computer:
fastboot flash boot boot.img
&
fastboot flash system system.img
3. when completed just type "fastboot reboot"
4. wipe data and cache in recovery to start your phone like new
that`s what i do when i flash stock rom
TheWarrior12345 said:
1. extract boot.img and system.img for update.app using huawei update extractor
2. copy them into fastboot folder on your computer
3. go into fastboot mode and type this on you computer:
fastboot flash boot boot.img
&
fastboot flash system system.img
3. when completed just type "fastboot reboot"
4. wipe data and cache in recovery to start your phone like new
that`s what i do when i flash stock rom
Click to expand...
Click to collapse
Hi man, itś so many years dead discussion, but now i need upgrade my Honor 5C. I don´t know if i´ve make something bad, but if i try flash system from stock rom (NEM-L21C432B364), my phone is dead. Only recovery and fastboot mode is working. I´ve try upgrade from version B132. Can you help me please? Now I am not sure, if upgrade version B132 directly to B364 is OK....

Categories

Resources