Skip to content

Flashing Container based Android ROM Images

soccercheng edited this page Jan 11, 2018 · 2 revisions

Flashing Host Images

Flashing CBA (Container-based Android) images on Pixel XL is quite simple, nothing different from the essential AOSP ROM images installation, conceptually, you can follow the following steps to flash CBA images

  • Unlocking the bootloader
  • Booting your device into into fastboot mode
  • Flashing images
    • fastboot flash boot boot.img
    • fastboot flash system system.img
    • erase userdata and cache
      • fastboot -w
    • fastboot flash vendor vendor.img
      • Flashing vendor partition is required especially when you've upgrade your Pixel XL to Android 8.X, the essential Android 7.X vendor partition is not compatible with the one of Android 8.X
    • Rebooting the device
      • fastboot reboot

Pushing container's block device images onto device

Before a container can be ready for launching, we need to prepare its required block devices images.

$ adb push $CONTAINER_IMAGES_HOME/system.img.raw  /data/maru/con1/system.img.raw

# The userdata.img is 8G, please be patient when pushing it.
$ adb push $CONTAINER_IMAGES_HOME/data.img.raw  /data/maru/con1/data.img.raw

$ adb push $CONTAINER_IMAGES_HOME/data-persist.img.raw  /data/maru/con1/data-persist.img.raw

#
# Reboot the device
#
$ adb reboot

Booting Container-based Pixel XL

It takes longer when booting form a cleanly flashed Pixel XL, this is because some of the prebuild APPs are not pre-compiled into odex. basically, please following the steps to when booting

  • host
    • please finish setup wizard provisioning steps and configure the wireless network for the Android host
  • container
    • he container won't start if the host does NOT finish provisioning
    • please also finish setup wizard provisioning in container as well, we encourage you to use different Google account on container

Switching Between Host and Container

Please launch the prebuild "aSwitch" APP to switch host and container.