OnePlus 6 (oneplus-enchilada)

From postmarketOS
Revision as of 03:03, 28 February 2021 by Kalube (talk | contribs)
Jump to navigation Jump to search
OnePlus 6/6T
Running phosh!
Running phosh!
Manufacturer OnePlus
Name 6/6T
Codename oneplus-enchilada, oneplus-fajita
Released 2018
Category testing
Original software Android 8.0 (Up to Android 10) on Linux 4.9
postmarketOS kernel 5.11
Chipset Qualcomm SDM845 Snapdragon 845
CPU Octa-core (4x 2.8 GHz Kryo 385 Gold & 4x 1.7 GHz Kryo 385 Silver)
GPU Adreno 630
Display 1080 x 2280 / 1080 x 2340 AMOLED
Storage 64/128/256 GB
Memory 6/8 GB
Architecture aarch64
Unixbench Whet/Dhry score 4100
USB Networking
3D Acceleration
Mobile data

This page documents the status of mainline Linux on the OnePlus 6!

The OnePlus 6 is an incredibly powerful and efficient mobile device, well regarded and (bar the notch) an excellent portable work horse, getting mainline Linux working means not only freedom from proprietary software, and security updates at OnePlus' discretion, but also the ability to boot any mobile or desktop distro as long as the required software is packaged.

The phone is currently capable of booting modern Linux with only a few patches, see the kernel here and check the table on the right (or above) for the hardware support checklist.


The easy method

I've built a pretty simple flashable installer, making the installation method identical to that of any other Android ROM. It's also possible to dual boot as the device has 2 slots, or 2 copies of all the important partitions. For more details check out the installer here.

The manual method

pmbootstrap init

pick enchilada / fajita device depending on your taste :D

Most UIs work well, phosh is quite good, plasma mobile does seems to be more buggy. For phosh set scale=3 in /usr/share/phosh/phoc.ini under DSI-1 to fix scaling.

Now run the following to build and flash:

pmbootstrap install --split
pmbootstrap export

Reboot back into bootloader mode after each of the following commands, replacing enchilada with fajita where appropriate.

fastboot erase dtbo
fastboot flash vendor /tmp/postmarketOS-export/oneplus-enchilada-boot.img
fastboot flash system /tmp/postmarketOS-export/oneplus-enchilada-root.img
fastboot flash boot /tmp/postmarketOS-export/boot.img-oneplus-sdm845

Reboot and you should see dmesg on your screen :D

If you have flashing or booting issues, try first flashing the latest OxygenOS to the slot you want to install postmarketOS to (ie, flash in TWRP from your other slot). If you still have no luck, try flashing OOS 9 as the bootloader can be more forgiving.

It is possible to dual boot with android by following the guide above and using:

fastboot --set-active=[a|b]

to switch to your inactive slot before flashing.

The fastboot implementation on OnePlus devices seems to behave poorly on 300 series Ryzen motherboards. If fastboot is reporting weird errors (e.g. "This device does not support slots") then try choosing "reboot bootloader" on the device and running the command whilst the device is rebooting, such that fastboot has to wait for the device to appear.


A small number of users have reported their device being stuck on the bootloader unlocked screen after installing, follow the debugging steps below if that happens to you

The first and simplest debugging step is to see if the kernel is booting, this can be done by checking for a gadget mode device appearing in dmesg on your host, you can do this by putting the phone in fastboot mode and then running dmesg -w in a terminal, opening another and running:

fastboot boot /tmp/postmarketOS-export/boot.img-oneplus-sdm845

The terminal running dmesg -w should see output similar to the following:

[79239.786757] usb 1-3: new high-speed USB device number 10 using xhci_hcd
[79240.031271] usb 1-3: New USB device found, idVendor=18d1, idProduct=d00d, bcdDevice= 1.00
[79240.031274] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[79240.031275] usb 1-3: Product: Android
[79240.031276] usb 1-3: Manufacturer: Google
[79240.031277] usb 1-3: SerialNumber: 5725c671
[79304.089875] usb 1-3: USB disconnect, device number 10
[79309.428896] usb 1-3: new high-speed USB device number 11 using xhci_hcd
[79309.684225] usb 1-3: New USB device found, idVendor=0525, idProduct=a4a2, bcdDevice= 5.08
[79309.684227] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[79309.684229] usb 1-3: Product: RNDIS/Ethernet Gadget
[79309.684230] usb 1-3: Manufacturer: Linux 5.8.0-rc6-oneplus-sdm845 with dwc3-gadget

Note the first device up until USB disconnect is the phone appearing in fastboot mode, followed by it booting into the kernel.

If you don't see a USB disconnect line, make sure you have run fastboot erase dtbo. If you do but it is not followed by a new device appearing, try flashing a different version of OxygenOS to the slot you're on (ie by switching slots and then flashing the OTA from TWRP), OOS 9 can behave better. If you still have issues and have tried reflashing multiple times, feel free to contact @kalube in the #mainline:postmarketos matrix channel.


Feel like helping? Want to learn kernel development?

Check out the mainlining guide

For detailed SDM845 specific instructions on initial device porting and building. Feel free to contact @kalube (or anyone) in the #postmarketos-mainline matrix channel if you're stuck.

How to enter flash mode

Unplug from USB, hold Power and Volume Up until you see "Fastboot Mode" text.



There seems to be a race condition with dbus, running sudo service bluetooth restart will fix bluetooth (until the next reboot).


The headphone jack and earpiece speaker both work, and are in the process of being packaged up for postmarketOS. The speaker requires a separate driver and some more complicated configuration, it is currently a work in progress.

Community Info

postmarketOS users that own the device


See also