lollipop .dat files decompress

20:58 by
Windows 32/64 bit - Guide

Step 1 - Decompressing = DAT (sparse data) -> EXT4 (raw image)

We're now using sdat2img.exe binary, the usage is very simple:
sdat2img <transfer_list> <system_new_file> <system_ext4>
- <transfer_list> = input, system.transfer.list from rom zip
- <system_new_file> = input, from rom zip
- <system_ext4> = output ext4 raw image file

and a quick example:
sdat2img system.transfer.list my_new_system.ext4
by running this command you will get as output the file my_new_system.ext4 which is the raw ext4 image.
If you want to extract all files from it, you have to mount it as an ext4 standard image, there are many guides on xda and google how to do it, please don't ask here for it.

Step 2 - Converting = EXT4 (raw image) -> EXT4 (sparse image)
bla bla bla

Step 3 - Compressing = EXT4 (sparse image) -> DAT (sparse data)

After getting our sparse image, we need to compress it back to the DAT file, to do this we have to use the img2sdat.exe file.
The usage is very simple also for this one:
img2sdat [<system_img>] [<output_dir>]
- [<system_img>] = optional input sparse image file, if not entered default is system.img (must be in the same path)
- [<output_dir>] = optional full path of the output DAT file, if not entered default is current path

and a quick example:
img2sdat my_new_system.img /new
As you can see the file will be inside the folder /new. This file is ready to be replaced inside your rom!

sda2img  here
img2sda  here