Back to Home

Mobian Firmware on OnePlus 6: Server from a Smartphone

The article describes installing Mobian on OnePlus 6 to create a compact server. Covers bootloader unlock, flashing via fastboot, Wi-Fi/SSH setup and benchmarks. Suitable for API hosting and microservices.

OnePlus 6 → Linux Server on Mobian in an Hour
Advertisement 728x90

OnePlus 6 as a Compact Mobian Server: Step-by-Step Flashing and Setup

The OnePlus 6 with its Snapdragon 845, 8 GB RAM, and 128 GB storage is perfect for home APIs and small projects. Flashing Mobian—a Debian variant for mobile devices—turns it into a full-fledged Linux server without the noise or bulk of a traditional PC. The process covers unlocking the bootloader, flashing boot and rootfs via fastboot, and setting up Wi-Fi and SSH. Benchmarks show solid mid-range performance.

Mobian leverages Android's vendor drivers for easy compatibility. Installation wipes all data, but the risk of bricking is low if you follow postmarketOS and Mobian wiki guides.

Device Preparation

Factory reset your phone. Ensure it's running the latest OxygenOS—Mobian relies on vendor partitions.

Google AdInline article slot
  • Enable developer mode: Tap Build Number 7 times in Settings.
  • Turn on OEM unlocking.
  • Power off, then hold Vol Up + Power to enter fastboot (screen shows 'fastboot', select green START with volume rocker).
  • Install Android SDK Platform-Tools on your host machine.
  • Connect via USB and run:
fastboot oem unlock

Confirm on-screen—the device will reset with an unlocked bootloader.

Download mobian-sdm845-phosh-13.0.tar.xz from images.mobian.org/qcom. Extract mobian-sdm845-phosh-20251002.boot-enchilada.img and mobian-sdm845-phosh-20251002.rootfs.img (enchilada = OnePlus 6 model).

Flashing Mobian

Enter fastboot (Vol Up + Power, START). Run this sequence:

Google AdInline article slot
fastboot --set-active=a
fastboot flash boot mobian-sdm845-phosh-20251002.boot-enchilada.img
fastboot erase userdata
fastboot -S 100M flash userdata mobian-sdm845-phosh-20251002.rootfs.img
fastboot erase dtbo
fastboot reboot
  • --set-active=a: Selects slot A (default).
  • flash boot: Replaces Android kernel with Mobian's.
  • erase userdata: Wipes Android data.
  • flash userdata -S 100M: Flashes rootfs in chunks (fastboot limit).
  • erase dtbo: Removes conflicting Device Tree overlays.
  • reboot: Boots up.

First boot decrypts the filesystem—up to 10 minutes. Login: mobian/1234. Change the password immediately.

Network and SSH Setup

Phosh interface is minimalist. Wi-Fi isn't in the quick menu by default:

sudo rfkill unblock all
nmcli radio wifi on
nmcli dev wifi list
sudo systemctl restart NetworkManager

Wi-Fi will appear in Settings. Connect to your network.

Google AdInline article slot

Disable suspend: Settings > Power > Automatic Suspend (off when plugged in).

Get your IP:

hostname -I

Output: 10.66.0.1 (USB tether), 192.168.x.x (Wi-Fi). Install SSH:

sudo apt update
sudo apt install -y openssh-server
sudo systemctl enable --now ssh

Test: ssh [email protected]. Set up keys:

ssh-keygen -t ed25519 -f ~/.ssh/mobian_oneplus6_ed25519 -C "mobian-oneplus6"
ssh-copy-id -i ~/.ssh/mobian_oneplus6_ed25519.pub [email protected]

Server Optimization

With SSH access, set up firewall (ufw), monitoring (htop, glances), and containers (podman). The Snapdragon 845 (4x Kryo 385 Gold @2.8GHz + 4x Silver @1.8GHz) handles Node.js APIs, Python scripts, and lightweight databases.

  • Add swap: fallocate -l 2G /swapfile; chmod 600 /swapfile; mkswap /swapfile; swapon /swapfile.
  • Auto-mount external USB storage to /mnt/data.
  • Clean logs: journalctl --vacuum-time=2weeks.

For headless mode, disable Phosh: sudo systemctl mask phosh.service.

Benchmarks and Performance

Test with sysbench, stress-ng:

  • CPU (sysbench cpu --threads=8): ~4500 events/s (matches older i5).
  • Memory (sysbench memory): 5-6 GB/s read/write.
  • I/O (fio randread): ~200 MB/s on eMMC.

Plenty for 5-10 concurrent API requests, ML inference (TensorFlow Lite), or home NAS.

Key Tips

  • Bootloader unlock is irreversible and wipes data.
  • Stick to stable phosh-13.0 image for sdm845.
  • Use SSH keys over the default 1234 password.
  • Disable suspend for 24/7 operation.
  • Watch thermals: Throttles above 80°C under load.

— Editorial Team

Advertisement 728x90

Read Next