Android DAT/IMG File Unpack and Repack V 2.0 - Android General

This is a thread on how to unpack and repack the system.img.dat file of your Android Rom,to see its content.
Starting from Android 5.x (Lollipop) Custom roms are not compressed like on previous android versions. Earlier all Files were inside the /system folder.And we were able to see all the system files
The problem started in >=5.0 versions because rom size increased and it was necessary to highly compress them again.
You Must Have Following Files Installed in your PC
1. Java SDK = Click here to download java
2. Python 2.xxx= Click here to download Python
How to decompress /Repack these files? Its Sipmle !!
Follow the Instructions Below To do that.
Download the Android Unpack Repack adithyan25.rar from here
Or you can download it from attachments
Run The File And Follow The Instructions As on screen. :good:
Video Tutorial
Special Thanks @xpirt
If you are a good Programmer You Can follow his method .View His Method here
If you Have any doubts or Enquired post in the Comment section

I got an error while repacking the system.img
"Input-IMG\file_contexts: No such file or directory"
Please help.

AmeyRanberg said:
I got an error while repacking the system.img
"Input-IMG\file_contexts: No such file or directory"
Please help.
Click to expand...
Click to collapse
did you copy the files to the creard folder!??... watch the video

adithyan25 said:
did you copy the files to the creard folder!??... watch the video
Click to expand...
Click to collapse
The rom that I had, only had system.img boot.img and those older folders. It didnt have file_contexts. But later I extracted it from boot.img and it worked thanks anyway.

AmeyRanberg said:
The rom that I had, only had system.img boot.img and those older folders. It didnt have file_contexts. But later I extracted it from boot.img and it worked thanks anyway.
Click to expand...
Click to collapse
Great And thank u for trying my app

I falied system.img repacked
Hi~
I wateched your video.
So I succeed system.img unpacked.
But, I tried system.img repack. I failed.
Why failed? T.T
Start Repacking in system.img......
please wait......
Input-IMG\file_contexts: No such file or directory
critical error: main: failed to open input image : No such file or directory

did u copy fule_contexta

Similar to my friends.
http://forum.xda-developers.com/and...tool-tool-unpack-repack-dat-img-v2-0-t3284806

same the tool I make http://forum.xda-developers.com/and...tool-tool-unpack-repack-dat-img-v2-0-t3284806

Kritsada Chaitan said:
same the tool I make http://forum.xda-developers.com/and...tool-tool-unpack-repack-dat-img-v2-0-t3284806
Click to expand...
Click to collapse
yeah tanks for the info... i made this tool using xpirt post and a screen shot of a software that i saw in google... any way great wrks... i made this through java..

AmeyRanberg said:
The rom that I had, only had system.img boot.img and those older folders. It didnt have file_contexts. But later I extracted it from boot.img and it worked thanks anyway.
Click to expand...
Click to collapse
deleted

adithyan25 said:
did u copy fule_contexta
Click to expand...
Click to collapse
what is file_contexta?
I dont understand..
same here. failed while repack
critical error: main: failed to open input image: No such file or directory

its a file along with the rom that you get.. just watch the video
Sent from my ASUS_Z00A using XDA-Developers mobile app

Problem/
No file " system transfer list". Where to get it? Firmware is given under SPFT.

hi @adithyan25
I'm so interested with this topic.
I tried but still stuck on file_context
please also make written tutorial on this thread.

kevin mitnick said:
hi @adithyan25
I'm so interested with this topic.
I tried but still stuck on file_context
please also make written tutorial on this thread.
Click to expand...
Click to collapse
didnt you watch the video??? i think it had all the component you nedd.. still any prblm cmnt below
Sent from my ASUS_Z00A using XDA-Developers mobile app

adithyan25 said:
didnt you watch the video??? i think it had all the component you nedd.. still any prblm cmnt below
Sent from my ASUS_Z00A using XDA-Developers mobile app
Click to expand...
Click to collapse
i did.
but on video, tutorial about dat file..

Still unable to repack the dat.
Windows says rimg2sdat is not a valid Win32 application.
It works under Windows 7 at work but not under Windows XP Pro like I have at home.
Someone got another version? Is there a XP compatible version of rimg2sdat?
Thanks

