Try   HackMD

Flash Mobian(Phosh Shell) on OnePlus 6 Device

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

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.

Installation

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.

Verify the Images

Use these commands serially to verify the downloads.

gpg --import mobian.gpg

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

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

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

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

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Preparing the Device

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

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

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.

Flashing the Image to the Target Device

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

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

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

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

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

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

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

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

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

fastboot erase dtbo

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

If all steps above succeeded, reboot your phone.

Troubleshooting

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.

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Default pin and password

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.