Making a recovery flashable zip - Android Q&A, Help & Troubleshooting

The format of recovery that we download from official website is .img. How can we make it a cm flashable zip?
Sent from my HTC One X+ using xda premium

Siddharth121 said:
The format of recovery that we download from official website is .img. How can we make it a cm flashable zip?
Sent from my HTC One X+ using xda premium
Click to expand...
Click to collapse
If you are talking about making a stock ROM (.img) into a flashable zip file then you will need android kitchen.
1. Place both boot.img and system.img into Original_Update folder
2. In kitchen click option 1
3. Pick the option that says system.img and boot.img
4. Follow the onscreen instructions
5. Build using option 99.
6. Flash in CWM or TWRP!

Siddharth121 said:
The format of recovery that we download from official website is .img. How can we make it a cm flashable zip?
Sent from my HTC One X+ using xda premium
Click to expand...
Click to collapse
To make the recovery.img flashable in CWMR recovery you would have to create a flashable zip that writes the raw .img file to the recovery partition. The commands to flash it to the recovery partition would be similar to this:
Code:
ui_print("ClockworkMod Recovery v6.0.3.1");
ui_print("for Your Device Name Here");
show_progress(0.500000, 0);
ui_print("Writing recovery image");
package_extract_file("recovery.img", "/tmp/recovery.img");
run_program("/sbin/busybox", "dd", "if=/tmp/recovery.img", "of=path/to/recovery/partition");
delete("/tmp/recovery.img");
ui_print("Complete!");
Note: The ui_print and show_progress commands are just to make it easier for the user to understand what is going on and for a clean look.
The structure for the folder of the flashable zip would be similar to:
META-INF->com->google->android->update-binary and update-script
recovery.img (In the same folder as your main zip do not put this in the META-INF folder)
I would also recommend checking out this guide to edify scripting and creating flashable zip's. Let me know if you still have questions .

Related

[Q] Is flashing an update.zip the same as installing a zip?

I have a couple questions about CWM and backups:
Is there a difference between flashing update.zip and installing a zip from the sdcard in CWM?
Also, let's say I make a change to boot.img and system.img and something goes wrong. Instead of flashing the backups of those two images from my computer to my phone using fastboot, can I just place them both in a zip file and install it from CWM? Would I need to include any other files?
How come a nandroid backup makes a system.ext4.tar and not a system.img? How do I turn that into a system.img?
How come I need unyaffs to read cache, data, and system.img files? I thought the filesystem was ext4 and not YAFFS?
Flashing an update.zip looks for a file on the root of your sd called that and flashes it. Installing a zip let's you choose.
You need to put a few more files into the zip. An update script and binary
Update to romracers recovery and you can do an advanced restore just using certain parts of a nandroid.
That recovery also makes.. Img files rather than tars
sent from my Atrix via XDA premium
marko! said:
Flashing an update.zip looks for a file on the root of your sd called that and flashes it. Installing a zip let's you choose.
You need to put a few more files into the zip. An update script and binary
Update to romracers recovery and you can do an advanced restore just using certain parts of a nandroid.
That recovery also makes.. Img files rather than tars
sent from my Atrix via XDA premium
Click to expand...
Click to collapse
So I found some links about the update-script and I'll be reading those shortly, but after skimming them I didn't see any mention of the binary. Is the binary an executable version of the same script or something else? Any links?
So what your saying is I could just skip the update.zip stuff, extract the images from the zip, and use advanced restore to flash each image? Obviously more work but it's good to know if these two processes are equivalent.
Actually, I just made a recovery using romracer's CWM and boot and recovery are .img files while cache, data, and system are ext4.tar files. pds is .ext3.tar and .android_secure is .vfat.tar. So do you really get system files as .img files? And if so, what's wrong with my CWM? If not, the original question holds: why doesn't CWM make an image of each partition, and instead use a tar? For compression? How would I make this a flashable .img file?
And also the last question about ext4 and YAFFS is still there. Thanks.
Most of those I'm really not sure. The update binary is the same for every zip. Just grab it from a rom or theme
I would go with the cwm zips. Way easier once you get them working.
sent from my Atrix via XDA premium
gsingh2011 said:
Actually, I just made a recovery using romracer's CWM and boot and recovery are .img files while cache, data, and system are ext4.tar files. pds is .ext3.tar and .android_secure is .vfat.tar. So do you really get system files as .img files? And if so, what's wrong with my CWM? If not, the original question holds: why doesn't CWM make an image of each partition, and instead use a tar? For compression? How would I make this a flashable .img file?
Click to expand...
Click to collapse
I was just looking at this too. My old recoveries from before atrix4.1 was released were all .img files and the post atrix4.1 backups are .ext3.tar (except for boot.img and recovery.img). I'm on a stock deodexed GB ROM, so I don't have any ext4 partitions. I think he changed this with the newest update so CWM can recognize the ext type and mount them appropriately.
This post should hopefully clarify a bit more than I can. I'm relatively new to all this so I'm still learning different aspects of modding. I'm guessing you have some ext4's because you're running one of the newer custom ROM's?