Kritsada Chaitan said:
same the tool I make http://forum.xda-developers.com/and...tool-tool-unpack-repack-dat-img-v2-0-t3284806
Click to expand...
Click to collapse
Thanks to the original work-works correctly!

Working perfectly with Android 6.0.1, Thanks Dev !!

Related

[TOOL][Windows] abimE:: Android Boot Image Editor.. without Linux or Cygwin

i made this small tool to Edit boot images on windows without Linux and cygwin.
i was carefull writing but even if there is any errors.. plz report bugs.
details is given in readme.
i searched over and over on google to find tool that works on windows but couldnt find any
finaly i decided to write my own.. and here is the tool.
New version available (1 aug 2014)
abimE v1.1R2
Hey first of all, nice tool. It seems to extract and recreate the boot.img file correctly although I haven't actually tested it yet.
However, I am getting some strange behavior with the header editor in Windows 7.
First, when selecting the attached image file to extract, I immediately get the error, "HeaderEditorERROR: File does not exists" in the log. This does not prevent me from extracting the image.
Then when attempting to edit the header info file extracted from this image I either get nothing or an overflow error which causes the application to crash.
ok buddy im looking for this
Sent from my Titanium S5 using XDA Free mobile app
temporarily.. you can solve this by deleting boot.img_out folder that you last time extracted..
header not found error:: this app automatically try to load last extracted bootimginfo file.. if it not exists.. it show this error.. its not to worry about.
Sent from my Titanium S5 using XDA Free mobile app
What can be the use of it? can you give more details?
nwalk7800 said:
Hey first of all, nice tool. It seems to extract and recreate the boot.img file correctly although I haven't actually tested it yet.
However, I am getting some strange behavior with the header editor in Windows 7.
First, when selecting the attached image file to extract, I immediately get the error, "HeaderEditorERROR: File does not exists" in the log. This does not prevent me from extracting the image.
Then when attempting to edit the header info file extracted from this image I either get nothing or an overflow error which causes the application to crash.
Click to expand...
Click to collapse
new version (abimE v1.1R2)available.. your reported bug is solved..
also have a look readme.txt inside the zip.
-- m9j_cfALt
net8 said:
What can be the use of it? can you give more details?
Click to expand...
Click to collapse
its used to edit boot.img and recovery.img
you may use it for theming purpose.
or making upgrading ROM
-- m9j_cfALt
m9j_cfALt said:
new version (abimE v1.1R2)available.. your reported bug is solved..
also have a look readme.txt inside the zip.
-- m9j_cfALt
Click to expand...
Click to collapse
Excellent, thank you for the fix. It is working without errors now.
I flashed the image to my device after changing a file and it worked perfectly. Thank you for the easy to use tool
Does not work. Getting a comdlg32.osx missing error.. Tried installing it to system32 from the net, but still does not work.. Did i spot that you used VB6 for this ? Why use something so old
error
Da9L said:
Does not work. Getting a comdlg32.osx missing error.. Tried installing it to system32 from the net, but still does not work.. Did i spot that you used VB6 for this ? Why use something so old
Click to expand...
Click to collapse
I get the same error. (Getting a comdlg32.osx missing error.) I am running Windows 8.1
Just download comdlg32.osx and stick it in the same folder.
Download Arquive OCX
Da9L said:
Does not work. Getting a comdlg32.osx missing error.. Tried installing it to system32 from the net, but still does not work.. Did i spot that you used VB6 for this ? Why use something so old
Click to expand...
Click to collapse
Download file >
View attachment COMCTL32.rar
Download File OCX
Da9L said:
Does not work. Getting a comdlg32.osx missing error.. Tried installing it to system32 from the net, but still does not work.. Did i spot that you used VB6 for this ? Why use something so old
Click to expand...
Click to collapse
Download File OCX
View attachment COMCTL32.rar
Download File OCX
iaTa said:
Just download comdlg32.osx and stick it in the same folder.
Click to expand...
Click to collapse
Download File OCX
View attachment COMCTL32.rar
Download File OCX
iaTa said:
Just download comdlg32.osx and stick it in the same folder.
Click to expand...
Click to collapse
Download File OCX
View attachment COMCTL32.rar
Interesting tool .... it won't unpack a Nexus 9 boot.img, though ...
Says not a valid Android boot img ...
do you still maintain this tool? cause i have successfully pack n repack but when i flash the packed boot.img the device boot into fastboot instead of system
Dont work with Wiko Pulp 3G Boot.img or recovery.img
Error Message:
MGError:byte 1Not a New ASCII Format CPIO directory Header
ERROR: Unpacking Failed!!
It will unpack s6 plus 7.0 boot.img but after repack if you try to flash it will not allow secure check fail boot

