yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] MirzaAwais:
[MENTION=7110463]matrixex[/MENTION] thanks for your work and [MENTION=5132229]xpirt[/MENTION] also.

i unpack and repack system.dat.new files after desired modification using this tool but when i repack its asking me for size in Mb's which was given as actual of system folder but after flashing on phone its compact my system partition size as size given at the time of repack. its repack process issue or anything else? if its not related to this tool so please ignore or if you can so please guide me to find out the root cause and its solution. thanks
[Android Q&A, Help & Troubleshooting] 911-Future_Maker:
Strange enough I found that the v2.4 version of the Extractor is working fine on Win 10 x64.
[Android Q&A, Help & Troubleshooting] matrixex:
It worked, may be due to old version of Imagextractor binary.

Just replaced Imagextractor binary with old one, Download and Try extracting rom on win10 with the current extractor
[Android Q&A, Help & Troubleshooting] 911-Future_Maker:
Hi, the unpack results seem to differ from the type of the compression used in system.new.dat I tried other .dat with the 2.4 and it failed. Also tried the new 4.6 with the replaced extractor binary and it still fails. Depends of the system.net.dat itself.
[Android Q&A, Help & Troubleshooting] matrixex:
That will be a problem , for now I think I'll let user extract .dat files themselves, with alternate method who are currently facing this problem
[Android Q&A, Help & Troubleshooting] Saber5311:
i get this error for repack

It seems like the extractor not worked with your

provided system folder COMMENT ON XDA THOUGH

IT MAY BE DUE TO CORRUPTED SYSTEM.DAT OR UNKNOWN REASON

help?
[Android Q&A, Help & Troubleshooting] Kogam22:
While Repacking, The Size In MB Should Be Of What ? Original system.new.dat File ?

There Is This Line

