read/edit .img files - Desire General

Does someone know how to mount/read/edit the .img files in the ROM?
I Know it is a small filesystem.
I googled for an hour and still don't know how it works.
For example the Radio ROM, i'd like to read the contents, Why is it for about 25MB's
Is it possible to tweak the contents and stuff.

Not sure about radio rom.
unyaffs for system.img
unpack-bootimg.pl/repack-bootimg.pl for boot.img

I think you want unyaffs. I used it to decompile a nandroid backup .img so i could take some files form it.
EDIT: Damn you Adam!

unyaffs says `Broken image`
So that won't work.
will try: unpack-bootimg.pl/repack-bootimg.pl
but i think it's for the boot.img file.
also intresting to look at.

Related

Modify RUU?

Is it possible to modify the file that the RUU writes to the device. I've noticed that when the RUU is installing, it copies a "RUU_signed.nbh" file to somewhere. Im guessing that it then extracts/writes RUU_signed.nbh to the device.
SO would it be possible to replace the RUU_signed.nbh with one that you get frm some custom ROM?
bump. Oh and by the way, if it helps, I'm have a Wing/Atlas/Herald.
I think the idea here is to figure out where the RUU_Signed.nbh file is stored before being written to the device.
Any help?
use winrar with the exe upgrade file...
oh wow. never thought of that. gonna try. hopefully this opens up some sorta new frontier in rom flashing. probably not, but the possibility to be able to flash via modded ruu sounds cool. feasability?
sorry for the double post, but i've now managed to disassemble the RUU via 7-zip and have inserted a custom rom in place of the normal RUU_signed.nbh file. Heres the funny part. How how do a i reassemble it. Maybe it's possible to just RUU without reassembling, but it makes everything easier to manage

Merging Flashable ZIPs

Hey everyone, so I'm just starting to buckle down and learn more about Android Mods. Here's my latest question. I have a few zip files that I always flash on top of a new ROM. These include at the moment, a Rotary Lockscreen and the DroidX boot animation, possibly a circle battery shortly.
My question is, would there be a simple way to merge these zip files so I only have to flash one every time I load a new ROM, or even better, load these into a ROM file before flashing?
Is it as simple as opening the ZIPs, moving the files from one to the other (keeping the directory structure intact) and re-zipping the lot? Or is there something more complicated I need to look at...
Thanks in advance!
Edit: A quick look in one of the files revealed a .xml file with some references to the files to be installed. I assume I would have to edit the .xml to include all the instructions from each mod, but if that's all it takes, that should be easy... Again, I ask all of you... Am I missing something?
PSULightingGuy said:
Hey everyone, so I'm just starting to buckle down and learn more about Android Mods. Here's my latest question. I have a few zip files that I always flash on top of a new ROM. These include at the moment, a Rotary Lockscreen and the DroidX boot animation, possibly a circle battery shortly.
My question is, would there be a simple way to merge these zip files so I only have to flash one every time I load a new ROM, or even better, load these into a ROM file before flashing?
Is it as simple as opening the ZIPs, moving the files from one to the other (keeping the directory structure intact) and re-zipping the lot? Or is there something more complicated I need to look at...
Thanks in advance!
Edit: A quick look in one of the files revealed a .xml file with some references to the files to be installed. I assume I would have to edit the .xml to include all the instructions from each mod, but if that's all it takes, that should be easy... Again, I ask all of you... Am I missing something?
Click to expand...
Click to collapse
i think you need to edit the meta file and the xml file, but this can be done though.
PSULightingGuy said:
Hey everyone, so I'm just starting to buckle down and learn more about Android Mods. Here's my latest question. I have a few zip files that I always flash on top of a new ROM. These include at the moment, a Rotary Lockscreen and the DroidX boot animation, possibly a circle battery shortly.
My question is, would there be a simple way to merge these zip files so I only have to flash one every time I load a new ROM, or even better, load these into a ROM file before flashing?
Is it as simple as opening the ZIPs, moving the files from one to the other (keeping the directory structure intact) and re-zipping the lot? Or is there something more complicated I need to look at...
Thanks in advance!
Edit: A quick look in one of the files revealed a .xml file with some references to the files to be installed. I assume I would have to edit the .xml to include all the instructions from each mod, but if that's all it takes, that should be easy... Again, I ask all of you... Am I missing something?
Click to expand...
Click to collapse
what is the full name of the .xml file you see?
the recovery reads a file called update-script or updater-script inside the zip file META-INF/com/google/android/ directory. you memorize that directory path after messing with enough zip files!
that file tells the recovery what actions to take with which files. for list of very basic commands for this update-script file, i have a guide - http://forum.sdx-developers.com/android-2-1/creating-an-update-zip-list-of-commands/
it is possible to merge update.zip files but its important to understand their structure and how the commands are executed.
also signing .zip files is a whole different topic...
hopefully this helps get you going in the correct direction!
joeykrim said:
what is the full name of the .xml file you see?
the recovery reads a file called update-script or updater-script inside the zip file META-INF/com/google/android/ directory. you memorize that directory path after messing with enough zip files!
that file tells the recovery what actions to take with which files. for list of very basic commands for this update-script file, i have a guide - http://forum.sdx-developers.com/android-2-1/creating-an-update-zip-list-of-commands/
Click to expand...
Click to collapse
Since all the files have this could you copy and paste the codes inside them into one file?
Sent from my PC36100 using XDA App
chandlerw88 said:
Since all the files have this could you copy and paste the codes inside them into one file?
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
You would want to read up a little bit and make sure you understand the commands, but yes. You do not want to copy the entire set of commands, just the particular needed lines. Often you don't need to change anything because the script may just say copy this entire system directory and everything in it will go.
Sent from my PC36100 using XDA App
It's pretty basic.
Move all the files into the same zip delete everything in meta-inf except the update script.
Adjust the script accordingly, pay attention to syntax or better yet just look at all the individual scripts and put them together, then remove dupes
As for zip signing..
This is what you need
http://forum.xda-developers.com/showthread.php?t=666441
OK, thanks! This has all helped a lot and I think I nailed the basics that I was shooting for, just haven't been able to test yet since no need to re-flash a working ROM.
My next question is, would there be a way to force files INSIDE an APK? Trying to add a different battery meter (have the images) to framework-res.apk and would love to do that from a boot script... Ideas?
PSULightingGuy said:
OK, thanks! This has all helped a lot and I think I nailed the basics that I was shooting for, just haven't been able to test yet since no need to re-flash a working ROM.
My next question is, would there be a way to force files INSIDE an APK? Trying to add a different battery meter (have the images) to framework-res.apk and would love to do that from a boot script... Ideas?
Click to expand...
Click to collapse
yes, its called 7-zip and its your new best friend in this battle. heres how i learned.
i started ripping apart the things that i liked, including roms themselves. now find an update zip that has the files inside the folders that you will need to add, and you can then recycle that update zip. here it is plain and simple:
1.use 7zip to VIEW; NEVER UNZIP the files(forget about windows zips)
2.check what folder the apps you will be putting in belong in
3.put them in their corresponding folders(some apps are tricky when you need to install their libs too and you dont know it)
4.erase the 3 bottom files in your meta-inf folder
5.resign the rom
6.verify the sign(look for the new certs)
7.move to sd
8.flash rom
9.have a pop,beer, or w/e your vice.(my fave is cherry coke)
if you need help getting started feel free to pm. you dont know who i am, but ive been thru this process many times.
​
Actually, that's not quite what I'm talking about... I want a flashable zip that will add certain images (the battery meter) to the INSIDE of a .apk file that already exists on the device. Not sure if it's possible, but if so, I'd love to know... If not, I'll try pulling the .apk and using 7-zip...