[REQUEST] Z3 Lollipop System dump

Hi guys . Can any of you who have received Lollipop extract the system dump for us ? It will aid developing and will make everyone happy
Thank You
There are loads of ways of getting this without anyone uploading it.
Just download it from any of the FTF's already shared, or use XperiaFirm or Flashtool to download it straight from the Sony servers yourself.
gregbradley said:
There are loads of ways of getting this without anyone uploading it.
Just download it from any of the FTF's already shared, or use XperiaFirm or Flashtool to download it straight from the Sony servers yourself.
Click to expand...
Click to collapse
I tried it but I can only see some ext4 files that cant be opened . We need the original system dump..... :good:
-XperiaMan- said:
I tried it but I can only see some ext4 files that cant be opened . We need the original system dump..... :good:
Click to expand...
Click to collapse
Use ext2explorer to open them
gregbradley said:
Use ext2explorer to open them
Click to expand...
Click to collapse
Already tried For some reason the program doesnt open the file . It just stays there neutral
-XperiaMan- said:
Already tried For some reason the program doesnt open the file . It just stays there neutral
Click to expand...
Click to collapse
Works for me, I just converted the system.sin to system.ext4 and opened it up
http://prntscr.com/6itqot
Nice . Will you please share it ? Please Please Please
-XperiaMan- said:
Nice . Will you please share it ? Please Please Please
Click to expand...
Click to collapse
If I get a chance to upload it, but the common sense thing to do is for you to get ext2explore to work if you have already downloaded the FTF.
How are you converting the system.sin to system.ext4?
gregbradley said:
If I get a chance to upload it, but the common sense thing to do is for you to get ext2explore to work if you have already downloaded the FTF.
How are you converting the system.sin to system.ext4?
Click to expand...
Click to collapse
My file is not an ftf the the system file is ext4 by default . I don't know why the program doesnt work
-XperiaMan- said:
My file is not an ftf the the system file is ext4 by default . I don't know why the program doesnt work
Click to expand...
Click to collapse
Download it using flashtool.
Look in the decrypted folder of the firmware folder, you will see a system.sin
Use flashtool to to dump it as a ext4 and then open it
That's all I did
Here you go:
https://mega.co.nz/#F!a8hUgZ7Z!S3jfmZn8D_8OE8v_teh9KA
From: http://forum.xda-developers.com/z3/themes-apps/xperia-z3-apks-t3059426
Credit: @gripfly
gregbradley said:
Download it using flashtool.
Look in the decrypted folder of the firmware folder, you will see a system.sin
Use flashtool to to dump it as a ext4 and then open it
That's all I did
Click to expand...
Click to collapse
thanks
for Repack files after edit to system.ext4 and after Then system.sin What I do?
You cannot edit and repacj into a ftf file. You need to use the prfcreator to create a prerooted flashable zip file to flash in recovery

[Q] how to unpack boot.img or recovery.img

