How to Unpack system.new.dat.br file which I found in Android 8.1 rom(aosp Based)

21,004

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]
Share:
21,004
Admin
Author by

Admin

Updated on July 09, 2022

Comments

  • Admin
    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
    Mathews Sunny over 6 years
    Add some more detail here.
  • Admin
    Admin over 6 years
    Put 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
    Bernhard Stadler over 3 years
    This is not what the author of the question asked for - he specifically asked for how to extract it.
  • Just Khaithang
    Just Khaithang over 3 years
    can that dat file be also decompressed by brotli?