Jump to content

OnePlus 8 Pro (oneplus-instantnoodlep)

From postmarketOS Wiki
OnePlus 8 Pro
.
.
Manufacturer OnePlus
Name 8 Pro
Codename oneplus-instantnoodlep
Released 2020
Type handset
Hardware
Chipset Qualcomm Snapdragon 865 5G (SM8250)
CPU Octa-core (1x2.84 GHz Cortex-A77
3x2.42 GHz Cortex-A77
4x1.80 GHz Cortex-A55)
GPU Adreno 650
Display 1440 x 3168 pixels (~513 ppi density)
Storage 128 or 256 GB
Memory 8 GB or 12 GB
Architecture aarch64
Software
Original software
The software and version the device was shipped with.
Android 10
Extended version
The most recent supported version from the manufacturer.
Android
postmarketOS
Category testing
Mainline
Instead of a Linux kernel fork, it is possible to run (Close to) Mainline.
yes
Device package device-oneplus-instantnoodlep
Kernel package linux-postmarketos-qcom-sm8250
Features
Flashing
Whether it is possible to flash the device with pmbootstrap flasher.
Works
USB Networking
After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system).
Works
Battery
Whether charging and battery level reporting work.
Works
Screen
Whether the display works; ideally with sleep mode and brightness control.
Partial
Touchscreen
Works
Multimedia
3D Acceleration
Broken
Audio
Audio playback, microphone, headset and buttons.
Broken
Camera
Broken
Connectivity
WiFi
Works
Bluetooth
Works
GPS
Broken
NFC
Near Field Communication
Works
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
FDE
Full disk encryption and unlocking with unl0kr.
Broken
USB OTG
USB On-The-Go or USB-C Role switching.
Partial
Sensors
Accelerometer
Handles automatic screen rotation in many interfaces.
Broken

Contributors

Maintainer(s)

Users owning this device

How to enter flash mode

To enter fastboot, press Volume Up+Volume Down+Power. In initial boot stages, this doesn't work: in Poweroff/EDL mode, it must be pressed for about ten seconds, then enter fastboot only with Volume Down and Power.

Installation

Prerequisites

To make OTG and Wi-Fi work, specify these additional packages: linux-firmware-ath11k,firmware-oneplus-instantnoodlep,linux-firmware-qcom. Note that OTG only works with a USB hub that has external power.

Before flashing anything, pull the super partition from a root adb shell. This is important if you want to return to Android:

$ adb root
$ adb pull /dev/block/by-name/super super.img

Installation guide

Using the downstream kernel is discouraged. Choose mainline during pmbootstrap init.

$ pmbootstrap install
$ pmbootstrap flasher flash_dtbo
$ pmbootstrap flasher flash_rootfs
$ pmbootstrap flasher flash_kernel

Uninstalling

To return to Android, convert the stock super partition to a sparse image and flash it with fastboot:

$ img2simg super.img super-s.img
$ fastboot flash super super-s.img

USB

The device runs perfectly fine on the newer mainline kernel (e.g., 7.1.0), but there are a few hardware quirks related to USB-C hubs, Power Delivery, and external networking.

Ethernet adapters

When using a USB-C Hub with an Ethernet port, Realtek network chips work out of the box and provide a stable connection. However, hubs utilizing the ASIX AX88179B chip (commonly found in newer UGREEN hubs) do not function properly under the current kernel configuration and should be avoided.

USB 3.0 and plug orientation

Due to missing Type-C multiplexer (MUX) endpoints in the sm8250 device tree, the hardware cannot programmatically switch the SuperSpeed pins if the cable is plugged in upside down. As a result, USB 3.0 (5Gbps) will only work if the USB-C plug is inserted in a specific orientation. If inserted upside down, the port will fallback to USB 2.0 (480Mbps).

To check the current orientation, run:

cat /sys/class/typec/port0/orientation
  • If the output is reverse, your hub is restricted to USB 2.0 speeds. Unplug the cable, rotate it 180 degrees, and plug it back in.
  • If the output is normal, USB 3.0 is active. You can verify this by running lsusb -t and looking for 5000M at the end of the hub's tree branch.

Power Delivery

If you reboot the device while a USB-C Hub is connected and externally powered via a PD (Power Delivery) charger, the PMIC controller might retain voltage on the CC pin. This causes the orientation detection to get stuck or fail (reporting reverse or falling back to USB 2.0) even if the plug is mechanically in the normal position.

To fix this:

  1. Unplug the PD charger from the hub (killing power entirely).
  2. Unplug the hub from the phone.
  3. Wait 10 seconds for the capacitors to discharge.
  4. Plug the hub back into the phone "dry" (without the charger).
  5. Check /sys/class/typec/port0/orientation to ensure it says normal.
  6. Reconnect the PD charger to the hub.

Partition layout

$ ls -al /dev/block/bootdevice/by-name/

lrwxrwxrwx 1 root root   15 1970-02-03 17:53 ALIGN_TO_128K_1 -> /dev/block/sdd1
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 ALIGN_TO_128K_2 -> /dev/block/sdf1
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 abl_a -> /dev/block/sde8
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 abl_b -> /dev/block/sde32
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 abl_log -> /dev/block/sde67
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 aging_kernel -> /dev/block/sde64
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 aging_mod -> /dev/block/sde65
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 android_log -> /dev/block/sde69
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 aop_a -> /dev/block/sde1
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 aop_b -> /dev/block/sde25
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 apdp -> /dev/block/sde51
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 bluetooth_a -> /dev/block/sde5
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 bluetooth_b -> /dev/block/sde29
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 boot_a -> /dev/block/sde11
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 boot_b -> /dev/block/sde35
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 cdt -> /dev/block/sdd2
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 cmnlib64_a -> /dev/block/sde13
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 cmnlib64_b -> /dev/block/sde37
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 cmnlib_a -> /dev/block/sde12
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 cmnlib_b -> /dev/block/sde36
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 config -> /dev/block/sda11
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 ddr -> /dev/block/sdd3
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 devcfg_a -> /dev/block/sde14
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 devcfg_b -> /dev/block/sde38
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 devinfo -> /dev/block/sde49
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 dip -> /dev/block/sde50
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 dsp_a -> /dev/block/sde9
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 dsp_b -> /dev/block/sde33
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 dtbo_a -> /dev/block/sde17
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 dtbo_b -> /dev/block/sde41
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 featenabler_a -> /dev/block/sde22
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 featenabler_b -> /dev/block/sde46
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 frp -> /dev/block/sda5
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 fsc -> /dev/block/sdf5
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 fsg -> /dev/block/sdf4
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 hyp_a -> /dev/block/sde3
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 hyp_b -> /dev/block/sde27
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 hyp_log -> /dev/block/sde71
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 imagefv_a -> /dev/block/sde23
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 imagefv_b -> /dev/block/sde47
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 kernel_log -> /dev/block/sde68
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 keymaster_a -> /dev/block/sde10
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 keymaster_b -> /dev/block/sde34
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 keystore -> /dev/block/sda4
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 limits -> /dev/block/sde54
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 limits-cdsp -> /dev/block/sde55
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 logdump -> /dev/block/sde57
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 logfs -> /dev/block/sde56
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 logo_a -> /dev/block/sde24
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 logo_b -> /dev/block/sde48
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 mdm1m9kefs1 -> /dev/block/sdf7
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 mdm1m9kefs2 -> /dev/block/sdf8
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 mdm1m9kefs3 -> /dev/block/sdf6
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 mdm1m9kefsc -> /dev/block/sdf9
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 mdm1oemnvbktmp -> /dev/block/sde63
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 mdm_oem_dycnvbk -> /dev/block/sda7
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 mdm_oem_stanvbk -> /dev/block/sda8
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 mdmddr -> /dev/block/sdd4
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 mdtp_a -> /dev/block/sde7
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 mdtp_b -> /dev/block/sde31
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 mdtpsecapp_a -> /dev/block/sde6
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 mdtpsecapp_b -> /dev/block/sde30
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 metadata -> /dev/block/sda19
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 misc -> /dev/block/sda3
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 modem_a -> /dev/block/sde4
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 modem_b -> /dev/block/sde28
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 modemdump -> /dev/block/sda9
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 modemst1 -> /dev/block/sdf2
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 modemst2 -> /dev/block/sdf3
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 msadp -> /dev/block/sde52
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 multiimgoem_a -> /dev/block/sde19
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 multiimgoem_b -> /dev/block/sde43
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 multiimgqti_a -> /dev/block/sde20
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 multiimgqti_b -> /dev/block/sde44
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 op1 -> /dev/block/sde66
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 op2 -> /dev/block/sda10
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 opproduct_a -> /dev/block/sda12
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 opproduct_b -> /dev/block/sda13
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 param -> /dev/block/sda6
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 persist -> /dev/block/sda2
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 qsee_log -> /dev/block/sde70
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 qupfw_a -> /dev/block/sde15
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 qupfw_b -> /dev/block/sde39
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 rawdump -> /dev/block/sda22
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 recovery_a -> /dev/block/sda15
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 recovery_b -> /dev/block/sda16
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 reserve1 -> /dev/block/sde72
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 reserve2 -> /dev/block/sde73
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 reserve3 -> /dev/block/sde74
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 reserve4 -> /dev/block/sde75
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 secdata -> /dev/block/sde60
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 spunvm -> /dev/block/sde53
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 ssd -> /dev/block/sda1
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 storsec_a -> /dev/block/sde58
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 storsec_b -> /dev/block/sde76
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 super -> /dev/block/sda14
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 tz_a -> /dev/block/sde2
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 tz_b -> /dev/block/sde26
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 uefisecapp_a -> /dev/block/sde18
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 uefisecapp_b -> /dev/block/sde42
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 uefivarstore -> /dev/block/sde59
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 userdata -> /dev/block/sda23
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 vbmeta_a -> /dev/block/sde16
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 vbmeta_b -> /dev/block/sde40
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 vbmeta_system_a -> /dev/block/sda17
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 vbmeta_system_b -> /dev/block/sda18
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 vm-data -> /dev/block/sde62
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 vm-keystore -> /dev/block/sde61
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 vm-linux_a -> /dev/block/sde21
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 vm-linux_b -> /dev/block/sde45
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 vm-system_a -> /dev/block/sda20
lrwxrwxrwx 1 root root   16 1970-02-03 17:53 vm-system_b -> /dev/block/sda21
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 xbl_a -> /dev/block/sdb1
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 xbl_b -> /dev/block/sdc1
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 xbl_config_a -> /dev/block/sdb2
lrwxrwxrwx 1 root root   15 1970-02-03 17:53 xbl_config_b -> /dev/block/sdc2

Known issues

Wi-Fi/BT not working on v6.11

On sm8250-linux v6.11, Wi-Fi and Bluetooth are broken. This is due to an issue with the DTS of this device. A MR has been opened and will be merged soon: in the meantime, you can edit your boot.img as follows:

  1. Clone the patched kernel and compile the dts:
    $ git clone --depth 1 -b sm8250/v6.12 https://gitlab.com/denvit/sm8250-linux/
    $ cd sm8250-linux
    $ make dtbs -j $(nproc)
    
  2. Extract the original boot.img:
    $ mkdir /tmp/firmware
    $ cd /tmp/firmware
    $ unpack_bootimg --boot_img $PMOS_ROOT/chroot_rootfs_oneplus-instantnoodlep/boot/boot.img --format=mkbootimg
    
  3. Copy the newly compiled dtb and re-pack the image:
    $ cp ~/git/sm8250-linux/arch/arm64/boot/dts/qcom/sm8250-oneplus-instantnoodlep.dtb /tmp/firmware/out/dtb
    $ mkbootimg --header_version 2 --kernel out/kernel --ramdisk out/ramdisk --dtb out/dtb --pagesize 0x00001000 --base 0x00000000 --kernel_offset 0x00008000 --ramdisk_offset 0x01000000 --second_offset 0x00000000 --tags_offset 0x00000100 --dtb_offset 0x0000000001f00000 --board '' --cmdline 'clk_ignore_unused pd_ignore_unused  pmos_boot_uuid=d86a5f31-2802-4333-b5aa-ff8a59e4d66e pmos_root_uuid=efbc85d5-1ba9-45ff-af90-1eecd5235327 pmos_rootfsopts=defaults' -o boot-repacked.img
    
  4. In fastboot mode, flash the image and reboot:
    $ fastboot flash boot boot-repacked.img && fastboot reboot
    
  5. Verify that the chip is now working again:
    $ ip link show wlan0
    4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
        link/ether 00:ca:fe:ba:be:00 brd ff:ff:ff:ff:ff:ff
    

See also