I want to open up a system.img from an older bart backup to extract a couple apps. How can I do this? Seems like any archive program doesn't want me to open it.
Yeah you can't actually extract apps like that. You would have to flash the system.img, let it load up, and back up your .apks from there.
Another method that I have never tried for myself is to mount the system.img in the sdk emulator and see if that gets you anywhere.
If you are on linux, you can use the unyaffs to extract the contents of .img files.
peshal said:
If you are on linux, you can use the unyaffs to extract the contents of .img files.
Click to expand...
Click to collapse
a month and a half later, but thank you! This will be useful in the future.
Ooh yes that will be useful for me as well, thanks!
Related
My default browser went foobar on me when i tried to go into the about menu.
Could someone upload the 2.1 apk and odex pls.
Thanks
EDIT: Changed the topic name to reflect the newly found utility that helped me recover my files since. I had no current backup and did not want to start from scratch. Figured it could help if you ever find yourself in that situation or want to extract files from other rom backup.
nm 10 chars
Unyaffs
Did some digging around and found a nice utility to extract the files from the .img. Extracted the system.img from the stock rom unpackaged it with unyaffs.
Here's the utility
Code:
Usage: unyaffs name_of_file.img
WARNING **This will extract all the files in the working directory**
HI,
I am trying to get an apk from a KDZ file. I can open up the KDZ but then there are many other files inside. I guess the apks are in one of these other files. Does anyone know how to get the apk from within .img files etc?
Thanks
ballandbiscuit said:
HI,
I am trying to get an apk from a KDZ file. I can open up the KDZ but then there are many other files inside. I guess the apks are in one of these other files. Does anyone know how to get the apk from within .img files etc?
Thanks
Click to expand...
Click to collapse
How you extracted KDZ?
Why don't you get it from the sapps module zip on void's rom?
I need a particular app from the Orange UK ROM - the app is called Signal Boost and it is for UMA calling.
Is that app in the ROM you mention?
What you need is this: http://forum.xda-developers.com/showpost.php?p=6303911&postcount=827
It allows you to decompress system.mbn (where all the files are).
Compile it under linux, or use cygwin.
Remember that official ROMs are odexed. If you want to deodex apks, you can use dsixda's excelent kitchen. It is used to make lots of ROMs you see around here.
For that, take a look here (you can also use it under cygwin):
http://forum.xda-developers.com/showthread.php?t=633246
If you understand portuguese, or use a translator, check these:
http://www.androidpt.com/index.php?option=com_kunena&func=view&catid=97&id=91547&Itemid=30
http://www.androidpt.com/index.php?option=com_kunena&func=view&catid=97&id=97416&Itemid=30
Most info was gathered from xda forums, only translated and organized to portuguese folks.
Many thanks, I will see if I can get anywhere with this.
You just need to compile unyaffsmbn (gcc unyaffsmbn.c -o unyaffsmbn).
Then copy system.mbn to unyaffsmbn folder. Then do:
./unyaffsmbn system.mbn
You'll have all files extracted in few seconds.
Then if you want to use those files in kitchen, do this:
First install kitchen, as explained in link i posted above.
Delete all symlinks in bin/ (i think there are 52)
Then you must create a zip file with this structure:
/boot.img
/system/ (here you put all the files you extracted. You should have 10 folders and 1 file)
Now just copy this zip to PATH_TO_KITCHEN/original_update/
Then run it with:
cd PATH_TO_KITCHEN
./menu
Right I have three system.mbn files named:
system.mbn_0
system.mbn_1
system.mbn_2
I have tried a few tools (under Windows) to extract them. Firstly a windows compiled version of unyaffs which falls over with : Exception: STATUS_ACCESS_VIOLATION at eip=61100F73
I then tried another version which didn't error but also didn't do anything!
A different tool errored with "the header states that its binary is longer than the whole file" which makes me think perhaps these three files need combining into one?
I have tried combining them into one file using the copy /b command in Windows which creates a single large file but I still have the same issues trying to unpack it.
Any more ideas? Thanks
Right have now installed Cygwin and managed to extract the files using unyaffsmbn! Thanks for all your help, learnt a lot today!
Right I have three system.mbn files named:
system.mbn_0
system.mbn_1
system.mbn_2
Click to expand...
Click to collapse
How did you decompress kdz? I use LG Utils to extract to dz, then dzdecryptor to decompress dz to individual files. Then i use the tools i named to do the rest of it.
Also i can see that lg utils finds those system*, but puts them together before it ends. Maybe you used different software.
Anyway, i'm glad you managed to work it out
I have tried a few tools (under Windows) to extract them. Firstly a windows compiled version of unyaffs which falls over with : Exception: STATUS_ACCESS_VIOLATION at eip=61100F73
Click to expand...
Click to collapse
There is unyaffs, and unyaffsmbn. unyaffs also never worked with me.
I've read somewhere that with lg roms we must use unyaffsmbn. Don't remember were i saw it, neither why...
I used LG utils to extract the KDZ, then used DZExtract to expand the .dz file. Then I combined the system.mbn_0,1,2 files using copy /b.
I then used Cygwin and gcc to make unyaffsmbn.exe which then worked on the combined system.mbn file. Managed to get the apk I needed too.
PLease upload unyaffsmbn.exe for me please as i seriously need it.
Here you go...
Hi!
Since xda-univeristy arised i thought it would be nice to learn something about green droid
I am going to learn about tweaking and theming:and here comes dozens of my questions:
1. I have downloaded Official ics repack by N00BY0815
2. I extracted it and i have:
2 folders ( META-INF and System)
2 files boot.ing and system.img
How can i extract this system.img ?
I tried to use 7zip but it says that" it cannot open it as archive"
Thanks in advance and please for leniency
it can be opened with Diskinternals Linux Reader. if not. use "sgs2toext4.jar" to convert it to .img.ext4 and then open it
Nihiliu said:
Hi!
Since xda-univeristy arised i thought it would be nice to learn something about green droid
I am going to learn about tweaking and theming:and here comes dozens of my questions:
1. I have downloaded Official ics repack by N00BY0815
2. I extracted it and i have:
2 folders ( META-INF and System)
2 files boot.ing and system.img
How can i extract this system.img ?
I tried to use 7zip but it says that" it cannot open it as archive"
Thanks in advance and please for leniency
Click to expand...
Click to collapse
Everything for theming is in the System folder. All the APK's(Applications) Boot.img is probably the recovery image it installs. But to theme you would need to decompile the apks in the system folder
Everythink was in system folder in gingerbread, in this system folder i have only app folder with su.apk and bin folder with su file.
So files i need are in system.img
@broodplank1337 thanks for help, program works well, now i can begin
But first only one question, now i can extract files, but can i pack them using same tool ?
Nihiliu said:
Everythink was in system folder in gingerbread, in this system folder i have only app folder with su.apk and bin folder with su file.
So files i need are in system.img
@broodplank1337 thanks for help, program works well, now i can begin
But first only one question, now i can extract files, but can i pack them using same tool ?
Click to expand...
Click to collapse
I don't know much about S2 but can't you just use 7zip to make it an archive and flash it through rrecovery?
"Anger and intolerance are the enemies of correct understanding." -Mahatma Gandhi
Nihiliu said:
How can i extract this system.img ?
Click to expand...
Click to collapse
Hi. You can use dsixda's Android Kitchen for that.
Nihiliu said:
Everythink was in system folder in gingerbread, in this system folder i have only app folder with su.apk and bin folder with su file.
So files i need are in system.img
@broodplank1337 thanks for help, program works well, now i can begin
But first only one question, now i can extract files, but can i pack them using same tool ?
Click to expand...
Click to collapse
You can pack them with the android kitchen, install the zip, then you do this in terminal emulator to make the system.img file:
Code:
su
cat proc/mounts
now look up the system partition, in my case it's mmcblk0p14
Code:
dd if=/dev/block/mmcblk0p14 of=/sdcard/system.img BS=4096
This will dump the system partition to system.img (for example when making an odin image)
I tried using 7zip, extractnow and some random program I found on google called ext4_unpacker.exe. I want to extract the system and dig through and edit the files and the same thing with the modem.
I get cannot open as archive with 7zip, "unknown file format" with ext4 unpacker and it just won't open with extractnow.
thanks for the help in advance. and apologies in advance I know this is super noobish but the programs just won't work :crying:
Use adb to pull the files then use a hex editor?
nhizzat said:
Use adb to pull the files then use a hex editor?
Click to expand...
Click to collapse
I'm assuming you mean pull them from the phone? Also I still want to be able to extract the files so I can examine older firmware versions, being that I'm on 4.4.2 stock.
So my question still remains, how can I extract the files?
Here's a quick guide on how I make my ROM's once I have everything I want in my setup.
Step 1: Backup system.img and boot.img.
Code:
adb shell
su
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/sdcard/system.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/sdcard/boot.img
reboot
If system.img gets around 3.4gb or higher it needs to under 2.1gb zipped to be flashable. If its not your going to have to zero out the free space so it will compress under 2.1gb's. If this is the case to go step 2.
Step 2: Zerofree the image by installing zerofree. Unzip the file attached here in Ubuntu 14+ and install it.
I created a folder on my desktop and called it zerofree and put the system.img inside it. Run this code:
cd Desktop
cd zerofree
zerofree -v system.img
Click to expand...
Click to collapse
It will zero out the system.img. Though its still might be the same size, don't worry as when you put it back in the zip it will compress way down.
Step 3: Add to ROM. Now add the system.img and boot.img to ROM-Flash.zip attached and your ready to go!
MicroMod777 said:
Here's a quick guide on how I make my ROM's once I have everything I want in my setup.
Step 1: Backup system.img and boot.img.
Code:
adb shell
su
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/sdcard/system.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/sdcard/boot.img
reboot
System.img will be around 3.4gb and once its put in a zip to flash needs to be under 2.1gb. If its not your going to have to zero out the free space so it will compress under 2.1gb's. If this is the case to go step 2.
Step 2: Zerofree the image by installing zerofree. Unzip the file attached here in Ubuntu 14+ and install it.
I created a folder on my desktop and called it zerofree and put the system.img inside it. Run this code:
It will zero out the system.img. Though its still might be the same size, don't worry as when you put it back in the zip it will compress way down.
Step 3: Add to ROM. Now add the system.img and boot.img to ROM-Flash.zip attached and your ready to go!
Click to expand...
Click to collapse
I think I already know the answer to this, but I want to be sure. Does this method make a flashable copy of just the ROM, not any personal stuff or apps you install from the store? I'd like to do this to flash my copy of a crdroid on another LG G2, but I don't want my personal stuff on it. I would just like it to be setup the way I have it now because I have removed a lot of things I don't need and made some changes to a few of the stock apps. It would be nice to be able to port those changes to another phone quickly and easily.
flyinjoe13 said:
I think I already know the answer to this, but I want to be sure. Does this method make a flashable copy of just the ROM, not any personal stuff or apps you install from the store? I'd like to do this to flash my copy of a crdroid on another LG G2, but I don't want my personal stuff on it. I would just like it to be setup the way I have it now because I have removed a lot of things I don't need and made some changes to a few of the stock apps. It would be nice to be able to port those changes to another phone quickly and easily.
Click to expand...
Click to collapse
This basically only saves whatever changes you make the system. For example, lets say you debloat a rom using Titanium backup removing system apps. Those changes will be made to the system.img.
MicroMod777 said:
This basically only saves whatever changes you make the system. For example, lets say you debloat a rom using Titanium backup removing system apps. Those changes will be made to the system.img.
Click to expand...
Click to collapse
That's what I thought and that's what I want. Thanks. Going to give this a shot right now.
Where does it place the two .img files when it's done? I can't find them on my sdcard or my computer. Nevermind. I tried this on another phone first just so I didn't screw up my daily phone in case I did something wrong. They were put on the internal storage instead of the sdcard.