Modifying stock rom

I am very interested in ROM developing, the problem is i am a beginner. I tried to look for some guides, but they are quite hard to find to be honest. If i would want to modify stock rom what should i do? Although i could not find it i thought this could be an option:
- flash stockrom through odin
- modify stockrom
- make backup and copy system.img
- in a flashable zip you have the system directory, but how do you obtain this directory from system.img, what program do i need? Simple mounting program poweriso didn't recognize the image. I thought it might be possible to directly extract the required files from the odin package, but not find a guide for this?
Use MagicISO to extract system.img
Sent from my GT-S5830 using Tapatalk
Use 7zip to extract system.img from odin's md5 file.
Sent from my GT-S5830 using Tapatalk
how about dsixda kitchen??
you know you are rooted when you use XDA more than FB
Dragonoid said:
how about dsixda kitchen??
you know you are rooted when you use XDA more than FB
Click to expand...
Click to collapse
dsiXDA kitchen should be used only to zip-align, deodex and repack everything to flashable zip. It isnt really good at extracting .img files (personal opinion).
Read ketut's blackhawk rom's 2nd post for more info about dsiXDA kitchen
Sent from my GT-S5830 using Tapatalk
Probably a dump question, but when i extract the md5 file i obtained only a boot.img file and a recovery.img file, system.rfs file and some other files. Where is the system.img file located? I can't load the .img files with magic iso.
acceleratus said:
Probably a dump question, but when i extract the md5 file i obtained only a boot.img file and a recovery.img file, system.rfs file and some other files. Where is the system.img file located? I can't load the .img files with magic iso.
Click to expand...
Click to collapse
Open magicISO. Click on open -> navigate to system.rfs. It will load up all folders inside system.rfs. Select all -> right click -> extract all
Sent from my GT-S5830 using Tapatalk
Use my guide to get a better understanding of roms.
Sent from my GT-S5830 using XDA
I'm interested in extracting a stock rom from my s5830i to computer
Can someone help me with that. I'm not a newbie

[Q]Noob question about cwm flashable zip

I can create cwm flashable zip using skeleton zip provided by many thread on xda. but, I want to create my own zip.
I took apk, meta-inf for a flashable zip, but when I zip them using 7zip on windows or archive mounter in linux, it shows flashing aboard.
I want to know the zip technique of cwm zip files. How can i create them?
39 view, still no reply. Disappointed
Sent from my WT19i using XDA
Zip file should directly contain meta-inf folder and the folder where you wish to replace/copy apk in the phone's root.
I think you have created a folder, consider 'x', placed meta-inf and ___ folder in 'x', and then zipped the whole 'x' folder as 'x.zip'.
The name of the folder/zip doesn't matter at all.
Also, you need to understand how the updater-script works and edit it according to what files you need to replace/edit.
I can understand update-script.
you mentioned that, I have to create a meta-inf folder and an /system/app folder and directly zip both of them? am I write?
Which zip software do you use for that?
Don't use any compression (storage) in 7zip
Sent from my WT19i using xda premium
i use 7zip....

