Explicitly list supported flashing methods for devices

When using pmbootstrap install, there are generic instructions afterwards on how to flash your device. However, these instructions were wrong in my case and I didn't know that for a long time. One way to address this would be for these instructions to say to reference the device page. However, that doesn't work well when offline nor does it help when creating a device. And it's an extra step for the user. I think we can do better and explicitly annotate the supported installation modes for a device.


Use my samsung-milletwifi device as an example:

  1. The supported configuration I'm building on is using lk2nd, so first need to install that. That's a one-time thing via pmbootstrap flasher --flash_lk2nd.

Now after that, to install a new build I only need to run pmbootstrap flasher flash_rootfs .

I believe I can also boot from it without installing by running pmbootstrap flasher boot with lk2nd.


For a very different device, like google-sargo, the steps are:

One-time setup to erase the DTBO: fastboot erase dtbo

  1. Flash the rootfs: pmbootstrap flasher flash_rootfs
  2. Flash the kernel: pmbootstrap flasher flash_kernel

Some other flashing approaches that complicate this:

  • Flashing to an sdcard (requires configuration during the pmb install stage)
  • Flashing rootfs to a separate partition (e.g. pmbootstrap flasher flash_rootfs --partition userdata when system partition is too small)
  • Installing from recovery (requires configuration during the pmb install stage)

There are some options that people might want who are doing dev, but in general I imagine there's a "Default" installation path that's recommended. One that is safe and allows for reinstalling Android. I'd think there is generally only 1 approach for this per-device: aka The Happy Path. Is there a way to simplify the happy path by explicitly stating it in a way that pmb install and pmb flasher could leverage so you just run those two commands and it's done (sans any one-time setup)?