meta data for this page
Table of Contents
Installing Mobian (Android devices)
This guide covers installing Mobian on the OnePlus 6/6T and Pocophone F1. See the devices page for the full list of supported devices.
Obtain the Image
We recommend downloading pre-built images for installation. The image files for your device will be packed in a file named
mobian-<device>-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-<device>-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.
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 the downloaded tarball will contain:
- an Android bootimg containing the kernel, device-tree and initramfs named
- an F2FS-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.
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-<device>-phosh-YYYYMMDD.boot-<variant>.img fastboot -S 100M flash userdata mobian-<device>-phosh-YYYYMMDD.root.img fastboot erase dtbo
- 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:
- The installation to internal memory might be broken. This seems to be the case for the Pocophone F1 for versions between 2022-02 and 2022-04-24 (as of 2022-04-25).
- The UFS implementation might be broken for your combination of kernel and device and lead to some or many IO errors.
- You want to swap an installation between devices.
Before proceeding you must have installed the same version to the internal memory, as described above, but flashing the root.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-<device>-phosh-YYYYMMDD.root.img mobian-<device>-phosh-YYYYMMDD.root.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-<device>-phosh-YYYYMMDD.root.raw of=/dev/sdN1 bs=1M status=progress
- Move the SD card from the PC to the phone.
- Start the phone.