ReleaseEngineering/Mozpool/How To Create a Panda Android Image Suitable For Mozpool

< ReleaseEngineering‎ | Mozpool
Revision as of 16:22, 31 December 2012 by Dividehex (talk | contribs) (Created page with "Mozpool uses build artifacts to deploy Android and B2G on to SD cards. The SD card must be pre-populated with a preseed image which contains a MBR partition table and the u-boot...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Mozpool uses build artifacts to deploy Android and B2G on to SD cards. The SD card must be pre-populated with a preseed image which contains a MBR partition table and the u-boot loader.

Capturing the Android Artifacts from a SD Card

If you have installed Android on an SD card, you can extract the system, userdata, and boot artifacts using tar.

  • Start by inserting the SD card into the reader on the capturing host.
  • Create the mount points.
mkdir -p /tmp/boot/ /tmp/system/ /tmp/data/
  • Check dmesg to determine the device filename (eg this is typically either /dev/sdX or /dev/mmcblkX)
dmesg
  • Some OSes auto mount SD cards upon insertion. Check the mounted filesystems and mount the boot, system and userdata partitions to the correct mount points.
sudo mount -t vfat /dev/mmcblk0p1 /tmp/boot
sudo mount -t ext4 /dev/mmcblk0p2 /tmp/system
sudo mount -t ext4 /dev/mmcblk0p5 /tmp/data
  • Using Tar to extract the artifacts. Although android uses several partitions, only 3 are needed for mozpool to deploy at working Android image. It is critical to use sudo here. Not using it can result in bootable but unstable images due to clobbered file ownership and permissions.
sudo tar -jcpsf system.tar.bz2 -C /tmp system
sudo tar -jcpsf userdata.tar.bz2 -C /tmp data
sudo tar -jcf boot.tar.bz2 -C /tmp boot/uInitrd boot/uImage

This will produce 3 tarball artifacts.

  • system - Android mounts this as /system within the init startup phase and contains all the Android OS components
  • userdata - Android mounts this as /data. It contains apps and configuration data
  • boot - This is contains only 2 file, the Android linux kernel (uImage) and the initrd ram disk image (uInitrd). The boot loader and boot loader scripts are provided in the preseed image and should not be captured in the boot artifact.

Once the artifacts are captured, see Adding New Android Images to Mozpool section for uploading instructions.