First of all, what Im trying to do is to extract the .tar.md5 files that come with every ROM.
Every time I do that I get a message from 7-zip "There is no correct record at the end of the archive", however the files are extracted.
Below are the files inside the extracted folder:
boot.img
recovery.img
system.img
userdata.img
Then I try to open the system.img with unyaffs but I get some errors there too for example: STATUS_ACCESS_VIOLATION.
So my questions are:
1) How to correctly extract a .tar.md5 file?
2) How to open a yaffs2 .img file?
Thanks
try on RAR.
I tried with Rar, but still the same
Related
Ok, so I know many users are looking forward to create a custom rom. Where are you gonna get the system files from? Sure you can get it from a CWM backup. You can also extract the system files and the respective kernel from PDA.tar. Sure everyone knows it's in there but very few exactly know how to extract them. The system files are in the file "system.img".
So the 1st step is to open the PDA.tar using 7-zip and extract the system.img to a particular folder.
Download sgs2toext4.jar from attachment. It's a .jar file created by dphrozen to convert .img files to .ext4.img. Place that file anywhere in C:\ and then open the Command Prompt. In the command prompt, set the directory to the folder where sgs2toext4.jar is placed. Then type this command :-
Code:
java -jar sgs2toext4.jar
A window will open which is gonna ask you to drop the .img file in it. Simply drag the system.img to the window and the process of converting it to system.ext4.img will start. After the process is complete, you'll find system.ext4.img file in the same folder where your system.img file was placed.
Now, download Linux Reader. Install and then open it. At top left, go to Drives -> Mount Image. A window will open up. Browse to system.ext4.img and select it.
That's it! Now you can view all the system files. Export all of them to a particular folder. After exporting, you'll see an extension .efs.ntfs at the end of each file. Just delete that extension and you're good to go!
Is there a way to mount or extract the files within the stock system.img (and other img files)?
i was trying to do this a few days ago and i found that somehow the system.img from the firmware was protected, i tried lots of programs but none worked, all marked an error. so i dont know what to do next.
Well, I ended up flashing the system.img file and then rebooting immediately into TRWP and taking a backup. From that I was able to copy it down and extract the contents. Kind of roundabout but it worked. If someone has a more direct method I'd like to know how it can be done.
Download ImgExtractor 1.3.4 by And_PDA (Program page here). To use, open a command prompt in the directory where ImgExtractor.exe and system.img are, and enter:
Code:
ImgExtractor.exe system.img System -i
where system.img is the file you're extracting and System is the folder it will extract all of the files to (it will create one if it doesn't already exist). The "-i" is optional, but it shows the individual files as they are extracted (verbose output), and is more fun to look at than an idle window.
See the readme or double click on ImgExtractor.exe for more usage info.
EDIT: Download is now linked to my DropBox and added with readme below.
Summersett said:
Download ImgExtractor 1.3.4 by And_PDA (Program page here). To use, open a command prompt in the directory where ImgExtractor.exe and system.img are, and enter:
Code:
ImgExtractor.exe system.img System -i
where system.img is the file you're extracting and System is the folder it will extract all of the files to (it will create one if it doesn't already exist). The "-i" is optional, but it shows the individual files as they are extracted (verbose output), and is more fun to look at than an idle window.
See the readme or double click on ImgExtractor.exe for more usage info.
EDIT: Download is now linked to my DropBox and added with readme below.
Click to expand...
Click to collapse
]
that worked perfectly, i'll attach that file because the russian page 404'd it, so i had to find it somewhere else.
its attached if anyone want it. thanks!
Hello, it seem like Xda-dev is too large to find information.
Can you guys please guide me, how to direct replace a file in a tar archive while preserve it's permission?
Note 7-zip can only extract tar but can't pack it with permission.
Can cygwin use to perform this task? Like find a file inside a tar and replace it.
Please help me guys~
doulc said:
Hello, it seem like Xda-dev is too large to find information.
Can you guys please guide me, how to direct replace a file in a tar archive while preserve it's permission?
Note 7-zip can only extract tar but can't pack it with permission.
Can cygwin use to perform this task? Like find a file inside a tar and replace it.
Please help me guys~
Click to expand...
Click to collapse
Greetings and welcome to assist. You want to unpack and repack a tar file for flashing as a rom ? I think assayed kitchen has that option
https://forum.xda-developers.com/ch...-android-roms-editor-assayyedkitchen-t3410545
which runs on windows and I know suppers kitchen can do this on linux
Also this post here explains how to repack your .img files to a tar.md5 using cygwin
tar -c boot.img cache.img hidden.img modem.bin recovery.img system.img >> file_name.tar
md5sum -t file_name.tar >> file_name.tar
mv file_name.tar file_name.tar.md5
Good luck
Sawdoctor
sawdoctor said:
You want to unpack and repack a tar file for flashing as a rom ? I think assayed kitchen has that option
https://forum.xda-developers.com/ch...-android-roms-editor-assayyedkitchen-t3410545
which runs on windows and I know suppers kitchen can do this on linux
Click to expand...
Click to collapse
I want to unpack other stuff. Would be nice if there's any command line or parameter usage, it would ease me to write a script.
I want to unpack Recovery.img mainly.
Thing is the Kitchen tool only allow unpack system.img
tar -c boot.img cache.img hidden.img modem.bin recovery.img system.img >> file_name.tar
md5sum -t file_name.tar >> file_name.tar
mv file_name.tar file_name.tar.md5
Click to expand...
Click to collapse
The md5sum is not helpful, odin will still give an error of invalid md5
And mv is just a rename command, correct me if I'm wrong
doulc said:
I want to unpack other stuff. Would be nice if there's any command line or parameter usage, it would ease me to write a script.
I want to unpack Recovery.img mainly.
Thing is the Kitchen tool only allow unpack system.img
The md5sum is not helpful, odin will still give an error of invalid md5
And mv is just a rename command, correct me if I'm wrong
Click to expand...
Click to collapse
If you rename recovery.img to boot.img it should inpack it, pretty sure supper's kitchen does this as well. Not sure if this tool will be any help to you
https://forum.xda-developers.com/showthread.php?t=2600364
Good luck
Sawdoctor
im trying to extract the contents of the tar file
i need the
boot.img
system.img
recovery.img
if some could please do that
it says corrupted file each time
robertisnoob said:
im trying to extract the contents of the tar file
i need the
boot.img
system.img
recovery.img
if some could please do that
it says corrupted file each time
Click to expand...
Click to collapse
What are you using to extract the files?
robertisnoob said:
im trying to extract the contents of the tar file
i need the
boot.img
system.img
recovery.img
if some could please do that
it says corrupted file each time
Click to expand...
Click to collapse
Using winrar / 7zip you can extract files.
Hello,
Just wanted to ask if there's a way to extract specific application and its data from TWRP backup?
What are your suggestions? I have tried opening zip but I didn't have luck finding what I was looking for.
Thank you in advance!
If you look at the TWRP logs it indicates that it uses tar to create the archive file.
All you have to do is rename the .wim file to .tar.gz, then extract the file.
Related Windows command line is
Code:
tar -xvzf filename.tar.gz
jwoegerbauer said:
If you look at the TWRP logs it indicates that it uses tar to create the archive file.
All you have to do is rename the .wim file to .tar.gz, then extract the file.
Related Windows command line is
Code:
tar -xvzf filename.tar.gz
Click to expand...
Click to collapse
Thanks!