FORUMS
Remove All Ads from XDA

[Tool]Extract and Repack system .DAT/BR and .IMG on android 5-8.1

210 posts
Thanks Meter: 970
 
By JamFlux, Senior Member on 10th September 2017, 06:18 AM
Post Reply Email Thread
Hi XDA people.
Today I want to share my private batch tool for unpack and repack android system images.
I'm not an expert in batch scripts for Windows, but I do my effort to make the best that I can do.

UR-Tool


This simple tool can:
-Unpack and repack vendor image with common formats like .dat or .dat.br
-Unpack payload.bin ROM and & repack into system.img for A/B devices like Pixel, and Mi A1, etc.
-Unpack & repack system.new.dat compression format used since android Lollipop to Oreo 8.1
-Unpack & repack system.img ext4 raw format
-Unpack & repack new Brotli compression method for android 8.1
-Convert filecontexts.bin to plain contexts file
-Deliver symlinks and permissions from system image

Big Changelog 28-08-2018:
Version 1.8 Semi-Stable:


--Updated make_ext4fs binary to 8.1 version
-Now supporting fs_config for correct system permissions
-Fix for timestamp on Miui ROMs
-Zipalign function added and updated to 8.1 apks
-Code has been cleaned
-Minor fixes
-Double system.img extraction method for best compatibility when repacking without loosing symlinks
-Added symlinks support for vendor image
-Fixed support for symlinks and permissions for system image
-Added proper credits and sources for binaries.



How to use:
-Disable antivirus
Watch old video
1. Paste a zip ROM into UR-Tool root folder
2. Execute URTool.exe
3. Choose the zip ROM for unpack and/or repack
4. Select unpack and unpack options
5. Enjoy the magic!

Requisites:

-May be Windows update #KB2999226

Credits:

foquanlin, @nkk71, @SuperR. and @NevaX1 for make_ext4fs utility.
@xpirt for sdat2img & img2sdat tools
@ASSAYYED for his great knowledge in batch script
https://github.com/wuxianlin for sefcontext_decompile code
and @JakeV for parser sefcontext
7zip developer
ASdev for some cygwin binaries
Free icon
and_PDA for Imgextractor.exe, russian forum
liudongmiao for bootimg tool
Some credits to me, too

Source code:
URTool
Make_ext4fs utility
Feel free to give some improvements


Download center:
UR-Tool Prime V1.8 semi-stable
MD5: bafc6092bbd6408c651e9714b6ae0c79

UR-Tool Prime V1.7 semi-stable
MD5: 23217f3d09df7b991251972aa8d721f6
Attached Thumbnails
Click image for larger version

Name:	URTool-head.png
Views:	5814
Size:	8.4 KB
ID:	4567397   Click image for larger version

Name:	URTool-menu.png
Views:	6396
Size:	29.0 KB
ID:	4567398   Click image for larger version

Name:	URTool-payload2.png
Views:	6304
Size:	25.5 KB
ID:	4567399   Click image for larger version

Name:	URTool.png
Views:	5920
Size:	26.2 KB
ID:	4567401  
The Following 87 Users Say Thank You to JamFlux For This Useful Post: [ View ] Gift JamFlux Ad-Free
 
 
10th September 2017, 06:30 AM |#2  
OP Senior Member
Villavicencio
Thanks Meter: 970
 
More
Reserved
The Following 5 Users Say Thank You to JamFlux For This Useful Post: [ View ] Gift JamFlux Ad-Free
10th September 2017, 06:57 AM |#3  
haqanguven's Avatar
Senior Member
Flag İzmir
Thanks Meter: 433
 
More
Mi5 android 7 is shredding and collecting, it works beautifully. Thanks jamflux
10th September 2017, 07:15 AM |#4  
Senior Member
Flag TVL
Thanks Meter: 207
 
More
@JamFlux Great Sir thanks alot for your tutorial working good here
13th September 2017, 12:20 AM |#5  
OP Senior Member
Villavicencio
Thanks Meter: 970
 
More
Updated tool for android Oreo.
The Following 4 Users Say Thank You to JamFlux For This Useful Post: [ View ] Gift JamFlux Ad-Free
13th September 2017, 10:38 AM |#6  
haqanguven's Avatar
Senior Member
Flag İzmir
Thanks Meter: 433
 
More
Quote:
Originally Posted by JamFlux

Updated tool for android Oreo.

Thanks
16th September 2017, 09:50 AM |#7  
Member
Thanks Meter: 4
 
More
hi @JamFlux,
tested on Oreo?
latest @munjeni's filecontexts converter link pls!
thank you.
1st October 2017, 09:01 PM |#8  
Member
Thanks Meter: 6
 
More
For Windows 7x64 can I build?
I have such an error http://i68.tinypic.com/2cddhd5.png
2nd October 2017, 12:34 PM |#9  
Junior Member
Thanks Meter: 0
 
More
Tested on Oreo.. Successfully decompiled the system.new.dat just be patient..

There an error "FCC hast stopped working" never mind it.. Close that after it finished compiling..

Now Oreo can be ported the only problem is the porting method.. I tried but failed to do so
2nd October 2017, 04:25 PM |#10  
Senior Member
Thanks Meter: 170
 
More
download windows defender detects virus
Attached Thumbnails
Click image for larger version

Name:	Captura.PNG
Views:	1620
Size:	2.8 KB
ID:	4290131  
The Following User Says Thank You to ENRIQUEMM For This Useful Post: [ View ] Gift ENRIQUEMM Ad-Free
7th October 2017, 05:50 AM |#11  
toy_story's Avatar
Senior Member
Flag Tambov
Thanks Meter: 570
 
More
Yes, I Unpack system.new.dat on android 8 made a change, but I can not Repack.
Post Reply Subscribe to Thread

Tags
nougat, oreo, system.img, system.new.dat, unpack

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes