[Android Q&A, Help & Troubleshooting] matrixex:
IMP NOTE :

Use " python-2.7.xx" ,latest version otherwise extractor will led to undesired output like this one https://xdaforums.com/showpost.php?p=72165633&postcount=295 and extractor supports android 7.1.2(updated on 18-May-2017)

Extractor of system.new.dat of Marshmallow and Lollipop ROM's

​

DOWNLOAD

OLD

Extractor 1.0

or

Mirror

Extractor 2.0

Extractor 3.0

UPDATED

Extractor 4.8 (Updated on 18-May)

SOURCE

$GIT-HUB Contribute!

Changelog -> https://github.com/matriex/System_Extractor-WIN/commit/4b94cde74f63f6f1ff21b8c745b306326b15cb5a

Alternative of repack, if the repack script doesn't works with your system folder then try this script SCRIPT / GUIDE

How to

Extract ext4-Image files

Download Imgextractor.exe binary from the link

https://github.com/matriex/System_Extractor-WIN/blob/master/bin/Imgextractor.exe

1. Create a folder named ext and copy the binary to ext folder

2. Copy your image file ,say "system_1.img" to ext folder

3. Select the ext folder , hold the shift (right) click RMB

4. Select "Open command window here"

5. Then type this command on CMD

Imgextractor.exe system_1.img -i

6. The files will be in "system_" named folder.

NOTE:You should rename IMG file to system_1.img before doing anything

Extract *.DAT files

Users, The extractor works with nought 7.0.0 and 7.1.1 perfectly (tested with CM14.1-2016-12-12 & aosp_7.0_2016-09-19), If you encounter errors then please install python and then try extracting again

Method I

Download and run the extractor .

METHOD II (command line)

Use python 2.7.xx

1. Download zip and extract sdat2img.py binary from the link

https://github.com/xpirt/sdat2img/archive/master.zip

2. Create a folder "ext"

3. copy "sdat2img.py", "system.transfer.list" and "system.new.dat" to ext folder

4. Open cmd on "ext", (by selecting and holding shift , you will find "Open command window here")

5.Type this on command window

python sdat2img.py system.transfer.list system.new.dat system.img

6. After that you'll find system.img on that folder, that image file is ext4 image file and can be extracted by this guide

http://xdaforums.com/showthread.php?t=2285831

END OF SUPPORT I DON'T HAVE ANY METHODS LEFT AND PLESE ASK PROBLEMS RELEATED TO ANDROID 6.0 ONLY

Repack *.DAT

/*Repack will or will not work, Don't panic if it not worked, You can still use folder =) */

For flashing xyz_ROM.zip with dat files , you need to modify updater-script

Script, "of some roms" , b'coz some roms contains a link b/w updateR-script

and system.transfer.list. The link includes following : There is a line in

updateR-script script called

if range_sha1("/dev/block/platform/msm_sdcc.1/by-name/system", "36,0,32770,......,307199") == "0b20303394271424267e36a0ce7573f1b62ddc0d" then

if you found this in

updateR-script then from here follow the guide Repack_INFO.txt otherwise

directly copy system.new.dat and system.transfer.list to ROM folder and

repack/zip it and flash it.

Repack ,select from script, then choose manually (option 1)

Copy all your ROM files/subfolders(bin ,app ,build.prop etc) to system folder

Everything is expalined in extractor, read it carefully

If you found "range_sah1()" on your updateR-script then continue below, else only you have to replace system.new.dat and system.transfer.list of "xyz_ROM"

CONTINUE ONLY IF YOU FOUND RANGE RANGE_SHA1

After repack a SHA1_VALUE of system.new.dat is generated and file is created as "SHA1_VALUE.txt" with "system.new.dat" & "system.transfer.list"

And follow this guide Repack_INFO.txt (attached end of this POST)

OR GIT ATTACHEDhttps://github.com/matriex/System_Extractor/blob/master/Repack_INFO.md

That's all if you need help feel free to comment

Thanks for using this method I can't say it will work , but what's wrong in trying , I tried 10 to 20 times to make it work

A LITTLE ADVICE

1. If the script failed to work ,please take a look at this post again I'm sure I've posted enough resource which will help you out in extracting and repacking .DAT files .

2. Please keep this thread clean.

3. Please don't quote whole thread(use tags).

4. I take no responsibility of repacking system.img!

5. For Linux users :https://github.com/matriex/System_Extractor-Linux/blob/master/README.md

6. Use Python 2.7.x or otherwise extractor will not work Do not use python 3.0 or update sdat2img.py binary!

Thanks to [MENTION=5132229]xpirt[/MENTION] for sdt2img

Repack_INFO.txt (GIT-HUB, clear view)