Extracting files from system.img - Android Q&A, Help & Troubleshooting

I have some problems extracting files from a system.img file in windows
after hours of different tutorials im still stuck at 0 and hope someone got a solution.
almost every post and video i find shows the easy use of sgs2toext4.jar and how it goes from here to the linux reader.
My main problem here is that sgs2toext4jar gives me a system.ext4.img that 0kb.
added a screenshot that show the problem here.
Do you know of a way that works? Im not a pro user, more of a newbie just so its said, but i can read and follow a tutorial if there is one.
this is what ive done so far:
**Ive downloaded a stock rom for my tablet
http://www.galaxyrom.com/2015/11/up...ytab-e9-6-wi-fi-sm-t560-to-android-4-4-4.html
**unpacked the file with 7-zip and from T560XXU0AOK1_T560XEU0AOH1_HOME.tar and have found myself with the the system.img
Installed programs after tutorials
7zip
ext4 unpacker
ex2explorer
linux reader
system.ext4
Cygwin64

Anyone been able to do this?

Related

[Q] How to view/extract files from nand backup .img files?

Hello.
Sorry if this has been asked/answered before, but I can't seem to find a way to view and extract content of .img nand backup files on android phone itself and/or PC with Windows OS. (currently only looking for system.img file)
I've read there is a "unyaffs" program, but its for linux.
I have Samsung Galaxy S II Skyrocket and it's CWM saves system into .tar archive, which makes it very handy cause, because WinRAR reads these files just fine.
Thank you.
unyaffs can be used in windows too.. just try looking a little harder..
Download the attachment.. I've repacked it with the cygwin dll
Hope it helps..

[Q] How to Extract data from .Backup file ? - Created with android system recovery

I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
looking for the same
reena0307 said:
I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
Click to expand...
Click to collapse
me too looking for the same thing ..how to extract from or decompile .backup file which we get thru recovery.
hi loverboyritesh :: i and you are in same position.. but some advaaanced users are here that we are telling rumors and lies.. dont worry bro.. even i'm trying to get solution.. will tel you after geeing one.. Still no one can tell me hoe to extract .BACKUP file..
same
i am looking for how to reinstall .backup myself so i can have my original rom install.
but i have notice my .backup is 700+mb while custom rom is 200+mb
do you know how to?
reena0307 said:
I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
Click to expand...
Click to collapse
same here. dunno how to open and extract the files from a .backup file. hoping you know already
siiingkeeet said:
same here. dunno how to open and extract the files from a .backup file. hoping you know already
Click to expand...
Click to collapse
Nope.. Still i'm having that file but no one knew
reena0307 said:
Nope.. Still i'm having that file but no one knew
Click to expand...
Click to collapse
been searching for 5 days now :<
not a single answer found on google and forums
cant even post a new thread yet. just joined
hope someone will drop by this thread
still no solution?
got same problem here
Got a bootloop issue with an ASUS MeMo Pad 7 HD and I've booted in recovery <3e> to make a backup.
I've got a userdata_YYYYMMDD_HHMMSS.backup. I tried opening it with a bunch of tools like unyaffs, abe (Android backup extractor), going live on the file using linux tools (open as 7zip, zip, rar, tar, tar.gz, gz, bz2 , mount as iso, ext4 and so on....)
Still no luck :-/
Only clue is that the file seems compressed. During the backup under recovery, it told me 3600MB to backup and the file userdata_xxxxxxxx_xxxxxx.backup show only 2.61GB
I did this backup 3 time to ensure there were no corruption during the write process from the pad and did again the same "tests" to open the file...Not better.
If any dev' have any clue of the file format, I'd be glad to help
It doesn't seem to be a valid unix img file. Tried mounting it to no avail. When it's restored by the recovery it also extracts the individual files because i fails on one in my case and stops the entire restore... I tried unzipping it, changed extension to ,jar, .tar, .zip, etc., none of them are recognised...amazing for a standard android feature to find so little info about it
Any solution?
I called Alcatel's technical service today and they told me that you can use the backup file only from the phone. Mine gives me the following error when I try to restore it: Error Magic header
If anyone knows how to unpack the backup file I would be more than grateful.
It's a 512 byte header in front of a "tar.gz"
hexdump -C userdata_xxxxxxxx_yyyyyy.backup | less​showed the magical zip header "1f8b0800 00000000" at offset 0x200
So, skipping 512 bytes, the rest can be gunzip | tar
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv​
Sir ektoric what d u mean on ur post?
Sorry cant understand it..
Can u please d a step by step procedure? Please...pls...plss
Thanks in advance...
Steps?
@ektoric sir im a noob in this... Can u show a step by step procedure?
@killen00 sorry, I assume you have a linux machine (or have access to one). The command is actually all there is to it.
Code:
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv
If you don't have a linux machine available, might I suggest one of the many distros of your choice, most of which have LiveCDs which you can run without installing.
script for gunzip method
maybe on xda it is common sense, but for me it was necessary to know, that these stock android recovery extracted files can be restored with nandroid custom recovery, if you simply repack them into tar archive.
i put this two command lines in a dirty shell script (extract + repack as tar).
thanks to ektoric figuring out his gunzip method!
edit: notamamasboy's mount method added (but not tested yet). if script not works come back few days later, download again and check version, maybe it has changed meanwhile.
with this you're able to transfer data of non-rooted phone to (rooted) similar one.
this is useful in case touchscreen is broken, you haven't custom recovery installed, usb-debugging is disabled and connecting usb-otg-mouse doesn't work.
tested on my Archos 50 b Oxygen (Mediatek MT6582).
it works for me, feel free to improve, port to busybox and publish. no support. use at own risk.
edit: bckp2cwm.sh is deprecated it is FOR JELLY BEAN ONLY (no selinux support)
a newer (selinux) version bckp2win.sh for TWRP you can find here:
http://forum.xda-developers.com/showthread.php?t=3775129
How did you go about determining the magic number found at 0x200? My hexdump output does not have that magic number (1f 8b) in any instance. Leads me to believe my backup is not a tar file. Any suggestions then?
@notamamasboy, you are unfortunately correct.
Someone else also mentioned that their
Code:
userdata_xxxxxxxx_yyyyyy.backup
file was not of the same format I tried some "known magic headers", and could not find anything tell-tale. In which case, without some clues, you are back at square one.
ektoric said:
@notamamasboy, you are unfortunately correct.
Someone else also mentioned that their
Code:
userdata_xxxxxxxx_yyyyyy.backup
file was not of the same format I tried some "known magic headers", and could not find anything tell-tale. In which case, without some clues, you are back at square one.
Click to expand...
Click to collapse
Even more peculiarly, two backups were created a .backup and a .backup2, I wonder if combining with cat I can get somewhere...