show_progress(0.500000, 120);
format("ext4", "EMMC", "/dev/block/mmcblk0p17", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p21", "/data");
package_extract_file("system/bin/otasigcheck.sh", "/tmp/otasigcheck.sh");
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
set_perm(0, 0, 0755, "/tmp/otasigcheck.sh");
run_program("/tmp/otasigcheck.sh");
sha1_check(read_file("/tmp/releasekey"),"7241e92725436afc79389d4fc2333a2aa8c20230") && abort("Can't install this package on top of incompatible data.

So, Here " 7241e92725436afc79389d4fc2333a2aa8c20230 " Is SHA-1 Checksum Of releasekey ?

Will It Flash properly without errors If I Delete The Total Line of sha1_check From updater-script?

I'll Be happy If You Reply ASAP.

Thanks For The AWESOME Tool BTW.
[Android Q&A, Help & Troubleshooting] matrixex:
No, the size is of system folder

Yes it's the sha1 check of releasekey

NO It will not work, you must include sha1_check else twrp will give error(in MM AND LP)

Â¯\_(ãƒ„)_/Â¯

ðŸ‘
[Android Q&A, Help & Troubleshooting] mihai.zaim:
Python not found
Switching sdat2img.py to spars2ext.exe

sprs2ext v1.0.0
Built by: Ricky Divjakovski
Contributors: xpirt - luxi78 - howellzhu

Skipping zero command.
Skipping zero command.
Skipping zero command.
Skipping zero command.
Skipping zero command.
Skipping zero command.
Skipping zero command.
Skipping zero command.
Skipping zero command.
Copying 435 blocks into position 261195...
Copying 108 blocks into position 261631...
Copying 4 blocks into position 261740...
Copying 19 blocks into position 261745...
Copying 173 blocks into position 261765...
Copying 14 blocks into position 261939...
Copying 9 blocks into position 261954...
Copying 9 blocks into position 261964...
Copying 14 blocks into position 261974...
Copying 36 blocks into position 261989...
Copying 36 blocks into position 262026...
Copying 14 blocks into position 262063...
Copying 9 blocks into position 262078...
Copying 9 blocks into position 262088...
Copying 9 blocks into position 262098...
Copying 9 blocks into position 262108...
Copying 9 blocks into position 262118...
Copying 9 blocks into position 262128...
Copying 4 blocks into position 262138...

Output image: C:\Users\mihai\Desktop\SYSTEM~1\system.img.ext4
converting "system.img.ext4" to "system"

ImgExtractor version 1.3.6 <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

Open image file system.img.img (size 1073733632 bytes) successfull...
Analize format of file. Please wait...
Exception EAccessViolation in module Imgextractor.exe at 00003F74.
Access violation at address 00403F74 in module 'Imgextractor.exe'. Read of address B9EC8B51.

Unfortunately it doesn't find Python and Imgextractor.exe crashes while extracting 7.1 files. Thought it worked flawless while extracting a system.img from Pixel's ROM.
[Android Q&A, Help & Troubleshooting] matrixex:
Look at the post, there is another method for extracting system.new.dat!

Btw Python not found because you haven't installed Python.exe binary , while installing Python, select Install Python.exe

Refer to this: http://dl-1.va.us.xda-developers.com/3/9/5/6/8/3/2/py.PNG?key=xbnnK8FKRvM4cly9ibqqEA&ts=1481559696
[Android Q&A, Help & Troubleshooting] mihai.zaim:
I think that Pynthon is installed because I was able to extract a 6.0 file.

Edit: Thanks a lot! It worked.
[Android Q&A, Help & Troubleshooting] Kogam22:
[IMG="Add Python.exe To Path"]http://docs.platformio.org/en/stable/_images/python-installer-add-path1.png[/IMG]

During Installation ,Click Add Python.exe To Path And Select Local Hard Drive.Then Click Advanced And Tick The Option.

Extraction Will Work Fine Even For 7.1 Files.

This Procedure Worked For Me While Extracting CM 14.1 .DAT Files.

---------------------------------------------------------------------------------------------------------------------------------

The URL You Mentioned Is SERIOUSLY Not Working Man.

See This Link For ScreenShot
[Android Q&A, Help & Troubleshooting] matrixex:
That's the right way to install python, cheers!

Sorry bro , actually that Image is the attachment of that post OR the Image that you posted!

Here is the image(see attachment).
[Android Q&A, Help & Troubleshooting] Kogam22:
I Flashed My Ported ROM, It Gets Stuck On Boot. But The Installation Worked Perfectly Without That Line In Script(Didn't Show Errors In Philz Touch).

Problem With Other Things Maybe.
[Android Q&A, Help & Troubleshooting] Kogam22:
A Few Questions If I May,

1. After Unpacking .DAT Files From A ROM, Can I Put The Files( System Folder And File_Contexts ) In The Same ZIP Which I Unpacked And Flash Them(After Deleting System And File Contexts And Replacing Them By .DAT Files) ?

2. Suppose I Have The System And File_Contexts And I Pack Them To .DAT And Put In The ROM ZIP And Flash. Would It Work ?
[Android Q&A, Help & Troubleshooting] matrixex:
You can but it will have some major Issues like when you use system folder instead system.new.dat, you also have to make changes to updater-script -found in "META-INF/?/?/?/updateR-script".

Yes it will work but only with MM and LP, I have not tried with Nought yet
[Android Q&A, Help & Troubleshooting] 南方公园:
oh ! thank you very much!:good::fingers-crossed:

it will be work on Nought7.1 ?
[Android Q&A, Help & Troubleshooting] matrixex:
Extract will work only , Repack will not
[Android Q&A, Help & Troubleshooting] siapakahaku:
afater repack, i have 3 files i.e system.new.dat, sha1.txt and file.transfer.list

but...file.transfer.list showed 0KB and it's empty

nothing written there just blank document

is this right? or i missed some step or something?

i'm unpack and repack miui8 MM rom
[Android Q&A, Help & Troubleshooting] Fild5x:
Please I need quick help. When I run this it asks to copy system.new.data to current folder. Which folder should I save the files to., Sorry if am asking something that has already been explained.
[Android Q&A, Help & Troubleshooting] matrixex:
[MENTION=7252781]Fild5x[/MENTION]

The folder where you placed " EXTRACTOR.BAT"
[Android Q&A, Help & Troubleshooting] matrixex:
I have never tried repacking with MIUI ROM's. Maybe repack will not work, or may led to unexpected errors.

And system.transfer.list cannot be empty it will contain some commands/lines. If it is empty then it's clear that repacking failed!

System.new.dat repacking varies with devices and It doesn't works with Stock ROM

Most of users still facing this problem So I would probably suggest you to use system folder for flashing any ROM (custom or Stock) it works with all.
[Android Q&A, Help & Troubleshooting] gggirlgeek:
Thank you! That was so easy. Cool!:cool:
[Android Q&A, Help & Troubleshooting] born4trance:
[MENTION=7110463]matrixex[/MENTION] Thank you for this great program/script/resource/contrubution :)
[Android Q&A, Help & Troubleshooting] scramblesthedeathdealer:
Extraction error

Good afternoon,

I attempted to use your tool to extract a system.new.dat file from an OTA update for my HTC 10. I get the error "No valid command: move." Opening up my transfer list, it's many lines of this:

1

1124441

move 2,583303,583308 2,584975,584980

move 2,808323,808382 2,818933,818992

bsdiff 0 170 2,583310,583318 2,584982,584990

imgdiff 170 1662 2,1198299,1198397 2,30249,30347

move 2,753654,753659 2,818386,818391

move 2,882799,882835 2,819093,819129

move 2,819185,819189 2,819129,819133

move 2,819194,819198 2,819152,819156

move 2,882835,882849 2,819138,819152

imgdiff 1832 472541 2,1010430,1013091 2,1006949,1009641

bsdiff 474373 17118 2,810665,810670 2,819002,819016

move 2,64314,64769 2,172439,172894

imgdiff 491491 1647 2,882851,882854 2,819159,819162

move 2,57076,57584 2,31392,31900

imgdiff 493138 1627 2,32192,32208 2,28000,28016

imgdiff 494765 1651

Is there anything you're aware of I can do to get around this?
[Android Q&A, Help & Troubleshooting] mihai.zaim:
I'm getting ''Updater process ended with signal 11'' while flashing a ported CM 14.1(RIP CyanogenMod) Rom in TWRP 3.0.2. I've modified ''if range_sha1'' in updater-script.:rolleyes:
[Android Q&A, Help & Troubleshooting] matrixex:
CM dead RIP
[Android Q&A, Help & Troubleshooting] matrixex:
Can you upload your TWRP screenshot of that part where error was mentioned,and upload your updater-script too

(take the screenshot by holding power+volume down button in twrp)
[Android Q&A, Help & Troubleshooting] matrixex:
[MENTION=7951655]scramblesthedeathdealer[/MENTION]

I think you you can't extract files because of move command

if cmd in ['erase', 'new', 'zero']:
commands.append([cmd, rangeset(line[1])])
else:
# Skip lines starting with numbers, they are not commands anyway
if not cmd[0].isdigit():
print('Command "%s" is not valid.' % cmd)
trans_list.close()

It will not work.
[Android Q&A, Help & Troubleshooting] mihai.zaim:
Screenshot

https://www.dropbox.com/s/17pd45n91dozk4t/Screenshot_2016-12-14-12-21-21.png?dl=0

Updater-script

https://www.dropbox.com/s/zscgv1b3b6g0ihc/updater-script?dl=0

I know how to take screenshots, I'm not a n00b :P
[Android Q&A, Help & Troubleshooting] pyt.h:
When I want to unpack, i'm getting Force Close and message: Access violation at address 00403F74 in module 'Imgextractor.exe'. Read of address B9EC8B51.
[Android Q&A, Help & Troubleshooting] matrixex:
Wow you followed every step of my guide, thanks, Now as you can see the message in red color

"Zip file is corrupt!

Error installing Zip file"

So that means zip file is not repacked properly, try to repack it again and Don't add any spaces to a zip file!

(Use winrar for repacking)
[Android Q&A, Help & Troubleshooting] mihai.zaim:
I still get error 11.

Screenshot: https://www.dropbox.com/s/3p4taub2h5p3n1d/Screenshot_2016-12-30-10-11-33.png?dl=0
[Android Q&A, Help & Troubleshooting] elxufas:
When I convert the system again to new.dat the rimgsdat.exe application stops working and does not end the process.

Any solution to this.,

The base is Marsmallow and windows 10, I have the same error with the kitchen Assaiyed

I use the option manual assigning the size of the new system, if I do automatic gives me also error
[Android Q&A, Help & Troubleshooting] n1729m:
Thank you very much for this tool. Works perfectly on 7.1.1
[Android Q&A, Help & Troubleshooting] void main():
When are you updated this tool for unpacking Nougat resourses?
[Android Q&A, Help & Troubleshooting] matrixex:
Hi@mihai.zaim

I don't know the problem but can you try flashing the original ROM (unmodified ROM) and see if the rom boots , If it does then please upload its updater script afterwards we'll continue to repack
[Android Q&A, Help & Troubleshooting] matrixex:
Hi, The tool/extract works fine with Nought builds but the repack doesn't.

I've tried repacking Nought ROM but due to encrypted "file_contexts.bin" the repacking failed, I even tried with raw file_contexts(with no encryption) but the binary make_ext4fs leads to another error so maybe there will be no method available for now which can be used to repack Nought
[Android Q&A, Help & Troubleshooting] matrixex:
[MENTION=1928668]elxufas[/MENTION] try this method https://xdaforums.com/showpost.php?p=58509584&postcount=3
[Android Q&A, Help & Troubleshooting] matrixex:
[MENTION=7603631]pyt.h[/MENTION] try searching xda, there is enough guide and tools to extract it :good:
[Android Q&A, Help & Troubleshooting] t-ryder:
Tried to unpack Xiaomi.eu ROM.

Option 1, all needed files were copied.

This happens:
[Android Q&A, Help & Troubleshooting] zaibansari20:
Do I need to add permission command for every file inside /system directory if I install rom through directory method
[Android Q&A, Help & Troubleshooting] matrixex:
ofcourse you have to include set_perm etc functions to assagin permission

For all this try dxdia kitchen
[Android Q&A, Help & Troubleshooting] zaibansari20:
Will give it a shot
[Android Q&A, Help & Troubleshooting] zaibansari20:
Will it add permissions automatically?
[Android Q&A, Help & Troubleshooting] matrixex:
Yea but dxdia's kitchen is old may be some permission or symlinks are missing so try checking the script manually and if possible try comparing it with another ROM (of that device and must be 4.x.x - KITKAT) whose updater script contains "permissions"

OR search xda for new "android kitchen" for more or new permissions(android M/N)

Note:

1) android kitchen - A tool through which you can bake ROMs, like making ZIP files using "system folder"and "boot.IMG" and can also assign symlinks and permission to "updateR-script".

2)updateR-script : It's part of zip file which is generally found in "ZIP>>META-INF>>COM>>GOOGLE>>ANDROID>>updateR-script" which is needed to give instruction to TWRP as for flashing system folder to system partition and other for running/doing various kinds of works.

