Installation from recovery mode



Most Android devices have a "recovery" partition, on which a second kernel and initramfs can be installed. The recovery systems installed there allow overwriting the main OS with a special zip file, and it is possible to generate such a file for postmarketOS.

Preparation

 * Install pmbootstrap
 * Install TWRP (or another recovery system) on your phone

Create the recovery zip image
Follow the pmbootstrap article to build your own image, but add  to the install action. If your device supports full disk encryption (see the FDE column in Devices), you can add the  argument.

By default, this will install to the  partition of your Android device. If you want to install to a different partition (e.g. because your  partition is too small), use the   parameter. For example, to install to the data partition:

Sideload
This allows downloading the zip file on the fly directly from your computer. If you don't want to sideload, you can also copy the generated zip file to an SD card.
 * Boot the recovery system
 * Unmount the partitions (Click on "Mount, then deselect all checkboxes)
 * Click on "Advanced / ADB Sideload", then "Swipe to start sideload"
 * Connect your phone to your PC
 * Start the sideloading process from your PC:

Sideload without pmbootstrap
If sideloading with pmbootstrap fails (it was broken in ), you can do it without pmbootstrap as a workaround. Install  on your host Linux distribution (usually in an   package that you can install with your distribution's package manager), then run the following commands. The special  is necessary, because   can't resolve the symlink on its own.

Copy the generated image to an SD card
Instead of sideloading, you can run  and copy the   file to an SD card. Insert it into your phone, boot into the recovery system, and select "Install". Then navigate to the zip file, and the postmarketOS installation should begin.