I want to unpack boot.img of my phone, i did it earlier when i was in kitkat but now after upgrading to lollipop that method doesnt work..
Manu11 said:
I want to unpack boot.img of my phone, i did it earlier when i was in kitkat but now after upgrading to lollipop that method doesnt work..
Click to expand...
Click to collapse
@Manu11, are you referring to extracting the boot.img from the firmware?
Manu11 said:
I want to unpack boot.img of my phone, i did it earlier when i was in kitkat but now after upgrading to lollipop that method doesnt work..
Click to expand...
Click to collapse
I can't catch u while do u want to extract boot.IMG from device
R do u need the unpacking software
Manu11 said:
I want to unpack boot.img of my phone, i did it earlier when i was in kitkat but now after upgrading to lollipop that method doesnt work..
Click to expand...
Click to collapse
Unpack with Android kitchen
ravi.vydianathan said:
@Manu11, are you referring to extracting the boot.img from the firmware?
Click to expand...
Click to collapse
mohamed786 said:
I can't catch u while do u want to extract boot.IMG from device
R do u need the unpacking software
Click to expand...
Click to collapse
No no i wanna unpack boot.img so i can change its contents or in simple way create a insecure boot.img
@Manu11, I have seen few such tools but frankly I have no idea and no experience in this regard.
Manu11 said:
No no i wanna unpack boot.img so i can change its contents or in simple way create a insecure boot.img
Click to expand...
Click to collapse
there are a lot of guides available for unpacking and repacking a boot.img a simple google search would have helped u
Bass_Face said:
there are a lot of guides available for unpacking and repacking a boot.img a simple google search would have helped u
Click to expand...
Click to collapse
I unpacked my boot.img with android kitchen, but on recompiling its size went 5mb less and on flashing it directly enters fastboot.
The android kitchen is no longer continued from 2011, so the binaries haven't been updated since then.
I suggest you use "android image kitchen"

[GUIDE] Deodex Marshmallow 6.0 completely without missing classes.dex files in apk(s)

