meta data for this page
Table of Contents
Installing Mobian (Android devices)
This guide covers installing Mobian on all supported Android phones. See the devices page for the full list of supported devices.
Obtain the Image
We recommend downloading pre-built images for installation. They are released weekly, normally on Sundays. The image files for your device will be packed in a file named
mobian-<processor>-phosh-YYYYMMDD.tar.gz and can be found here:
Building from Debos Recipes
You can build the image yourself using the debos recipes. If you build the image yourself, the produced image file will be not be zipped (i.e. named
mobian-<processor>-phosh-YYYYMMDD.*.img) and there is no need to unzip the archive.
Preparing the Device
As you would do before installing a custom Android ROM, the bootloader needs to be unlocked. The exact procedure varies depending on the device you own, so we suggest you search the Internet for an unlock guide aimed at your specific device.
We also recommend that you upgrade Android to the latest available version and install all system updates before installing Mobian.
See postmarketOS' installation guide for unlocking bootloader of OnePlus 6 or OnePlus 6T
Flashing the Image to the Target Device
WARNING: Flashing Mobian to your device will wipe your Android installation! Please install a recovery software such as TWRP and make sure you understand how to recover your system before proceeding.
Those devices being Android smartphones in the first place, they have secure boot enabled, meaning we can't replace their bootloader and need to rely on Android tools in order to flash Mobian.
In practice, this means we can't flash a single image file, and the downloaded tarball will contain:
- an Android bootimg containing the kernel, device-tree and initramfs named
- an image for the system partition (new since 2023) named
- an Ext4-formatted rootfs (using Android's sparse image format) named
As these devices have several variants, which differ only by the device-tree they need, and the DT being part of the bootimg, we provide one bootimg for each variant. You have to flash the one matching your device:
- OnePlus 6:
- OnePlus 6T:
- Pocophone F1: use the
beryllium-tianmavariant first; if the touchscreen doesn't react to swipes, then switch to the
beryllium-ebbgvariant. If you know your display variant, you can pick this directly.
- SHIFT 6mq:
- Xiaomi Mi Mix 2S:
- Fairphone 4:
Once you have extracted those files from the tarball, boot your device into Fastboot mode, connect it to your computer using a USB cable and run the following commands to install Mobian:
fastboot flash boot mobian-<processor>-phosh-YYYYMMDD.boot-<model>.img fastboot flash system mobian-<processor>-phosh-YYYYMMDD.boot.img fastboot -S 100M flash userdata mobian-<processor>-phosh-YYYYMMDD.rootfs.img fastboot erase dtbo
If all steps above succeeded, reboot your phone.
- For the Fairphone 4, it is not possible to flash the boot partition to
fastboot flash rawdump …instead of
fastboot flash system …
- If the device becomes unresponsive after a fastboot command succeeded, power it off and boot into fastboot mode again, then execute the remaining commands.
- The OnePlus 6/6T has an A/B partition scheme. In order to select which slot you want to flash Mobian to, you can run the following command before any other fastboot command:
Installing to an SD Card
The installation above is to the internal memory (UFS). There can be many reasons why you want to install to an SD card (if you have a Pocophone F1):
- You want to swap an installation between different phones.
- The installation to internal memory might be broken. This was the case for the Pocophone F1 in the past.
- For old versions: The UFS implementation might be broken for your combination of kernel and device and lead to IO errors.
Before proceeding you must have installed the same version to the internal memory, as described above, but flashing the rootfs.img should be left out (can lead to confusion with the root image that will be installed to the SD card). The steps for installing to an SD card (recommended at least 16 GB):
- On a PC, add a partition number 1 with filesystem ext4 to your SD card.
- Convert the root image from sparse to non-sparse format:
simg2img mobian-<processor>-phosh-YYYYMMDD.rootfs.img mobian-<processor>-phosh-YYYYMMDD.rootfs.raw
- Write the .raw file to partition 1, determine which letter you should use as N in sdN1 to access the mentioned SD card:
sudo dd if=mobian-<processor>-phosh-YYYYMMDD.rootfs.raw of=/dev/sdN1 bs=1M status=progress
- Move the SD card from the PC to the phone.
- Start the phone.