# 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](https://en.wikipedia.org/wiki/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](https://images.mobian.org/sdm845/weekly/) for OnePlus 6 device and [SDK Platform-Tools](https://developer.android.com/tools/releases/platform-tools) to use fastboot.
## Installation
Install latest pre-built images from [here](https://images.mobian.org/sdm845/weekly/). 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`

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

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

## Preparing the Device
<u><b>Enter into Flash Mode</b></u></br>
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.
<u><b>Unlock the Bootloader</b></u></br>
After entering into the flash mode and repluging the USB use this command to unlock the bootloader.
`fastboot oem unlock`

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 <b>mobian-sdm845-phosh-20231022.tar.xz</b>
`tar -xf mobian-sdm845-phosh-20231022.tar.xz`

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`

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

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

`fastboot erase dtbo`

<b>If all steps above succeeded, reboot your phone.</b>
## 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 <b>SDK Platform-Tools</b> from [here](https://developer.android.com/tools/releases/platform-tools)
and use `fastboot` from this SDK.

## 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.