help with file permissions, converting .IMG files to update.zip ROMs.

I've successfully scripted the automated creation of a file structure into which the contents of BOOT.IMG, SYSTEM.IMG, DATA.IMG, CACHE.IMG and SD-EXT.IMG are extracted. The script also creates a valid update-script file under ./META-DATA/....
The only issue I have is that I'm using windows so the .IMG files extracted as a yaffs file system, looses the original file permissions. I need someway to recreate the permissions in the update.zip.
Thats all.
Having a way of converting a nandroid backup to an update.zip means you can very easily cook custom roms from a nandroid backup, and port ROMs across phones using a portable .ZIP format.

[Q] how to extract .apk from a nand backup?

is it possible to extract an .apk file from a nand backup made with Amon_Ra (1.8)?
i switched roms to MIUI and i can't find Volume Button Controller on the market. I've had it on my phone for months and I can't function without it. i've searched online and all i come up with is broken market links and links saying the app has been removed from the market.
it was a free app, that I have on a backup. just dont want to have to backup my current miui setup (in progress), to restore that one, to restore this one again, etc. plus i think knowing how to do this will be useful in the long term.
i'm on Windows XP so I'm restricted to that platform on terms of getting it to work. google search turned up an app called unyaffs but it looked like a linux thing
thanks!
backup what you are on. restore your nand of where you have the apk. and then use titanium backup to backup your app. Restore your latest nand and use titanium to restore the app.
Swyped from my cyanogenized and gingerbreaded EVO
You can also extract files directly from the img files. Install Cygwin with the default options and download unyaffs compiled for windows. Place unyaffs in your path for ease of access, copy the system.img file out of your nand backup and drop it into a folder that is easy to get to. Start Cygwin, cd to the folder the img file is stored, type unyaffs system.img. That will extract all the files from the system.img file. Most of what you need should be in the app folder. Some things will need stuff from the lib folder too, like swype.
Sent from my PC36100 using Tapatalk
thanks for the info.
ended up going the route i didnt want to go. installing cygwin was taking forever!
but now i know for the future
Yeah, Cygwin can take a while if you are on a slow connection or get stuck on a slow mirror.

[Q] Taking APKs out of a nand backup.

I backuped, full via CWM, is it possible to take out the APKs out of it?
http://forum.xda-developers.com/showthread.php?t=1112906
As posted above. Use unyaffs to extract the system image.
Ephumuris.
Tank you both, all thouth I rather use Linux for this. I actually though it would be easier. Thank you any way
Can use unyaffs in Linux or Windows its actually very easy.
Ephumuris.
Just use Yaffs explorer apk for the Defy and you can explore your nandroid backup and extract apks to your sdcard.

Categories

Resources