3) Kitchen automatically adds META-INF folder for symlinks and for modding ROMs

So you will only need system folder(with build.prop) and boot.IMG to work with kitchen
[Android Q&A, Help & Troubleshooting] zaibansari20:
Really thankful info

Thanks alot
[Android Q&A, Help & Troubleshooting] lespaul79:
Unpack system dat works however repack does not work. I have Windows 7 I have also tested with Windows 10 and nothing.
[Android Q&A, Help & Troubleshooting] rivelta:
how to fix this??

i have extract this file to root folder

please advice ... asap
[Android Q&A, Help & Troubleshooting] matrixex:
On my guide find this keyword

"Extract *.DAT files" and follow Method II (commandline)

It works in windows XP
[Android Q&A, Help & Troubleshooting] matrixex:
I know repack doesn't works and I can't help it unless I build a rom from source , right now the guide works with my ROM(CM-13,nicki) and may be it doesn't work with other user(say 50%, cause they are dependent and don't want to do repack from scratch) so you have to wait for a dev to release a guide for proper repacking or wait unless I find a new method
[Android Q&A, Help & Troubleshooting] lespaul79:
Thanks
[Android Q&A, Help & Troubleshooting] Mr Hassan:
and how pack system.img.ext4 ?:confused:
[Android Q&A, Help & Troubleshooting] Mr Hassan:
i have extracted system folder , i past in tool folder and after try to repack its giving this error

