A tool to Repack the firmware image system.new.dat Nougat 7.x.x
the author of the tool by Karan Sangaj thank you :good: on XDA haven't found the original post
The usage is very simple, I hope many will be useful.
thanks for the help ajsmsg78
1) install Python 2.7.13
2) original post File contexts.bin converter thank you
another File context tools thank you
video instruction
https://www.youtube.com/watch?v=OsHWPdIgGjY
https://plus.google.com/u/0/collection/EiQ1NE
sory for my English
cannot convert my_new_system.img.
how to convert it exactly?
Any solution??
Traceback (most recent call last):
File "C:\Users\pc\Desktop\Android Unpack Repack Nougat\tools\img2sdat.py", line 10, in <module>
import common, blockimgdiff, sparse_img
File "C:\Users\pc\Desktop\Android Unpack Repack Nougat\tools\common.py", line 112
print " running: ", " ".join(args)
^
Esakren17 said:
Any solution??
Traceback (most recent call last):
File "C:\Users\pc\Desktop\Android Unpack Repack Nougat\tools\img2sdat.py", line 10, in <module>
import common, blockimgdiff, sparse_img
File "C:\Users\pc\Desktop\Android Unpack Repack Nougat\tools\common.py", line 112
print " running: ", " ".join(args)
^
Click to expand...
Click to collapse
I am getting the same error as this, what should I do to fix it?
Have installed python v2.7.13+3.6.1, latest java jdk and jre and .NET framework v4.7 and running windows 10, it had worked on the first try but started showing this error suddenly.
It works, but after install ROM the battery discharges very quickly and heats up... I think that incorrectly exposed file permissions, because if i flash "system" folder with setting simlinks and set_metadata in updater-script ROM works fine and battery is ok.
ROM work only with system.img, system.new.dat dont flash, error 7 in TWRP...
best tools ,thanks!!
raghuM said:
I am getting the same error as this, what should I do to fix it?
Have installed python v2.7.13+3.6.1, latest java jdk and jre and .NET framework v4.7 and running windows 10, it had worked for the first time but started showing this error suddenly
Click to expand...
Click to collapse
same here
Anyway to repack oreo
Got a problem with this tool.....
it works perfectly to extracting system.new.dat and unpack system.img I modify and remove some files in the system folder (remove some apks and fonts, add some hosts....) so the size of the system folder change and when I type the 04 option got this error message.....
0 [main] make_ext4fs 7236 cygwin_exception:pen_stackdumpfile: Dumping stack trace to make_ext4fs.exe.stackdump
Impossible de trouver C:\Users\RAYMAN95\Desktop\Android Unpack Repack Nougat\temp_size.txt
How is it possible to made some modifications and repack it to system.new.dat????
thank's for the help
This tool is very nice.... But please help me guys... On the last step I'm failed to repack system.img to new.system.dat... SYNTAX ERROR... how to fix it?
By the way it is very great tool... Thx to Dev ^^
Can't Unpack system.img
Ok Bro .. That's awesome Tutorial.
I have the system.img of Note 8 AP file .. I try to unpack it directly but it Ext4Extractor.exe is stopping working.
I don't have system.new.dat file so I'm trying to unpack system.img directly but it doesn't work.
As these images show the error:
https://imgur.com/a/jlZvb
Thank you very much for your tools very easy to use Thank you again
iMenesi said:
Ok Bro .. That's awesome Tutorial.
I have the system.img of Note 8 AP file .. I try to unpack it directly but it Ext4Extractor.exe is stopping working.
I don't have system.new.dat file so I'm trying to unpack system.img directly but it doesn't work.
As these images show the error:
https://imgur.com/a/jlZvb
Click to expand...
Click to collapse
The link is not working.
You need to have a custom ROM, and in it system.transfer.list and system.new.dat.
Use this method:
[DEV] sdat2img 1.0 - img2sdat 1.2 ◦ Unpack/re-pack android DAT files
For a long time I use and have not found Android ROM 5.1.1 - 8.0.0, which can not be unpacked using sdat2img.py.
Thank you authors @xpirt , @luxi78 , @howellzhu !
You dont need a custom rom or the system.transfer.list, or system.new.dat. This unpacks images just fine. It will not unpack factory images tho. I got it to work just fine unpacking nexus 6 system.img by placing the image in the output_converted_dat_to_ext4 folder then telling the bat file what the size is and unpacking it. Do the same thing for oreo and the ext4 exe crashes.
ze7zez said:
The link is not working.
You need to have a custom ROM, and in it system.transfer.list and system.new.dat.
Use this method:
[DEV] sdat2img 1.0 - img2sdat 1.2 ◦ Unpack/re-pack android DAT files
For a long time I use and have not found Android ROM 5.1.1 - 8.0.0, which can not be unpacked using sdat2img.py.
Thank you authors @xpirt , @luxi78 , @howellzhu !
Click to expand...
Click to collapse
iMenesi said:
Ok Bro .. That's awesome Tutorial.
I have the system.img of Note 8 AP file .. I try to unpack it directly but it Ext4Extractor.exe is stopping working.
I don't have system.new.dat file so I'm trying to unpack system.img directly but it doesn't work.
As these images show the error:
https://imgur.com/a/jlZvb
Click to expand...
Click to collapse
greeshan said:
It works, but after install ROM the battery discharges very quickly and heats up... I think that incorrectly exposed file permissions, because if i flash "system" folder with setting simlinks and set_metadata in updater-script ROM works fine and battery is ok.
ROM work only with system.img, system.new.dat dont flash, error 7 in TWRP...
Click to expand...
Click to collapse
flash "system" folder with setting simlinks and set_metadata in updater-script ROM
Click to expand...
Click to collapse
How did you fix the problem?
How did you do that?
master.robot said:
How did you fix the problem?
How did you do that?
Click to expand...
Click to collapse
i use commands set_metdata(xxxx); after block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
Is this tool work with oreo roms ?
wgmmmx said:
Is this tool work with oreo roms ?
Click to expand...
Click to collapse
No i think
link77kz said:
A tool to Repack the firmware image system.new.dat Nougat 7.x.x
the author of the tool by Karan Sangaj thank you :good: on XDA haven't found the original post
The usage is very simple, I hope many will be useful.
thanks for the help ajsmsg78
1) install Python 2.7.13
2) original post File contexts.bin converter thank you
another File context tools thank you
video instruction
https://www.youtube.com/watch?v=OsHWPdIgGjY
https://plus.google.com/u/0/collection/EiQ1NE
sory for my English
Click to expand...
Click to collapse
rom isn't booting after editing system.new.dat. any help ?
For anyone having syntax errors converting systemsparse.img to system.new.dat just download the updated img2sdat files from the link below and extract all files ending in .py to the tools folder of this batch tool. There's also an updated sdat2img.py linked below which goes in the same tools folder. Overwrite all the old files when prompted.
Edit: I've attached a zip that has the tools already updated. Maybe the OP can update the first post?
img2sdate update: https://github.com/xpirt/img2sdat
sdat2img update: https://github.com/xpirt/sdat2img
Related
Introduction
You probably know already that starting from Android 5.x (Lollipop) compiled roms (aosp,cm,stock) are not compressed anymore the way they used to be on previous android versions. On previous versions all content inside /system folder that has to be extracted within our device was either uncompressed (simple /system folder inside our flashable zip) or compressed in a system.img file, which it is a ext4 compressed file; both of these, anyway, were readable and we could see all system files (app,framework, etc).
The problem comes in >=5.0 versions, this method is not used anymore. Why? Because roms started to be always larger, so it is necessary to compress them even more.
What does new Android zips (full roms, but also otas) contain?
New Android flashable zips are made this way:
boot.img (kernel)
file_contexts (selinux related)
META-INF (folder containing scripts)
system.new.dat (compressed /system partition)
system.patch.dat (for OTAs)
system.transfer.list (see explanation below)
What does updater-script contains then?
The updater-script uses a brand new function: block_image_update(), this method basically decompresses necessary files inside the device. Let's study it.
From google git source code, if we go inside the new file /bootable/recovery/updater/blockimg.c, we find at the end of it the registration of the function block_image_update() as the method BlockImageUpdateFn() which starts at line 254. Here finally we find all information we need to know about the decompression of the .dat file(s). First file we analyze is system.transfer.list which Google tells us:
The transfer list is a text file containing commands to transfer data from one place to another on the target partition.
Click to expand...
Click to collapse
But what each line means?:
First line is the version number of the transfer list; 1 for android 5.0.x, 2 for android 5.1.x, 3 for android 6.0.x, 4 for android 7.x/8.x
Second line is the total number of blocks being written
Third line is how many stash entries are needed simultaneously (only on versions >= 2)
Fourth line is the maximum number of blocks that will be stashed simultaneously (only on versions >= 2)
Fifth line and subsequent lines are all individual transfer commands.
Click to expand...
Click to collapse
Ok, but how to decompress the system.new.dat file?
All instructions are below. sdat2img, rimg2sdat and img2sdat binaries are involved. Please read carefully step by step.
NOTE for OTAs
If you are looking on decompressing system.patch.dat file or .p files, therefore reproduce the patching system on your PC, check imgpatchtools out by @erfanoabdi.
You can use/modify these files and/or include them in your work as long as proper credits and a link to this thread are given.
If you have questions or problems write here
Are you building from source and want to revert to the old flashing method without DAT files?
Do this (thx @Elluel):
1 - Delete this line
2 - Make sure you have this commit
Thanks
- howellzhu & luxi78 - for initial source codes
- all contributors from github
Ubuntu
Ubuntu 64-bit - Guide
Step 1 - Decompressing = DAT (sparse data) -> EXT4 (raw image)
We're now using sdat2img binary, the usage is very simple (make sure you have python 2.7+ installed):
./sdat2img.py <transfer_list> <system_new_file> [system_img]- <transfer_list> = input, system.transfer.list from rom zip
- <system_new_file> = input, system.new.dat from rom zip
- [system_img] = output ext4 raw image file
and a quick example:
./sdat2img.py system.transfer.list system.new.dat system.imgby running this command you will get as output the file my_new_system.img which is the raw ext4 image.
Step 2 - Decompress EXT4 (raw image) -> OUTPUT folder -> Compress EXT4 (raw image)
Now we need to mount or ext4 raw image into an output folder so we can see apks/jars etc.
To do this we need to type this command:
sudo mount -t ext4 -o loop system.img output/As you can see there is a new folder called output which we can edit/modify/delete your files (not able to? see here)
Now we need to compress it back to a raw ext4 image, to do this we need the make_ext4fs binary. Make sure you have the file_contexts file (taken from the Rom zip) inside the make_ext4fs path. Then type this (got issues? see here)
./make_ext4fs -T 0 -S file_contexts -l 1073741824 -a system system_new.img output/You will get the new raw ext4 image called 'system_new.img' ready for the next step.
Step 3 - Converting = EXT4 (raw image) -> IMG (sparse image)
Now we need to convert the ext4 raw image into a sparse image. For this you need img2simg binary you can find here (thx to @A.S._id).
The usage is simple:
img2simg <raw_image_file> <sparse_image_file>Pretty self-explanatory, the output will be a new sparse image (.img).
Step 4 - Converting = IMG (sparse image) -> DAT (sparse data)
Now we need the img2sdat binary, the usage is very simple (make sure you have python 2.7+ installed):
./img2sdat.py <system_img>- <system_img> = name of input sparse image file (from step 3)
As you can see the output is composed by system.transfer.list, (system.patch.dat) & system.new.dat, ready to be replaced inside your Rom zip.
DOWNLOADs
sdat2img.py
- github.com
make_ext4fs
- mega.co.nz
img2sdat.py
- github.com
Source - Changelog
sdat2img
Repo: https://github.com/xpirt/sdat2img
Changelog: https://github.com/xpirt/sdat2img/commits/master
Source: https://github.com/xpirt/sdat2img/blob/master/sdat2img.py
img2sdat
Repo: https://github.com/xpirt/img2sdat
Changelog: https://github.com/xpirt/img2sdat/commits/master
Source: https://github.com/xpirt/img2sdat/blob/master/img2sdat.py
Windows
Windows 32/64 bit - Guide
Step 1 - Decompressing = DAT (sparse data) -> EXT4 (raw image)
We're now using sdat2img.py binary, the usage is very simple (make sure you have python 3.x installed):
sdat2img.py <transfer_list> <system_new_file> <system_ext4>- <transfer_list> = input, system.transfer.list from rom zip
- <system_new_file> = input, system.new.dat from rom zip
- <system_ext4> = output ext4 raw image file
and a quick example:
sdat2img.py system.transfer.list system.new.dat system.imgby running this command you will get as output the file my_new_system.img which is the raw ext4 image.
Step 2 - Decompress EXT4 (raw image) -> OUTPUT folder -> Compress EXT4 (raw image)
Now you should either move to Ubuntu x64/x86 or follow the 2nd step from the Ubuntu guide on cygwin 32 bit.
Step 3 - Converting = EXT4 (raw image) -> IMG (sparse image)
Now we need to convert the ext4 raw image into a sparse image. For this you need img2simg binary you can find here (thx to @A.S._id).
The usage is simple:
img2simg.exe <raw_image_file> <sparse_image_file>Pretty self-explanatory, the output will be a new sparse image (.img).
Step 4 - Converting = IMG (sparse image) -> DAT (sparse data)
Now we need the img2sdat binary, the usage is very simple (make sure you have python 2.7+ installed):
img2sdat.py <system_img>- <system_img> = name of input sparse image file (from step 3)
As you can see the output is composed by system.transfer.list, (system.patch.dat) & system.new.dat, ready to be replaced inside your Rom zip.
DOWNLOADs
sdat2img.py
- github.com
make_ext4fs
- mega.co.nz
img2sdat.py
- github.com
Is there any tool to browse (and/or manipulate) these .dat files in Windows?
01 Vlatce said:
Is there any tool to browse (and/or manipulate) these .dat files in Windows?
Click to expand...
Click to collapse
i don't think so, though you can install ubuntu in a virtual machine as 64-bit and decompress there without problems.
edit: windows binaries added to OP.
xpirt said:
i don't think so, though you can install ubuntu in a virtual machine as 64-bit and decompress there without problems.
Click to expand...
Click to collapse
I found one, Ext2Explore, it can browse and extract lollipop .dat files
01 Vlatce said:
I found one, Ext2Explore, it can browse and extract lollipop .dat files
Click to expand...
Click to collapse
Can you explain how to work in more detail ? Thanks.
chihliouma said:
Can you explain how to work in more detail ? Thanks.
Click to expand...
Click to collapse
With that application you can open the system.new.dat file like a zip archive
Sent from my Nexus 5
xpirt said:
i don't think so, though you can install ubuntu in a virtual machine as 64-bit and decompress there without problems.
Click to expand...
Click to collapse
01 Vlatce said:
I found one, Ext2Explore, it can browse and extract lollipop .dat files
Click to expand...
Click to collapse
Confirmed.
Works perfectly..
Thanks a lot! This will save a lot of time theming.. (pulling the system, settings, framework without having to flash the rom first)
Oh, just for s&g's i extracted ("decompiled") the system.new file, the files (app, prive-app, framework, media, etc) all got placed on my desktop -- i deleted the system.new file from the rom -- i then placed the folders and files that got extracted and placed them in the rom -- i flashed it -- it booted! lol.. didnt think it would... but anyways, there's that.
For those who want to try:
--- > its basically self explanatory.
- once downloaded (the link above) extract the contents from the zip (i just went ahead and extracted to my desktop)
- right click the linux penguin
- run as administrator - the window will pop up
- go to file > open image > find your system.new image (should already be extracted from the rom and placed on your desktop)
- click open
- you should now see your image (or path) in the windows -- double click them (i doubled clicked both the right and left side)
- now you should be able to see all the folders
---> if you want to extract those folders
- just go up to the top
- click save and choose an extraction (i chose Desktop)
Hoped i helped -- any questions or confusion, dont be shy to ask -- i probably went too fast, idk lol
Enjoy!
Incredible_Culp said:
Confirmed.
Works perfectly..
Thanks a lot! This will save a lot of time theming.. (pulling the system, settings, framework without having to flash the rom first)
Oh, just for s&g's i extracted ("decompiled") the system.new file, the files (app, prive-app, framework, media, etc) all got placed on my desktop -- i deleted the system.new file from the rom -- i then placed the folders and files that got extracted and placed them in the rom -- i flashed it -- it booted! lol.. didnt think it would... but anyways, there's that.
For those who want to try:
--- > its basically self explanatory.
- once downloaded (the link above) extract the contents from the zip (i just went ahead and extracted to my desktop)
- right click the linux penguin
- run as administrator - the window will pop up
- go to file > open image > find your system.new image (should already be extracted from the rom and placed on your desktop)
- click open
- you should now see your image (or path) in the windows -- double click them (i doubled clicked both the right and left side)
- now you should be able to see all the folders
---> if you want to extract those folders
- just go up to the top
- click save and choose an extraction (i chose Desktop)
Hoped i helped -- any questions or confusion, dont be shy to ask -- i probably went too fast, idk lol
Enjoy!
Click to expand...
Click to collapse
I can't get this to work at all. I'm using Win 7 Pro and I've actually used this app before with stock Nexus 7 factory images and it worked fine.. What file did you actually download? I d/l 2 different versions, one was beta 2.0 and the other was a zip that said 2.2.71 but the about on the exe says 2.1, which is the version I've been using for quite a while.
With the beta 2.0, there's not even an option to open a file and with the 2.1, it errors out every time. After opening system.new.dat image and double clicking, it just hangs and the program stops responding. If I try clicking on it and selecting save, it allows me to select a folder to save it in but I just get a dialog box that says saving files and then hangs at 24% every time, finally crashing with a Microsoft C++ runtime error.
Oh btw, you didn't go too fast LOL, this is really a simple app to use but it's just not working for me with these block image files. Maybe I'm missing something but it's got me scratching my head. :laugh: If you have any ideas, I'm all ears.
Thanks,
Mike T
webdroidmt said:
I can't get this to work at all. I'm using Win 7 Pro and I've actually used this app before with stock Nexus 7 factory images and it worked fine.. What file did you actually download? I d/l 2 different versions, one was beta 2.0 and the other was a zip that said 2.2.71 but the about on the exe says 2.1, which is the version I've been using for quite a while.
With the beta 2.0, there's not even an option to open a file and with the 2.1, it errors out every time. After opening system.new.dat image and double clicking, it just hangs and the program stops responding. If I try clicking on it and selecting save, it allows me to select a folder to save it in but I just get a dialog box that says saving files and then hangs at 24% every time, finally crashing with a Microsoft C++ runtime error.
Oh btw, you didn't go too fast LOL, this is really a simple app to use but it's just not working for me with these block image files. Maybe I'm missing something but it's got me scratching my head. :laugh: If you have any ideas, I'm all ears.
Thanks,
Mike T
Click to expand...
Click to collapse
hmm interesting..
im using windows 8.1
idk how much help i can be because i just downloded the first option (provided by the link above) and went from there.
like you said, theres two.. the .exe and the .zip.. i downloaded the .exe
Incredible_Culp said:
hmm interesting..
im using windows 8.1
idk how much help i can be because i just downloded the first option (provided by the link above) and went from there.
like you said, theres two.. the .exe and the .zip.. i downloaded the .exe
Click to expand...
Click to collapse
So, did you d/l the zip that was modified 2006-8-26, which is version 2.0 beta, or did you click the link which said download latest release?
Mike T
webdroidmt said:
So, did you d/l the zip that was modified 2006-8-26, which is version 2.0 beta, or did you click the link which said download latest release?
Mike T
Click to expand...
Click to collapse
ha! didnt even see there was a latest release..
i downloaded the 2006-8-26 apparently -- didnt even look at that date either LOL
i dont want to try the latest now -- this one works fine for me lmao -- dont want to ruin it.. ah, screw it, im downloading the latest now
EDIT: Ok, i lied.. i just checked my trash.. i did download the lastest release .zip .. the 2271..
@webdroidmt @Incredible_Culp Download from here lol: http://sourceforge.net/projects/ext2read/
Maybe something with my PC setup or Win 7 because the 2006-8-26 version doesn't even give me an option for opening a file image. It actually loads up looking like an incomplete application, it's also a very small filesize. Did you just d/l the ext2explore exe, or did you also d/l ext2read2 beta zip?
Mike T
webdroidmt said:
Maybe something with my PC setup or Win 7 because the 2006-8-26 version doesn't even give me an option for opening a file image. It actually loads up looking like an incomplete application, it's also a very small filesize. Did you just d/l the ext2explore exe, or did you also d/l ext2read2 beta zip?
Mike T
Click to expand...
Click to collapse
Use the download link in the above post and click the green download button, and it should be the correct version, from 2012 rather than 2006.
Lethargy said:
@webdroidmt @Incredible_Culp Download from here lol: http://sourceforge.net/projects/ext2read/
Click to expand...
Click to collapse
That's the one I've been using for quite some time. As mentioned in my previous post, the system.new.dat file just "appears" to be saving but hangs at 24%, then eventually crashes. I'm stumped, should be so easy but it doesn't want to cooperate. LOL
Thanks anyway,
Mike T
webdroidmt said:
That's the one I've been using for quite some time. As mentioned in my previous post, the system.new.dat files just "appear" to be saving but hangs at 24%, then eventually crashes. I'm stumped, should be so easy but it doesn't want to cooperate. LOL
Thanks anyway,
Mike T
Click to expand...
Click to collapse
Weird. Try redownloading the ROM you're trying to extract?
Lethargy said:
Use the download link in the above post and click the green download button, and it should be the correct version, from 2012 rather than 2006.
Click to expand...
Click to collapse
Thanks for trying guys, that is exactly the one I've been using. I downloaded it again a few seconds ago and still getting the same result. :laugh:
Thanks.
Mike T
---------- Post added at 01:09 AM ---------- Previous post was at 01:08 AM ----------
Lethargy said:
Weird. Try redownloading the ROM you're trying to extract?
Click to expand...
Click to collapse
I've actually tried with images from 3 different roms and they all give me the same result. It's cool, I just won't be able to play around as much as I used to porting stuff.
Mike T
---------- Post added at 01:15 AM ---------- Previous post was at 01:09 AM ----------
Lethargy said:
Weird. Try redownloading the ROM you're trying to extract?
Click to expand...
Click to collapse
Just curious, you guys aren't changing the file extension to something other than .dat, right?
Mike T
[Tool] [Windows] Auto Tool Unpack Repack Rom Android .DAT [No Cygwin] [No Linux]
***(Marshmallow Supported)***
Develop by MTK THAI ROM MODDER (Thiland) Group
Create Tool by: Kritsada Chaitan
SS:
Youtube : https://www.youtube.com/watch?v=nKYozWOETIU
-NOTE 1.-
***First Install Needed For Use This Tool.***
1. Java SDK
2. Python v3.xx
-NOTE 2.-
***First Copy system.new.dat , system.transfer.list To "Paste-DAT-Here" Folder.***
Download:
MEGA
Thank you Original Thread by: "xpirt" https://forum.xda-developers.com/member.php?u=5132229
Thanks for the tool
Bebooo43 said:
Thanks for the tool
Click to expand...
Click to collapse
Good.... ^^
It is a wonderful tool, brother.
is this tool works fine?
Getting error about incompatible operating system when recompressing dat so I tried on windows and got the same do I have to install the java or the phyton to a certain directory or the auto tool to a certain directory it extracted fine thanks in advance for the feedback
Can someone lend a hand.... Program works great. After removing a couple apps, one from 'app' another from 'priv-app', I made a zip file with 7zip and tried flashing but it fails. Is 7zip okay to make a zip file? was I not supposed to remove a 'priv-app' ? I can't find any solid guides on editing a MM rom. thanks in advance.
i succesfully unpack .dat files and repack .dat files (without edit anything) using this tool .
then i replace the repack .dat file to the rom and zip it and flash it .
but the problem is, when i flash i get error 7 system partition has unexpected contents after ota update . any solution ?
can't unpack system.new.dat cm14 (7.1)
Thank you very much, really useful
update - https://forum.xda-developers.com/an...tool-tool-unpack-repack-dat-img-v2-0-t3284806
Is it work for N based ROMs
tooolll
worked for me also...
t.y.
please update it to new version waiting for it.
==============================================
Auto System Image Exctractor
==============================================
==============================================
Supports
1) system.new.dat
2) system.new.dat.br
3) payload.bin
==============================================
==============================================
Requiremnets
==============================================
1. python v3.x
2. 7-Zip
Note 1: make sure your environment variables path is correctly set for python and 7-Zip(set it in system properties-->advance-->environment variable-->path)
Note2: while installing python, set the environment variables in installer itself
==============================================
How To
==============================================
1) extract system_new_dat_extractor.zip into a folder (preferable in a path where there are no name spaces)
2) place your rom zip file in the directory where you extracted
3) open the file system_image_extractor_V4.cmd
4) wait for it to extract everything
5) folder with extracted content will open automatically
6) have fun tweaking
*make sure to delete the created folders every time you want to extract
==============================================
Credits
==============================================
1) And_pda for imgextractor
2) xpirt for sdat2img.py
3) google
4) cyxx
5) ius
6) @aIecxs
==============================================
Change-log
==============================================
Code:
* initial release
-----------------------------
V2 supports Nougat
converts file_contexts.bin to file_contexts
-----------------------------
V3
[U]Now Supports[/U]
1) system.new.dat
2) system.new.dat.br
3) payload.bin
V4 (25-06-2019)
1) changed the entire script.
2) Fixed issues where user files got deleted automatically
-it was due spaces in path
source
Im testing m8
Note: make sure your environment variables path is correctly set for python and 7-Zip(set it in system properties-->advance-->environment variable-->path) @chiragkrishna, pls explain me or help me clear instructions. tks so much
romano19 said:
Note: make sure your environment variables path is correctly set for python and 7-Zip(set it in system properties-->advance-->environment variable-->path) @chiragkrishna, pls explain me or help me clear instructions. tks so much
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
add the location of your python(C:\Program Files (x86)\Python27) and 7-Zip(C:\Program Files\7-Zip) to the path!!!
Hello, nicie you made it, but how to repack it back to system.new.dat? Thanks for answering
supports system.new.dat from nougat?
Hi, I receive the following error:
WARNING
file_contexts not found!!
Click to expand...
Click to collapse
Jancar 52 mcpe said:
supports system.new.dat from nougat?
Click to expand...
Click to collapse
Wondering the same thing, will this work on Nougat, LineageOS 14.1 ROMs?
Neo3D said:
Wondering the same thing, will this work on Nougat, LineageOS 14.1 ROMs?
Click to expand...
Click to collapse
I asked this because it doesn't support the file_contexts.bin, if it does not detect it or it does not support it I can not recompress it again, and at the time of installing that compressed package with the other files gives error
Jancar 52 mcpe said:
supports system.new.dat from nougat?
Click to expand...
Click to collapse
Neo3D said:
Wondering the same thing, will this work on Nougat, LineageOS 14.1 ROMs?
Click to expand...
Click to collapse
Jancar 52 mcpe said:
I asked this because it doesn't support the file_contexts.bin, if it does not detect it or it does not support it I can not recompress it again, and at the time of installing that compressed package with the other files gives error
Click to expand...
Click to collapse
updated with Nougat support
converts file_contexts.bin to file_contexts text file
My simple script - Python not needed
Hi chiragkrishna, thank you for the tool.
Unfortunately it doesn't work for me, it gets stuck on the file_contexts.bin
In light of this I made my own super simple bat file, that extracted the whole system folder successfully.
Then I went a step further and created a EXE from the provided python script, so there would be no python requirement.
But you do have to manually unzip the system.transfer.list and system.new.dat files from your rom (turns out, no other files required for Nougat).
My simple script:
works on Nougat (tested on 7.1.2 NitrogenOS)
no Python needed
just unzip system.transfer.list and system.new.dat files, and place them in rom folder
run start.bat
minibraun said:
Hi chiragkrishna, thank you for the tool.
Unfortunately it doesn't work for me, it gets stuck on the file_contexts.bin
In light of this I made my own super simple bat file, that extracted the whole system folder successfully.
Then I went a step further and created a EXE from the provided python script, so there would be no python requirement.
But you do have to manually unzip the system.transfer.list and system.new.dat files from your rom (turns out, no other files required for Nougat).
My simple script:
works on Nougat (tested on 7.1.2 NitrogenOS)
no Python needed
just unzip system.transfer.list and system.new.dat files, and place them in rom folder
run start.bat
Click to expand...
Click to collapse
The most under appreciated post
Deleted
minibraun said:
Hi chiragkrishna, thank you for the tool.
Unfortunately it doesn't work for me, it gets stuck on the file_contexts.bin
In light of this I made my own super simple bat file, that extracted the whole system folder successfully.
Then I went a step further and created a EXE from the provided python script, so there would be no python requirement.
But you do have to manually unzip the system.transfer.list and system.new.dat files from your rom (turns out, no other files required for Nougat).
My simple script:
works on Nougat (tested on 7.1.2 NitrogenOS)
no Python needed
just unzip system.transfer.list and system.new.dat files, and place them in rom folder
run start.bat
Click to expand...
Click to collapse
Please start a new thread. As I use many extractors nothing is extract my system new data but your tool done. Great.
How can I repack the modified system in system.new.dat after extracting?
Mr.Ak said:
How can I repack the modified system in system.new.dat after extracting?
Click to expand...
Click to collapse
I have no idea, these tools are just for extracting.
I see people are having trouble all over the place.
You can try this tool and hope for the best:
https://forum.xda-developers.com/chef-central/android/tool-extract-repack-dat-img-android-5-8-t3670763
minibraun said:
I have no idea, these tools are just for extracting.
I see people are having trouble all over the place.
You can try this tool and hope for the best:
https://forum.xda-developers.com/chef-central/android/tool-extract-repack-dat-img-android-5-8-t3670763
Click to expand...
Click to collapse
Thank you for the recommendation.I tried almost every tool available,but haven't tried this one yet.I'll give this a try.Unfortunately,I have to dirty build the rom everytime to get the changes done.Hopefully,this tool will maybe able to repack fine.
minibraun said:
Hi chiragkrishna, thank you for the tool.
Unfortunately it doesn't work for me, it gets stuck on the file_contexts.bin
In light of this I made my own super simple bat file, that extracted the whole system folder successfully.
Then I went a step further and created a EXE from the provided python script, so there would be no python requirement.
But you do have to manually unzip the system.transfer.list and system.new.dat files from your rom (turns out, no other files required for Nougat).
My simple script:
works on Nougat (tested on 7.1.2 NitrogenOS)
no Python needed
just unzip system.transfer.list and system.new.dat files, and place them in rom folder
run start.bat
Click to expand...
Click to collapse
good work
minibraun said:
Hi chiragkrishna, thank you for the tool.
Unfortunately it doesn't work for me, it gets stuck on the file_contexts.bin
In light of this I made my own super simple bat file, that extracted the whole system folder successfully.
Then I went a step further and created a EXE from the provided python script, so there would be no python requirement.
But you do have to manually unzip the system.transfer.list and system.new.dat files from your rom (turns out, no other files required for Nougat).
My simple script:
works on Nougat (tested on 7.1.2 NitrogenOS)
no Python needed
just unzip system.transfer.list and system.new.dat files, and place them in rom folder
run start.bat
Click to expand...
Click to collapse
getting this error
------------------------------------
------------------------------------
SYSTEM.NEW.DAT to SYSTEM FOLDER
by minibraun
------------------------------------
------------------------------------
Extract system.transfer.list and system.new.dat from your ROM.zip into the ROM folder
------------------------------------
Press any key to continue . . .
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the file specified.
Could Not Find C:\WINDOWS\system32\system_statfile.txt
Extraction complete!
Press any key to continue . . .
minibraun said:
Hi chiragkrishna, thank you for the tool.
Unfortunately it doesn't work for me, it gets stuck on the file_contexts.bin
In light of this I made my own super simple bat file, that extracted the whole system folder successfully.
Then I went a step further and created a EXE from the provided python script, so there would be no python requirement.
But you do have to manually unzip the system.transfer.list and system.new.dat files from your rom (turns out, no other files required for Nougat).
My simple script:
works on Nougat (tested on 7.1.2 NitrogenOS)
no Python needed
just unzip system.transfer.list and system.new.dat files, and place them in rom folder
run start.bat
Click to expand...
Click to collapse
The link is not working, can you please update?
THIS TOOL IS FOR TESTING PURPOSE ONLY.
THIS MAY WORK ON SOME DEVICES OR MAY NOT WORK AT ALL.
IF THIS TOOL MAKES THE ROM UNBOOTABLE PLEASE COMMENT BELOW.
NO BUG FIXING not until i get an oreo supported phone for me to test.
TREBLE ROMS ARE NOT SUPPORTED!
FEATURES:
CAN DETECT OREO BOOT.IMG (YOU CANT MESS UP THIS TOOL. HAHA!!)
CAN DETECT WHETHER THERES A BOOT.IMG INSIDE THE MAIN FOLDER
CONVERTS BINARY INTO PLAIN CONTEXTS (MAIN FEATURE)
DECOMPRESS .BR IMAGES INTO .DAT (COOL RIGHT?)
USAGE:
GRAB A BEER AND RELAX
WHILE ON YOUR WINDOWS COMPUTER, UNPACK THE ARCHIVE AND GRAB THE OREO BOOT.IMG INTO oreo_contexts_tool FOLDER
RUN OFC.EXE AS ADMIN (NO NEED ADMIN RIGHTS FOR V2.0.0.1 AND V2.0.0.2)
FOLLOW INSTRUCTIONS AFTERWARDS..
IF YOU NEED THE CONTEXTS CONVERTER FOR NOUGAT THEN USE MY TOOL HERE TO CONVERT PLAIN CONTEXTS INTO BINARY AND VICE VERSA.
tested only on x32bit windows 7 ultimate
ofc v2.0.0.1
ofc v2.0.0.2
!!VERY IMPORTANT TO READ NOTES!!
Code:
v2.0.0.1
can decompress .br image into .dat
can compress .dat image into .br
NO NEED to run the application with admin rights, just run normally.
I added x64 bit application but havent tested it yet on 64bit machine
(my laptop cant run x64 os :p) if it wont work pls use the other application.
v2.0.0.2
file contexts output is current directory
added reset tool if experiencing errors
added clean current directory
less popup of cmd (only when unpacking boot.img)
x64bit tool is not included yet.
note:
choosing "clean current directory" option will delete EVERYTHING
inside the current directory except for the tool. so i advise to run this tool
inside a folder/directory to avoid deleting all your important files on your pc.
e.g you run ofc.exe in drive C:\ (C:\OFC.EXE) ...then you chose
"clean current directory" option, this will delete EVERYTHING in
C: drive so BE CAREFUL!! I wont be responsible if this happens..
if your anti virus detects malware, trojan, etc just ignore.. my script is very simple and basic that any highschool student can laugh at it. :silly: :laugh:
AIK LINK
CREDITS
@osm0sis <-- also thank him
@munjeni <-- and him
DONT JUST SAY THANKS!! HIT THE BUTTON BELOW..
last update:
06/08/18
Thank You.oreo unpacked.
tool
Zipper31 said:
Thank You.oreo unpacked.
Click to expand...
Click to collapse
can you give oreo extract tool
new test update..
there is a trojan in the executable??
Friend, link is broken, please, upload again.
JamFlux said:
Friend, link is broken, please, upload again.
Click to expand...
Click to collapse
Yes! Update link please
greeshan said:
Yes! Update link please
Click to expand...
Click to collapse
I MANAGE MY OWN TOOL FOR THIS:
https://forum.xda-developers.com/ch...l-extract-repack-dat-img-android-5-8-t3670763
JamFlux said:
I MANAGE MY OWN TOOL FOR THIS:
https://forum.xda-developers.com/ch...l-extract-repack-dat-img-android-5-8-t3670763
Click to expand...
Click to collapse
Thanks, i'll try
link works on my slow internet..
reupload please?
0ther said:
reupload please?
Click to expand...
Click to collapse
link is working fine.. maybe use another browser?
Got 404, reupload please ?
Hello!
I want to extract the apk files from the system.img file HUAWEI P30 smartphone with android 9.
But the tool that I have always used (imgextractor.exe) completes the processing of the img file with an error:
Code:
ImgExtractor version 1.3.7 <Created by And_PDA (Based on sources ext4_unpacker)>
Extractor for images in EXT2\EXT3\EXT4\YAFFS2\CRAMFS filesystem formats
support SPARSE\SIN\MOTO structure formats
Exception EOutOfMemory in module imgextractor.exe at 0001669D.
Out of memory.
Please, help me!
P.S. According to the rules of the forum, I can not yet attach an external link to my post. But if necessary, I can send it to private messages!
Did you convert SIMG to IMG before? Something is in new format SIMG or raw IMG.
adeii said:
Did you convert SIMG to IMG before? Something is in new format SIMG or raw IMG.
Click to expand...
Click to collapse
Yes i used simg2img.exe for this. I tried to process the new IMG file with imgextractor.exe, but the result was the same ((
appdroiddevelop said:
Yes i used simg2img.exe for this. I tried to process the new IMG file with imgextractor.exe, but the result was the same ((
Click to expand...
Click to collapse
Try with DiskInternals LinuxReader.