Nobin Khan
Nobin Khan

Reputation: 71

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

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.

Upvotes: 7

Views: 34615

Answers (6)

You can also run the linux commands in windows using the linux subsystem (install linux subsystem, shift right click inside the parent folder and select "Open linux shell here").

Upvotes: 0

Just Khaithang
Just Khaithang

Reputation: 1555

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]

Upvotes: 7

Varun
Varun

Reputation: 1

No need to extract it, you should have custom recovery I.e., twrp,cwm or orange fox(your device). Wipe system,vendor, data, cache, especially dalvik cache. And install your zip

Yup, ready with your custom rom

Upvotes: -3

Sabrina
Sabrina

Reputation: 2799

For MS Windows:

1- Download brotli

2- run this:

brotli --decompress --in system.new.dat.br --out system.new.dat

brotil.exe and system.new.dat.br are in current command-line path.

FMI: Brotli compression format is by google Github

Upvotes: 0

Vladimir
Vladimir

Reputation: 1135

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

Upvotes: 14

Spannaa
Spannaa

Reputation: 51

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.

Upvotes: 5

Related Questions