Flash Mobian(Phosh Shell) on OnePlus 6 Device

Introduction

Mobian is an open source operating system for mobile devices. The idea behind this is to bring Debian GNU / Linux to your smartphone. PureOS, Fedora Mobility, postmarketOS, etc are some other operating systems apart from mobian for mobile devices. Phosh is the default shell for mobian.

In this blog post we will be focusing on flashing mobian with phosh shell on OnePlus 6 moble device…

let’s Start…

Before we begin, we need pre-built images for OnePlus 6 device and SDK Platform-Tools to use fastboot.

Install latest pre-built images from here. Example files are mobian-sdm845-phosh-20231022.tar.xz, mobian-sdm845-phosh-20231022.sha256sums, and mobian-sdm845-phosh-20231022.sha256sums.sig. Make sure to install all these files in same folders for simplicity.

Use these commands serially to verify the downloads.

gpg --import mobian.gpg

/FireFlyBlogs/mob1.png

gpg --verify mobian-sdm845-phosh-20231022.sha256sums.sig

/FireFlyBlogs/mob2.png

shasum -c mobian-sdm845-phosh-20231022.sha256sums

/FireFlyBlogs/mob3.png

Enter into Flash Mode

Before flashing, you have to enter into flash mode. To enter into flash mode unplug from USB and hold Power and Volume Up until you see a screen showing the word START and information about the device. After then replug the USB.

Unlock the Bootloader

After entering into the flash mode and repluging the USB use this command to unlock the bootloader.

fastboot oem unlock

/FireFlyBlogs/mob4.png

If you see < waiting for any device >, try running as sudo and restart your device into fastboot mode again by selecting “Restart Bootloader” on the device.

Extract the files from mobian-sdm845-phosh-20231022.tar.xz

tar -xf mobian-sdm845-phosh-20231022.tar.xz

/FireFlyBlogs/mob5.png

Once you have extracted those files from the tarball, run the following commands serially to install Mobian:

fastboot flash boot mobian-sdm845-phosh-20231022.boot-enchilada.img

/FireFlyBlogs/mob6.png

fastboot flash system mobian-sdm845-phosh-20231022.boot.img

/FireFlyBlogs/mob7.png

fastboot -S 100M flash userdata mobian-sdm845-phosh-20231022.rootfs.img

/FireFlyBlogs/mob8.png

fastboot erase dtbo

/FireFlyBlogs/mob9.png

If all steps above succeeded, reboot your phone.

If you get this error after running this command fastboot -S 100M flash userdata mobian-sdm845-phosh-20231022.rootfs.img then this might be the problem with fatboot. So install latest SDK Platform-Tools from here and use fastboot from this SDK.

/FireFlyBlogs/mob10.png

The default user is mobian and has the password 1234 . It is also used as PIN on the unlock screen. The root user is locked by default.