Search code examples
androidupdatesauto-updateota

A/B software updates system image size


Recently I've been researching to try and understand Android OTA software updates and have found some great info on the Android source wiki about both A/B updates and traditional ones:

https://source.android.com/devices/tech/ota/

Specifically, why is it reported in the Pixel partition sizes table

enter image description here

that "Pixel's A/B system image is half the original non-A/B system image".

According to this the net size is the same as in A/B a system partition of size 2048 MiB is needed for each partition, and for non-A/B it is 4096 MiB. Are these functionally the same in that there are two sets of system files with one for recovery, or is there something else going on here?


Solution

  • 50% of system image is precompiled odex files (-2048MiB)

    • Moved them to B partition
    • Copied to /data on first boot
    • See BOARD_USES_SYSTEM_OTHER_ODEX BoardConfig option
    • Now A/B /system takes same space as non-A/B /system