Hello XDA
Here i am sharing some usefull guide for deodexing marshmallow 6.0
Why this is unique and different from others? - because many of you are still unable to deodex stock marshmallow rom (I was one of them too )
You used many tools for deodexing but still no success? There is no classes.dex in apk files? Don't worry here is a guide for you.
I am sharing what i did for my firmware (Sony Xpera Z3 D6653 Marshmallow 6.0)
Requirements-
7zip - Windows
Flashtool - Windows
SuperR's Kitchen - Ubuntu Linux
Don't forget to thank them for their tools.
Now steps that i did-
1. Extracted system.sin from ftf file with 7zip and then system.ext4 from systemsin with flashtool.
2. Now from Program files, Run 7zip as an administrator and go to system.ext4 and extarct it.
----benifit of extracting with 7zip as an administrator is that, it also extracts the symlinks in "system/app/*/oat/arm/*.odex (symilink of "system/odex-app/arm/*.odex"). And same for priv-app and framework folder.
3. Extract odex.app.sqsh to odex.app folder and same for priv-app and framework using 7zip.
4 Now Booted to Ubuntu Linux and run Superr Kitchen.
5. Copy system.ext4 and kernel.elf in working folder and extract system using kitchen.
6. Now copy folders app, priv-app, framework, odex.app, odex.priv-app and odex.framework from that system folder extracted with 7zip and paste/replace in system folder in working folder of kitchen.
7. That's it. Deodex it using kitchen and it will be great. :good
Click to expand...
Click to collapse
So, if you are not a noob then main new points from these for you are 2 and 6.
For other than Sony firmwares - you got the main steps right? Follow the steps for your firmware with your tools. (You must get symilinked files)
NOTE:
Pulling or copying /system folder from device will not work as it will not extract/copy symilinks.
Now enjoy Deodexing Marshmallow :good:
Any questions regarding this guide from me? You can ask in your post by mentioning me.
If this guide was helpful then don't hesitate to PRESS the THANKS BUTTON :good:
Very nice idea bro.
Rajeev said:
Very nice idea bro.
Click to expand...
Click to collapse
Thanks bro.
After messing with files for 4-5 days finally got it work
@Mohitash and if i been windows user what should i do?
Hamidreza2010 said:
@Mohitash and if i been windows user what should i do?
Click to expand...
Click to collapse
Your question is right but actually till now there is no windows tool that can solve our this issue. Only on SuperR' Kitchen for linux is working for deodexing marshmallow completely without any issue for some firmwares that are not working with other windows tools. As, still some marshmallow firmwares are not supported by the windows tools that are available till now.
I tried almost all tools with this method [Included Symilinks] but still no windows tool was able to deodex my firmware but SuperR's Kithen did well.
Info for all:
Users must try that tools [Recommended] and still no success then this is a guide.
Regards
Mohitash
Hamidreza2010 said:
@Mohitash and if i been windows user what should i do?
Click to expand...
Click to collapse
set up ubuntu64 in a virtual mashine
Wt abt Sony Xperia t2 ultra,m2,c3 Lollipop versions which r not ablr to deodex till now...did this guide apply for them....I mean by using this guide can I deodex them..bcoz its been a year but still no luck of deodexing t2ultra
Sent from my D5322 using XDA-Developers mobile app
pvnsai73 said:
Wt abt Sony Xperia t2 ultra,m2,c3 Lollipop versions which r not ablr to deodex till now...did this guide apply for them....I mean by using this guide can I deodex them..bcoz its been a year but still no luck of deodexing t2ultra
Sent from my D5322 using XDA-Developers mobile app
Click to expand...
Click to collapse
Actually, i don't know what are the issues coming in that devices' firmwares so i can't say about that right now. But you can tell more.
Regards
Mohitash
Thanks for ur rely
Have a look at these
https://github.com/testwhat/SmaliEx/issues/15
Sent from my D5322 using XDA-Developers mobile app
pvnsai73 said:
Thanks for ur rely
Have a look at these
https://github.com/testwhat/SmaliEx/issues/15
Sent from my D5322 using XDA-Developers mobile app
Click to expand...
Click to collapse
The logs that i can see there, they are totally different. In my opinion, this guide will not help in that case.
I will recommend to try with latest SuperR. kitchen directly, if not tried yet. [This tool is for Ubuntu Linux]
Regards
Mohitash
Mohitash said:
Your question is right but actually till now there is no windows tool that can solve our this issue. Only on SuperR' Kitchen for linux is working for deodexing marshmallow completely without any issue for some firmwares that are not working with other windows tools. As, still some marshmallow firmwares are not supported by the windows tools that are available till now.
I tried almost all tools with this method [Included Symilinks] but still no windows tool was able to deodex my firmware but SuperR's Kithen did well.
Info for all:
Users must try that tools [Recommended] and still no success then this is a guide.
Regards
Mohitash
Click to expand...
Click to collapse
ok thanks
JochenP said:
set up ubuntu64 in a virtual mashine
Click to expand...
Click to collapse
ok but overall i hate of linux
Hamidreza2010 said:
ok thanks
ok but overall i hate of linux
Click to expand...
Click to collapse
That's a shame. Considering that Android is actually Linux.
Verbato said:
That's a shame. Considering that Android is actually Linux.
Click to expand...
Click to collapse
Reported !!!!
Because its not up to you
This is everything I find in system.ext4, am I doing something wrong
[there are only 3 small files in meta-inf folder]
speedy56 said:
This is everything I find in system.ext4, am I doing something wrong
[there are only 3 small files in meta-inf folder]
Click to expand...
Click to collapse
On which step exactly you stuck on?
Mohitash said:
On which step exactly you stuck on?
Click to expand...
Click to collapse
I did step 1, and than I've tried to do step 2 but I realised that something wasn't right.
1. Extracted system.sin from ftf file with 7zip and then system.ext4 from systemsin with flashtool.
2. Now from Program files, Run 7zip as an administrator and go to system.ext4 and extarct it.
Should I maybe try with another .ftf file?
Hi all
What is "odex.app.sqsh" ?
speedy56 said:
I did step 1, and than I've tried to do step 2 but I realised that something wasn't right.
1. Extracted system.sin from ftf file with 7zip and then system.ext4 from systemsin with flashtool.
2. Now from Program files, Run 7zip as an administrator and go to system.ext4 and extarct it.
Should I maybe try with another .ftf file?
Click to expand...
Click to collapse
After extracting system.ext4 what you are getting?
FYI: Try these steps only if other tools provided by other devs are not helping you.
devilmaycry2020 said:
Hi all
What is "odex.app.sqsh" ?
Click to expand...
Click to collapse
Its a package file containing all .odex files for /system/app/*apk files. (In lollipop and marshmallow)
Mohitash said:
After extracting system.ext4 what you are getting?
FYI: Try these steps only if other tools provided by other devs are not helping you.
Click to expand...
Click to collapse
This is everything I get, I've tried with 2 differetn .ftf files
Yeah, I've tried with lorddroid deodexer (got bootloop and couldn't deodex from the device) and with Tickle my android (my antivirus detected some trojan the moment I've extracted the downloaded file)

Pls help me extract the system.sin of both firmwares?

Here, I got system.sin of 2 Sony Xperia NXT series phones (files inside the zip). I wanted to extract those files and wanted the apk's but I can't even extract those files. I tried all the apps for extracting but gives me errors. Can somebody help me? It's for a experiment
socerguy said:
Here, I got system.sin of 2 Sony Xperia NXT series phones (files inside the zip). I wanted to extract those files and wanted the apk's but I can't even extract those files. I tried all the apps for extracting but gives me errors. Can somebody help me? It's for a experiment
Click to expand...
Click to collapse
search for "unpack Sony sin image" here on XDA or with Google. which platform? are you rooted?
WoKoschekk said:
search for "unpack Sony sin image" here on XDA or with Google. which platform? are you rooted?
Click to expand...
Click to collapse
Uhh.. I didn't rooted it and extracting .sin file gingerbread worked fine but ics didn't worked
WoKoschekk said:
search for "unpack Sony sin image" here on XDA or with Google. which platform? are you rooted?
Click to expand...
Click to collapse
And it's for Sony Xperia u in android 4.0
socerguy said:
And it's for Sony Xperia u in android 4.0
Click to expand...
Click to collapse
you need a tool to unpack *.sin images for Android 4.0?? What about Windows or Linux?
WoKoschekk said:
you need a tool to unpack *.sin images for Android 4.0?? What about Windows or Linux?
Click to expand...
Click to collapse
I tried all apps from this forums but none of 'em worked (it works with 2.3 gingerbread). I'm using windows 11
WoKoschekk said:
you need a tool to unpack *.sin images for Android 4.0?? What about Windows or Linux?
Click to expand...
Click to collapse
And I don't need a tool, I need help
socerguy said:
And I don't need a tool, I need help
Click to expand...
Click to collapse
help for what? how do you want to unpack it?
WoKoschekk said:
help for what? how do you want to unpack it?
Click to expand...
Click to collapse
to unpack system.sin. I wanted to get the contents inside the file in a zip file
socerguy said:
to unpack system.sin. I wanted to get the contents inside the file in a zip file
Click to expand...
Click to collapse
but HOW??
[TOOL][Windows,Linux,Android,Apple] Unpack any Sony firmware file
Disclaimer: Our tool was made for testing and educational purposes, ME is not responsible for what you have doing using our tool, you must agree that you using our tool on your own risk, I am not responsible for anything or anything else you...
forum.xda-developers.com
download, unpack and open the folder. copy the .sin file(s) into the folder and create a new folder called "output" =>
Code:
C:\Users\$NAME\Downloads\sony_dump_tools\output
type "cmd" in the above address bar of the Explorer window and hit "Enter" => cmd.exe starts
execute
Code:
sony_dump output <name of your *.sin file>
DO NOT doubleclick the .exe! It's a binary for cmd.exe!
For any errors please post the output of cmd.exe or post a screenshot (WINDOWS+Shift+S) of cmd.exe
It gave me system.sin.unknown file
And here is the cmd
socerguy said:
And here is the cmd
Click to expand...
Click to collapse
as you can see everything is fine. the file is called *.unknown because the tool don't know what it is. but it's not an error.
rename system.sin.unknown => system.ext4
download and install 7z from here. Then open system.ext4 with it.
WoKoschekk said:
as you can see everything is fine. the file is called *.unknown because the tool don't know what it is. but it's not an error.
rename system.sin.unknown => system.ext4
download and install 7z from here. Then open system.ext4 with it.
Click to expand...
Click to collapse
unfortunately 7zip says archive is corrupt
socerguy said:
unfortunately 7zip says archive is corrupt
Click to expand...
Click to collapse
Then we have to find out what kind of file type was unpacked.
Please install HxD - Hex Editor.
=> choose your language and "Edition = installable"
=> open HxD > go to "File" (top left) > "Open" > select "system.ext4"
=> press F11 and make screenshot
In HxD you'll see left "Offset". Please also scroll down to Offset 00000400 and do a second screenshot that shows 00000400 and the following lines to round about 00000600.
WoKoschekk said:
In HxD you'll see left "Offset". Please also scroll down to Offset 00000400 and do a second screenshot that shows 00000400 and the following lines to round about 00000600.
Click to expand...
Click to collapse
You have a Sony NXT, but which model exactly? The NXT-series consists of 6 different models.
It's a Sony Xperia s lt26i (4.0) https://m.gsmarena.com/sony_xperia_s-4369.php

Categories

Resources