How to Unpack system.new.dat.br file which I found in Android 8.1 rom(aosp Based)
Solution 1
On Linux this can be decompressed with brotli like this (Ubuntu):
$ sudo apt install brotli
$ brotli --decompress system.new.dat.br -o system.new.dat
Solution 2
system.new.dat.br
is system.new.dat
compressed into a .br (brotli) file.
On Windows, you can use Eric Lawrence's Brotli.exe to decompress the .br file to system.new.dat
which you can extract as before.
Solution 3
if you want to extract it to modify the contents (i.e. edit files and folders), then after extracting it with the brotli tool ( as mentioned in the other comments) you have to decompress/extract the sparse android data (.dat) to an ext2/3/4 raw image. For that you would need the sdat2img tool.
sdat2img <transfer_list> <system_new_file> <ext raw image>
an example:
sdat2img system.transfer.list system.new.dat system.img
after which you would be able to mount system.img to a folder and then be able to access the contents/modify it.
After that, if you want to flash it to device, you may have to convert it to sparse image for android. For that you would need the img2simg
tool.
img2simg <raw/ext image file> <sparse_image_file> <block_size>
following the previous example above,
img2simg system.img sparse_image.img [blocksize can be skipped]
Admin
Updated on July 09, 2022Comments
-
Admin almost 2 years
I recently downloaded a aosp based rom from xda for my Xiaomi redmi note 3 pro(kenzo) device. It's name is "Pixel experience android 8.1". when extract the rom zip file, there is a file name "system.new.dat.br" , I want to extract it or unpack. but i can't do it. please can any one help me about this how to unpack the new type system.
-
Mathews Sunny over 6 yearsAdd some more detail here.
-
Admin over 6 yearsPut system.new.dat.br and Brotli.exe in a folder, open a command line in the folder and "brotli --decompress --in system.new.dat.br --out system.new.dat"
-
Bernhard Stadler over 3 yearsThis is not what the author of the question asked for - he specifically asked for how to extract it.
-
Just Khaithang over 3 yearscan that dat file be also decompressed by brotli?