3

I downloaded a ROM for a Xiaomi phone to see what's inside. It's a zip file, that has these inside:

boot.img                    META-INF               system.new.dat.br     vendor.patch.dat
compatibility.zip           product.new.dat.br     system.patch.dat      vendor.transfer.list
dynamic_partitions_op_list  product.patch.dat      system.transfer.list
firmware-update             product.transfer.list  vendor.new.dat.br

I understand that boot.img is what is loaded on boot. It has the kernel and a ramdisk. But how can the bootloaded, or the kernel, or the ramdisk access the other files like system.new.dat.br? Both system.new.dat.br and product.new.dat.br are 1gb large, so I guess they have the system.

So my question is: what are these files and how does the boot.img contents load them?

ps: .br is a compresses archive. It decompresses to .dat, but what are the contents of these?

Gatonito
  • 151
  • 3
  • 1
    Based on the file names I would assume that you don't have a full system firmware, instead you have a partial OTA update, hence those files only contain the changes that are applied to each partition on your device. How such a patch is applied can be seen e.g. in this tool: https://github.com/erfanoabdi/imgpatchtools – Robert Jan 05 '21 at 08:36
  • 1
    brotli --decompress --in system.new.dat.br --out system.new.dat; python sdat2img.py system.transfer.list system.new.dat system.img; – alecxs Jan 05 '21 at 09:57
  • @Robert do you know a full ROM that I can take a look? I'm intersted in seeing how it looks fully – Gatonito Jan 05 '21 at 17:45
  • @alecxs thanks, there's a folder images/ with lots of .img. Do you know where I can read more about it? – Gatonito Jan 06 '21 at 01:47
  • very good explanation of android partitions on xda-developers

    https://android.stackexchange.com/questions/215683/trying-to-understand-the-options-in-twrp-backup#comment276228_215683

    – alecxs Jan 06 '21 at 07:58
  • Mediatek partitions explained https://blog.csdn.net/zhangbijun1230/article/details/81092381 Mediatek secro seccfg special partitions https://blog.hovatek.com/so-whats-all-this-talk-about-meditek-secure-boot-and-da-files – alecxs Jan 06 '21 at 08:33
  • you might have already noticed but of course the partition naming for qualcomm chipset is entirely different from mediatek. also kirin, spreadtrum and nvidia tegra have their own layout, it's always OEM specific https://android.stackexchange.com/q/219699 – alecxs Jan 06 '21 at 10:07

0 Answers0