Linux mobile distro, such as postmarketOS, has more devices supported and more freedom. Instead of dual booting Windows and Android, why not dual boot Linux mobile distros and Android? This could be done on more Android devices.
There are many ways for dual booting Linux mobile distros and Android. For Xiaomi Pocohpne F1 here we have a stupid method: partition the internal storage and install Android and Mobain (Linux mobile distro) on it. Every time we want to boot to another OS, we just flash boot.img via TWRP.
This idea comes from “dual booting Windows 11 ARM and Android”. Renegade Project makes booting Windows 11 ARM possible on Snapdragon 845 phones. And we must partition the internal storage in order to boot Windows.
Now we could use the tools provided by Renegade Project to dual boot Mobian and Android. Or even more? Multi-booting Ubuntu touch + postmarketOS + Mobian + Arch Linux ARM + Windows + Andorid ! Just make sure you have eonugh spaces left on device.
1. Install TWRP
Install Fastboot tool on your PC.
Boot into fastboot mode. Connect the phone to your PC. Download TWRP for beryllium and flash it:
2. Partitioning the internal storage
Install ADB tools on your PC.
Download GNU parted from Renegade Project.
Connect the phone to your pc.
Boot into TWRP. Send parted to the phone and correct permissions:
- Start partitioning the internal storage:
- Reboot to TWRP again. Create file systems for Android and Mobian:
Now we could start installing Android and Mobian.
3. Install OS to the phone
Download LineageOS builds from the official website
ADB Sideloadin TWRP. Flash Android ROM. Dont’t forget to preserve
boot.imgfrom Lineage OS ROM archive.
Download Mobian weekly builds
Boot into fastboot mode. Flash the boot.img:
- Flash the rootfs to
mobianpartition. Also remember to preserve boot.img from Mobian archive.
4. Steps for dual-booting
Boot into TWRP. Save
boot.img of Mobian and
boot.img of Android to Android’s internal storage (/sdcard1) because TWRP could only mount Android partitions.
Note there are some decryption issues on Android 12+ TWRP, so you could also save boot.img to external sdcard, or flash it via fastboot.
When we want to boot into Android, click
Install in TWRP and click
Install images, flash Android’s boot.img to boot partition in TWRP and reboot. The steps are the same for Mobian.
Finally, you will need to backup boot.img again after upgrading Android or Mobian systems.
5. Final words
Why is this stupid? Because Renegade project developers are developing a boot menu for dual booting Android and Windows 11. Sadly it may not work for Linux mobile distros.
What’s more, I would like to replace Android with Ubuntu touch because most things (including camera) work on it, also Waydroid is available on UT. It could be used as a daily driver. However, Mobian and postmarketOS is much like “the real mobile Linux” in compred to locked-down UT.