[Q] issue with extracting system.img from an official source

ok, ima try to make this short and sweet. Im attempting to extract the contents of system.img from an official samsung firmware using unyaffs2
this is quite literallly the FIRST time using my android skills since setting up my linux laptop.
ive done the following so far
running ubuntu 10 something
android sdk, eclipse
downloaded two versions of yaffs neither work as i would have expected.
now, trying to extract the system.img from this file (samsung note 3 kitkat official firmware)
https://doc-04-5g-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/met8j7ju751f78fpes2risgambd0mblc/1390788000000/16903193897035115666/*/0B84fZ-6xuKyyMmRMTHhjMldINDA?h=16653014193614665626&e=download
im running into this error
image size is not a multiple of 2048 64
it continues to extract the files saying each one has failed and then into the folder i specified there are a couple of files, none of which look recognizable or usable.
what am i doing wrong here?

[Q] Extract Compressed File to SD Card Director on First Boot

Hey guys,
I'm currently in the middle of developing my own ROM for an S802 based TV box (M8). I am close to releasing but I have a few issues, one very much in particular. I am trying to find a script that will extract a .tar file to the /sdcard/ directory on first boot of the ROM but I'm having a hell of a time. I am a reseller of these boxes and I'm trying to get my Kodi userdata to extract into the proper directory, /sdcard/Android/data/, on first boot but nothing I do seems to be working. Currently I'm using a script called installApk.sh. From what I've gathered it works fine for extracting .tar files to non-sdcard directories but when I attempt to point the extract path of the tar to the /sdcard/ directory it fails. I've also tried decompiling the kodi apk, injecting all of my userdata directly into the apk and re-signing but that causes all of the addons to fail. I'm wondering if any of you have run into a similar issue or know a solution to my problem. Any help is appreciated. Thanks.
Mag
th3magpi3 said:
Hey guys,
I'm currently in the middle of developing my own ROM for an S802 based TV box (M8). I am close to releasing but I have a few issues, one very much in particular. I am trying to find a script that will extract a .tar file to the /sdcard/ directory on first boot of the ROM but I'm having a hell of a time. I am a reseller of these boxes and I'm trying to get my Kodi userdata to extract into the proper directory, /sdcard/Android/data/, on first boot but nothing I do seems to be working. Currently I'm using a script called installApk.sh. From what I've gathered it works fine for extracting .tar files to non-sdcard directories but when I attempt to point the extract path of the tar to the /sdcard/ directory it fails. I've also tried decompiling the kodi apk, injecting all of my userdata directly into the apk and re-signing but that causes all of the addons to fail. I'm wondering if any of you have run into a similar issue or know a solution to my problem. Any help is appreciated. Thanks.
Mag
Click to expand...
Click to collapse
see Introduction : How to build an Android ROM - XDA-University
[GUIDE] [how to] CREATE OWN ROM [FOR ANY ANDROID DEVICE] [FOR N00B] [EASIEST METHODS] by lokeshsaini94
This thread will be moved to Android Q&A, Help & Troubleshooting

What on earth will it take for Windows 10 to properly mount and read an .img file?

Been trying for days to extract the kernel from Nougat to use it within Marshmallow in order to downgrade with vibration working on nougats bootloader - but for the life of me i can NOT get windows to actually read these files properly. have all kinds of mounting programs, a java based converter that doesnt actually work (sgs2ext4) i end up with this loop of the same lines, and a 0kb converted file. I can mount the regular img file fine, but it will NOT open without some sort of error. the files themselves are just fine as they will properly flash and run when using odin (when compressed into tar.md5)
Tried wthin twrp hoping the file manager might just let me browse through it since the phone is already linux based and can actually see the information... but no dice there either. It doesnt go into further detail than just showing me that theres an img file present, with options to delete, chmod, etc.
what can i do to dig down to this zimage portion of boot.img that everyone insists the kernel is within? (i say insist cuz i havent actually seen it for myself!)
none of the tutorials ive come across address these specific opening errors - other than that the error is happening because windows cant read it
diskinternals wont work, osfmount will mount but i cant read it .... where on earth are these drivers or programs or whatever i need to actually allow me to browse and explore these files properly? and dare i say, recompress them once ive found what im looking for!
i did also try flashify, thinking run nougat, backup kernel, install marshmallow, restore nougat kernel, but it just leads to freezing on boot logo. I need to get within these img files to actually do what i want to successfully, switching out only that one specific zimage part of the file, leaving the rest intact.
very frustrated here, would very much love some help with this...
Try this, helped so much!
https://forum.xda-developers.com/general/xda-university/unpacking-editing-packing-roms-img-dat-t3350261
Also, If you want to try, here is a link for the tools:https://www.androidfilehost.com/?fid=24459283995310951

Categories

Resources