[Q] Tool that will install roms using a pc?

Does anybody know of a tool that will install roms using a computer? I just want to be able to use a computer program to install roms without messing around with the phone.
I haven't had much luck with "adb shell recovery --update_package=/sdcard/rom.zip".
Or does anybody know of a way to convert the updater-script files in flashable zips into Windows batch files?
To convert zips into a flashable zip.. You will have to make some edit in "Meta-inf" folder
Brady_4love said:
To convert zips into a flashable zip.. You will have to make some edit in "Meta-inf" folder
Click to expand...
Click to collapse
I'm not looking for flashable zips though. I want to be able to install roms without scrolling around with the volume buttons in recovery. Such as a tool that could take a flashable zip, look at the update-script and then push all the files directly to /system and the other correct partitions via adb.
Well That Would Be Great But Recovery Flashing Isn't Hard And Why Can't You Flash A ROM Using Recovery?
Sent from my SAMSUNG-SGH-T769 using xda premium

[Q] How to update CWM on tablet

Hi
I just bought a second hand nook tablet and it was flashed the CM10.2, I'm preparing to flash CM11 on it, but it seems the recovery is a bit older.
I download the latest recovery.img from this post http://forum.xda-developers.com/showthread.php?t=2585175.
But I've no idea about how to update the recovery, could anyone give some help? Thanks in advance.
See http://forum.xda-developers.com/showpost.php?p=47680141&postcount=2.
Oops.
droople said:
Hi
I just bought a second hand nook tablet and it was flashed the CM10.2, I'm preparing to flash CM11 on it, but it seems the recovery is a bit older.
I download the latest recovery.img from this post http://forum.xda-developers.com/showthread.php?t=2585175.
But I've no idea about how to update the recovery, could anyone give some help? Thanks in advance.
Click to expand...
Click to collapse
download the zip file i provided in that same thread u showed. its the second post. not the recovery.img. do the img file only if u know wut ur doing. put the zip i gave into a sd card. reboot into cyanoboot. open internal recovery. choose zip from sd card. choose the zip file i gave u. which means flashing it......reboot into cyanoboot. open internal recovery and now u have the newest cwm....lmk if u are confused.
newbtrigger69 said:
download the zip file i provided in that same thread u showed. its the second post. not the recovery.img. do the img file only if u know wut ur doing. put the zip i gave into a sd card. reboot into cyanoboot. open internal recovery. choose zip from sd card. choose the zip file i gave u. which means flashing it......reboot into cyanoboot. open internal recovery and now u have the newest cwm....lmk if u are confused.
Click to expand...
Click to collapse
thank you newbtrigger69
droople said:
thank you newbtrigger69
Click to expand...
Click to collapse
anytime i can help a fellow xda member
and if u can. remember to thank me on the tab
dont want to fall behind on those
<-----------------------------------------------------
How do u update TWRP?
Sent from my SGH-T889 using XDA Premium 4 mobile app
jpelagio11 said:
How do u update TWRP?
Click to expand...
Click to collapse
Here's how:
Download any flashable internal recovery zip file (e.g., flashable_CWM_6.0.2.9.zip from Succulent's repo http://goo.im/devs/succulent/acclaim/recovery).
Use an archive file manager such as 7-zip to delete and replace the recovery.img inside the flashable zip file with your choice of TWRP (internal recovery) file from http://techerrata.com/browse/twrp2/acclaim (e.g., openrecovery-twrp-2.6.3.1-acclaim.img); remember to rename the downloaded TWRP .img file to recovery.img before inserting it into the zip file.
Flash the resulting flashable recovery zip file using current EMMC recovery or SD-based recovery.

Categories

Resources