"file_contexts" not found please copy it too current

directory, Thanks for your cooperation
[Android Q&A, Help & Troubleshooting] :
Imgextractor.exe stopped working :/ (Worked before but no longer working)

*Edit: Seems like it isn't working on the device I'm trying to extract from (Samsung Galaxy S4 Mini) does work on other devices though :/
[Android Q&A, Help & Troubleshooting] svandasek:
Hello people! I want to share some exerience:

I just unpacked the system.new.dat file to system folder and edited it and now i wanted to repack back to system.new.dat.

So i unpacked boot.img, took the file_contexts.bin file, converted it using this tool and picked the repack option. First i tried the auto-way of repacking, which didn´t work. Now i picked the manual and it repacks! Awesome tool! The first one where repacking to .dat worked!
[Android Q&A, Help & Troubleshooting] iamnewborn:
Hi there

I cannot repack system.new.dat

I'm working on MIUI V8.1.3.0

Unpack goes fine. Then i move system_ folder contents to system folder, file_contexts at root folder.

Finally i receive:

It seems like the extractor not worked with your

provided system folder COMMENT ON XDA THOUGH

IT MAY BE DUE TO CORRUPTED SYSTEM.DAT OR UNKNOWN REASON

What's next?

My setup is Win10 x64 Enterprise

