Why different file size Adb pull vs twrp data image size of userdata.img


Well-Known Member
Question Why different file size Adb pull vs twrp data image size of userdata.img

In my lyf water 7 mobile device having 16gb internal memory and 2 gb ram and 16gb external sd card

I had first factory rest my mobile with and formatted my external s d card with no user apps or data installed then I decided to root it and before that want to take a backup

I had loaded twrp recovery (fastboot boot twrprecovery.img) in bootloader mode and took NANDROID backup of system boot cache userdata through twrp backup menu and through adb pull tool all partitions backup of mmcblk0 and system boot recovery userdata and all in other partitions in devices.

Now the backup image size of data taken by twrp in ext4 file system is 2.5 gb whereas adb pull in pc fat32 created file size of 13.5 gb. I think it created file for empty sectors to why both file size of same partition backup is different

Is there any parameter syntax of adb pull way to compress or not trim or not to take empty sectors backup or compres file

I had founded a command "adb shell dd if gz" to compress file but it can't be flashed by fastboot flash command. Is there any way to manually create a flashable compressed file through adb pull or ignore empty space while creating NANDROID image backup so that small file created which can be stored online or in flash drives easily.

Summary brief to clarify
I mean to say that as in same newly formatted factory reseted mobile device (10gb of android system files 16gb of total rom) partition when i took twrp backup datatwrp(ext4).img (as it took file backup image) is compressed to of 3.4 gb (10gb android os system files) and the same device data pulled by adb pull .../mmcblkp30 userdata.img (which creates partititon image backup) image created is of 13.5 gb (10gb out of toral 16gb rom) so the be adb pull userdata.img image file size (13.5gb) is more than the data files size inside internal rom can we decrease that backup size either by zero filling (unused space) or triming the empty space of internal memory or any parameter in adb pull command compresion tool (like gz) can be used with by adb pull command
Last edited: