OnePlus 6 (oneplus-enchilada)

From postmarketOS
Jump to navigation Jump to search
OnePlus 6
Running phosh!
Running phosh!
Manufacturer OnePlus
Name 6
Codename oneplus-enchilada
Released 2018
Category community
Original software Android 8.0 (Up to Android 11) on Linux 4.9
postmarketOS kernel 5.12.8
Hardware
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 AMOLED
Storage 64/128/256 GB
Memory 6/8 GB
Architecture aarch64
Unixbench Whet/Dhry score 6029.9
Features
USB Networking
Works
Flashing
Works
Touchscreen
Works
Display
Works
WiFi
Works
Xwayland
Works
FDE
Works
Mainline
Works
Battery
Partial
3D Acceleration
Works
Accelerometer
Broken
Audio
Partial
Bluetooth
Works
Camera
Broken
GPS
Broken
Mobile data
Broken
SMS
Broken
Calls
Broken
USB OTG
Partial
NFC


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, check the table on the right (or above on mobile) for the hardware support checklist.

How to enter flash mode

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

For the OnePlus 6T, hold Power and both Volume Up and Volume Down to get in Fastboot Mode.

Installing

For dual booting with Android, see "Dual booting" below.

Prebuilt images

Choose an image for your device from the download page.

Download the files ending in .img, you may also want to download the hashes for verification. On Windows you can use a tool like 7zip to decompress the files, on Linux use unxz. Then use fastboot to flash with the following:

fastboot erase dtbo
fastboot flash boot <date>-<time>-postmarketOS-edge-phosh-6-oneplus-[enchilada|fajita]-boot.img
fastboot flash userdata <date>-<time>-postmarketOS-edge-phosh-6-oneplus-[enchilada|fajita].img

For prebuilt images, the default username is user and the default password is 147147. It isn't possible to set up full disk encryption with prebuilt images yet.

Manual build

The vendor is OnePlus, the codename is "enchilada" for the OnePlus 6 and "fajita" for the OnePlus 6T.

Follow the general installation guide, return here when told to (at the "installation and flashing section").

phosh and plasma mobile only support numeric passwords currently, phosh is the most tested user interface

Now run the following, pick a password when prompted.

pmbootstrap install

Reboot back into flash mode (explained above) after each of the following commands (if you encounter weird behaviour like the command getting stuck before the flashing starts).

By default the rootfs will be flashed to system, this doesn't leave much free space for your applications / data, if you don't mind factory resetting the device you can instead flash to userdata by specifying the partition like below.

fastboot erase dtbo
pmbootstrap flasher flash_rootfs --partition userdata
pmbootstrap flasher flash_kernel

Reboot and you're good to go!

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.

Dual booting

It is possible to dual boot with Android when flashing postmarketOS to the system partition, although this severely limits the space available.

In fastboot mode run fastboot getvar current-slot to get the currently active slot (where Android is installed). For this example we'll use a as the slot with Android, if your current slot is b then simply switch "a" with "b" and vice versa. To install postmarketOS to the inactive slot, run

fastboot set_active b

before following the flashing steps above, as well as replacing userdata in the flashing commands with system so as to preserve your Android userdata partition.

You can now switch back to Android by entering fastboot mode and running

fastboot set_active a

Fastboot bugs

If you encounter "weird" errors from fastboot, such as "device does not support slots":

Once the device is in fastboot mode unplug it, then run the flasher commands above until you see the "<waiting for device message>", now choose "reboot bootloader" on the device and press the power button to select, reboot the device while it reboots.

Building

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 @caleb (or anyone) in the #postmarketos-mainline matrix channel if you're stuck.

Info

Partition map

oneplus-enchilada:~$ ls -lah /dev/disk/by-partlabel/

total 0      
drwxr-xr-x    2 root     root        2.0K Jan  7  1970 .
drwxr-xr-x    8 root     root         160 Jan  7  1970 ..
lrwxrwxrwx    1 root     root          10 Jan  7  1970 ALIGN_TO_128K_1 -> ../../sdd1
lrwxrwxrwx    1 root     root          10 Jan  7  1970 ALIGN_TO_128K_2 -> ../../sdf1
lrwxrwxrwx    1 root     root          11 Jan  7  1970 ImageFv -> ../../sde72
lrwxrwxrwx    1 root     root          11 Jan  7  1970 LOGO_a -> ../../sde20
lrwxrwxrwx    1 root     root          11 Jan  7  1970 LOGO_b -> ../../sde48
lrwxrwxrwx    1 root     root          10 Jan  7  1970 abl_a -> ../../sde8
lrwxrwxrwx    1 root     root          11 Jan  7  1970 abl_b -> ../../sde36
lrwxrwxrwx    1 root     root          10 Jan  7  1970 aop_a -> ../../sde1
lrwxrwxrwx    1 root     root          11 Jan  7  1970 aop_b -> ../../sde29
lrwxrwxrwx    1 root     root          11 Jan  7  1970 apdp -> ../../sde63
lrwxrwxrwx    1 root     root          10 Jan  7  1970 bluetooth_a -> ../../sde5
lrwxrwxrwx    1 root     root          11 Jan  7  1970 bluetooth_b -> ../../sde33
lrwxrwxrwx    1 root     root          11 Jan  7  1970 boot_a -> ../../sde11
lrwxrwxrwx    1 root     root          11 Jan  7  1970 boot_aging -> ../../sde58
lrwxrwxrwx    1 root     root          11 Jan  7  1970 boot_b -> ../../sde39
lrwxrwxrwx    1 root     root          10 Jan  7  1970 cdt -> ../../sdd2
lrwxrwxrwx    1 root     root          11 Jan  7  1970 cmnlib64_a -> ../../sde13
lrwxrwxrwx    1 root     root          11 Jan  7  1970 cmnlib64_b -> ../../sde41
lrwxrwxrwx    1 root     root          11 Jan  7  1970 cmnlib_a -> ../../sde12
lrwxrwxrwx    1 root     root          11 Jan  7  1970 cmnlib_b -> ../../sde40
lrwxrwxrwx    1 root     root          11 Jan  7  1970 config -> ../../sda12
lrwxrwxrwx    1 root     root          10 Jan  7  1970 ddr -> ../../sdd3
lrwxrwxrwx    1 root     root          11 Jan  7  1970 devcfg_a -> ../../sde14
lrwxrwxrwx    1 root     root          11 Jan  7  1970 devcfg_b -> ../../sde42
lrwxrwxrwx    1 root     root          11 Jan  7  1970 devinfo -> ../../sde61
lrwxrwxrwx    1 root     root          11 Jan  7  1970 dip -> ../../sde62
lrwxrwxrwx    1 root     root          10 Jan  7  1970 dsp_a -> ../../sde9
lrwxrwxrwx    1 root     root          11 Jan  7  1970 dsp_b -> ../../sde37
lrwxrwxrwx    1 root     root          11 Jan  7  1970 dtbo_a -> ../../sde18
lrwxrwxrwx    1 root     root          11 Jan  7  1970 dtbo_b -> ../../sde46
lrwxrwxrwx    1 root     root          10 Jan  7  1970 frp -> ../../sda6
lrwxrwxrwx    1 root     root          10 Jan  7  1970 fsc -> ../../sdf5
lrwxrwxrwx    1 root     root          10 Jan  7  1970 fsg -> ../../sdf4
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_4j1ed_a -> ../../sde21
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_4j1ed_b -> ../../sde49
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_4u1ea_a -> ../../sde22
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_4u1ea_b -> ../../sde50
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_ufs3_a -> ../../sde23
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_ufs3_b -> ../../sde51
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_ufs4_a -> ../../sde24
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_ufs4_b -> ../../sde52
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_ufs5_a -> ../../sde25
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_ufs5_b -> ../../sde53
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_ufs6_a -> ../../sde26
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_ufs6_b -> ../../sde54
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_ufs7_a -> ../../sde27
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_ufs7_b -> ../../sde55
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_ufs8_a -> ../../sde28
lrwxrwxrwx    1 root     root          11 Jan  7  1970 fw_ufs8_b -> ../../sde56
lrwxrwxrwx    1 root     root          10 Jan  7  1970 hyp_a -> ../../sde3
lrwxrwxrwx    1 root     root          11 Jan  7  1970 hyp_b -> ../../sde31
lrwxrwxrwx    1 root     root          11 Jan  7  1970 keymaster_a -> ../../sde10
lrwxrwxrwx    1 root     root          11 Jan  7  1970 keymaster_b -> ../../sde38
lrwxrwxrwx    1 root     root          10 Jan  7  1970 keystore -> ../../sda5
lrwxrwxrwx    1 root     root          11 Jan  7  1970 limits -> ../../sde67
lrwxrwxrwx    1 root     root          11 Jan  7  1970 logdump -> ../../sde71
lrwxrwxrwx    1 root     root          11 Jan  7  1970 logfs -> ../../sde69
lrwxrwxrwx    1 root     root          10 Jan  7  1970 mdtp_a -> ../../sde7
lrwxrwxrwx    1 root     root          11 Jan  7  1970 mdtp_b -> ../../sde35
lrwxrwxrwx    1 root     root          10 Jan  7  1970 mdtpsecapp_a -> ../../sde6
lrwxrwxrwx    1 root     root          11 Jan  7  1970 mdtpsecapp_b -> ../../sde34
lrwxrwxrwx    1 root     root          11 Jan  7  1970 minidump -> ../../sde57
lrwxrwxrwx    1 root     root          10 Jan  7  1970 misc -> ../../sda3
lrwxrwxrwx    1 root     root          10 Jan  7  1970 modem_a -> ../../sde4
lrwxrwxrwx    1 root     root          11 Jan  7  1970 modem_b -> ../../sde32
lrwxrwxrwx    1 root     root          10 Jan  7  1970 modemst1 -> ../../sdf2
lrwxrwxrwx    1 root     root          10 Jan  7  1970 modemst2 -> ../../sdf3
lrwxrwxrwx    1 root     root          11 Jan  7  1970 msadp -> ../../sde64
lrwxrwxrwx    1 root     root          11 Jan  7  1970 odm_a -> ../../sda15
lrwxrwxrwx    1 root     root          11 Jan  7  1970 odm_b -> ../../sda16
lrwxrwxrwx    1 root     root          10 Jan  7  1970 oem_dycnvbk -> ../../sda8
lrwxrwxrwx    1 root     root          10 Jan  7  1970 oem_stanvbk -> ../../sda9
lrwxrwxrwx    1 root     root          11 Jan  7  1970 op1 -> ../../sde59
lrwxrwxrwx    1 root     root          10 Jan  7  1970 op2 -> ../../sda7
lrwxrwxrwx    1 root     root          10 Jan  7  1970 param -> ../../sda4
lrwxrwxrwx    1 root     root          10 Jan  7  1970 persist -> ../../sda2
lrwxrwxrwx    1 root     root          11 Jan  7  1970 qupfw_a -> ../../sde15
lrwxrwxrwx    1 root     root          11 Jan  7  1970 qupfw_b -> ../../sde43
lrwxrwxrwx    1 root     root          11 Jan  7  1970 reserve1 -> ../../sda10
lrwxrwxrwx    1 root     root          11 Jan  7  1970 reserve2 -> ../../sda11
lrwxrwxrwx    1 root     root          11 Jan  7  1970 sec -> ../../sde60
lrwxrwxrwx    1 root     root          11 Jan  7  1970 splash -> ../../sde66
lrwxrwxrwx    1 root     root          11 Jan  7  1970 spunvm -> ../../sde65
lrwxrwxrwx    1 root     root          10 Jan  7  1970 ssd -> ../../sda1
lrwxrwxrwx    1 root     root          11 Jan  7  1970 sti -> ../../sde70
lrwxrwxrwx    1 root     root          11 Jan  7  1970 storsec_a -> ../../sde19
lrwxrwxrwx    1 root     root          11 Jan  7  1970 storsec_b -> ../../sde47
lrwxrwxrwx    1 root     root          11 Jan  7  1970 system_a -> ../../sda13
lrwxrwxrwx    1 root     root          11 Jan  7  1970 system_b -> ../../sda14
lrwxrwxrwx    1 root     root          11 Jan  7  1970 toolsfv -> ../../sde68
lrwxrwxrwx    1 root     root          10 Jan  7  1970 tz_a -> ../../sde2
lrwxrwxrwx    1 root     root          11 Jan  7  1970 tz_b -> ../../sde30
lrwxrwxrwx    1 root     root          11 Jan  7  1970 userdata -> ../../sda17
lrwxrwxrwx    1 root     root          11 Jan  7  1970 vbmeta_a -> ../../sde17
lrwxrwxrwx    1 root     root          11 Jan  7  1970 vbmeta_b -> ../../sde45
lrwxrwxrwx    1 root     root          11 Jan  7  1970 vendor_a -> ../../sde16
lrwxrwxrwx    1 root     root          11 Jan  7  1970 vendor_b -> ../../sde44
lrwxrwxrwx    1 root     root          10 Jan  7  1970 xbl_a -> ../../sdb1
lrwxrwxrwx    1 root     root          10 Jan  7  1970 xbl_b -> ../../sdc1
lrwxrwxrwx    1 root     root          10 Jan  7  1970 xbl_config_a -> ../../sdb2
lrwxrwxrwx    1 root     root          10 Jan  7  1970 xbl_config_b -> ../../sdc2

Bugs

Phosh scaling reset

There is an issue with the device-oneplus-enchilada-phosh subpackage being removed causing the phosh scaling to reset on upgrade / reboot. If this happens you can just run

sudo apk add device-oneplus-enchilada-phosh
sudo service tinydm restart

This will reinstall the package and restart phosh, scaling should be back to normal now.

This issue is being tracked here

Status

Bluetooth

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

TODO Is this fixed?

Audio

The speaker and headphone jack now both work in postmarketOS! Unfortunately we currently can't detect when something is attached to the headphone jack.

The earpiece speaker has been left disabled as it interfers with the headphone jack, we should be able to resolve this in the future (when call audio is possible).

Community Info

postmarketOS users that own the device

Maintainers

See also