Script is launcing from elevated prompt.
[Android Q&A, Help & Troubleshooting] ashkan-khatar:
I'm experiencing the same issue. Please help.

I tried Manual Mode, too; it fails at some other point, saying rimg2sdat.exe has stopped working.
[Android Q&A, Help & Troubleshooting] lespaul79:
I happen exactly the same as you
[Android Q&A, Help & Troubleshooting] iamnewborn:
I found this one:

"the rimg2sdat use the old android 5.0 method for compression, so 5.1 ROMS are not supported"

Maybe that's why it crashes.

I'll try to run it on W7x86 System.
[Android Q&A, Help & Troubleshooting] ashkan-khatar:
I thought W10 wasn't compatible. Do report back how it goes. Thanks.
[Android Q&A, Help & Troubleshooting] lespaul79:
Repack does not work in w7 or w10, at least in my case
[Android Q&A, Help & Troubleshooting] thaifani:
not working on Nougat firmwares

when i tried to Extract firmware for G930v (G930VVRU4BQA2) ,it hung when extrach EasyContact.apk

please update this tool
[Android Q&A, Help & Troubleshooting] drei.liter.milch:
works in 90%

sometimes it messes up during repacking.

All in all very useful.thanks
[Android Q&A, Help & Troubleshooting] ransomdeveloper26:
Hello,

this tool works like a charm for marshmallow and below but could somebody tell how to use it for nougat (Lineage OS 14.1) it gives me an error and the imgextractor force closes!!!

Hope somebody out here can give me a heads up :)

Edit1: alright so i was browsing xda and was tryimg all available extractors and finally found one that works for lineageos 14.1 or any 7.1.1 roms!

https://xdaforums.com/general/general/tool-auto-tool-unpack-repack-rom-t3278393

so hope somebody finds this useful! happy Porting :)
[Android Q&A, Help & Troubleshooting] dark_boy99:
hi dear

when i try to extract system.img android 7.0.0 i failed

log:

Open image file system.img (size 4404019200 bytes) successfull...

Analize format of file. Please wait...

Found SPARSE FORMAT

Found EXT4 FORMAT

free space in image 806776832 bytes

Extract started. Please wait...

any body have speak?

sorry for my bad english
[Android Q&A, Help & Troubleshooting] matrixex:
Sorry It was imgextractor.exe binary problem and cannot be resolved by me unless and until the Dev fix it , so try the extracting by another method , try this one

https://xdaforums.com/showthread.php?t=2285831 (only last hope)
[Android Q&A, Help & Troubleshooting] Rom:
I get an error ("access violation") when i try extract img nougat image:

Sreenshoot:

I go try another tool..
[Android Q&A, Help & Troubleshooting] deepjyoti30:
[MENTION=7110463]matrixex[/MENTION] Hey i am usimg ubuntu.I tried converting system.new.dat to system.img by the given command and everything worked. But when i try to mount it by the second command i get an error.

Mount:wrong fs type bad block superblock at /dev/loop0

Etc etc.

Can you please look at the error. I had been trying for about a week now without succes.
[Android Q&A, Help & Troubleshooting] NMBNMB:
[MENTION=7110463]matrixex[/MENTION] Simply fantastic, thanks a lot.
[Android Q&A, Help & Troubleshooting] matrixex:
try "sudo mount system.img"

or "sudo mount -t ext4 -o loop system.img output/"

in terminal , make sure to obtain a ext4 "system.img" file
[Android Q&A, Help & Troubleshooting] bovirus:
[MENTION=7110463]matrixex[/MENTION]

In first post the imgextractor download link point to version 1.3.6.

The latest build for imgextractor from 4PDA forum) is 1.3.7.

Could you please update it?
[Android Q&A, Help & Troubleshooting] matrixex:
Please provide the link
[Android Q&A, Help & Troubleshooting] bovirus:
ImgExtractor 1.3.7 downloaded from 4PDA forum.

https://mega.nz/#!KIYUzA6J!Qt9R2mGit6bZ1racwCRi3TvI6fyG3zhI1Lvq4na_J74

Reference: https://4pda.ru/forum/index.php?showtopic=496786
[Android Q&A, Help & Troubleshooting] kessaras:
i'm waiting for the system.new.dat to be extracted since 1 hour. How long will that take ?

my pc isn't that poor. my hard disk can handle 1gb in a few seconds..... i'm talking for a desktop here not any slow laptop.

Did everything the OP sais.

Installed java 8x64, installed python 2.7 x64 and now what ?

Maybe x64 doesn't work and i have to go for the x32 ?

EDIT:

added a screenshot. image extractor takes forever.

1 and half hours and still waiting. i tried both, 1.3.6 from the tool and the 1.3.7 from the post above.

any ideas ? (Windows 10 x64)
[Android Q&A, Help & Troubleshooting] deepjyoti30:
Which and version are you trying to extract??

---------- Post added at 08:15 PM ---------- Previous post was at 08:12 PM ----------

Fixed it. Actually the issue was file_contexts. In nougat it is a bin file and has to be converted to the file required by the program.

Worked for me. Thanks for helping though.

---------- Post added at 08:17 PM ---------- Previous post was at 08:15 PM ----------

Was facing the same issue. The problem here is the file_contexts file. Just get the file context converter(google that) and use it to convert the file context file. Then put the file in whatever folder the application asks you to keep and try again.

Even i tried many different programs but the same issue. Even tried in Ubuntu.
[Android Q&A, Help & Troubleshooting] kessaras:
RR 5.5.9

It was Android 5.1
[Android Q&A, Help & Troubleshooting] deepjyoti30:
That must not through an error. Has it got extracted now??
[Android Q&A, Help & Troubleshooting] kessaras:
Sec. Sorry. Android 5.1 was not .dat.

I extracted many roms yesterday and got confused now.

7.1.2 I was trying and failed
[Android Q&A, Help & Troubleshooting] deepjyoti30:
Sure i was wondering how calm 5.1. Anyways the issue is probably because of the file contexts which is a bin file from nougat. So just get file contexts converter (google it) and use it to convert the file. Then put the file in wherever the application asks you to keep it and try. It must work.
[Android Q&A, Help & Troubleshooting] kessaras:
hmmm. Wierd, but the extractor asks for the system.new.dat and system.transfer.list. file_contexts.bin is not needed.

Also after googling file_contexts.bin converter it gave me one and only result in google sending me in xda and that guy has a link which is reported as a virus in chrome.

So i got nothing in google and i still don't get it , since the tool here doesn't want that file

EDIT:

i think i found something

https://xdaforums.com/showpost.php?p=70881172&postcount=1985

is that it ?

Now i only have the question "why" since the tool here doesn't ask for that file