Jump to content

OnePlus 8 Pro (oneplus-instantnoodlep)

From postmarketOS Wiki
Revision as of 19:00, 22 November 2024 by Denvit (talk | contribs) (Explain that Wi-Fi is broken in v6.11, provide a temporary fix)
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 Android
Original version 10
postmarketOS
Category testing
Pre-built images no
Mainline yes
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
Partial
Screen
Partial
Touchscreen
Works
Multimedia
3D Acceleration
Broken
Audio
Broken
Camera
Broken
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
Works
GPS
Broken
NFC
Works
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
FDE
Broken
USB OTG
Broken
HDMI/DP
No data
Sensors
Accelerometer
Broken
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data


Contributors

  • Simplefluorine

Maintainer(s)

Users owning this device

  • Denvit (Notes: postmarketOS)
  • Lucia-selvlysende (Notes: Current main device, got it for Christmas 2024 (used, but a big upgrade from samsung-degaswifi).)
  • Simplefluorine (Notes: unlocked)


How to enter flash mode

Normally to fastboot: By pressing vol-, vol+, and power button.

When you are in initial boot stages however the above doesn't work, so try this: Poweroff vs EDL mode (I'm not sure which): Press vol-, vol+, and power button for about 10 sec Then to put in fastboot: Press vol- and power only

Prior / Dynamic Partitions Info

Before flashing anything:

Pull super in root adb shell

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

Android 10 launch, non-retro fit dynamic partitioning. See also PMOS wiki on this

Installation

Don't recommend use of downstream kernel unless you are debugging something. Choose mainline during ```pmbootstrap init```.

pmbootstrap install
pmbootstrap flasher flash_dtbo
pmbootstrap flasher flash_rootfs
pmbootstrap flasher flash_kernel

Back to Android

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

Flash Android as usual now

Partition layout

OnePlus8Pro:~$ ls -al /dev/block/bootdevice/by-name/

Known Issues

On sm8250-linux v6.11 the Wi-Fi and Bluetooth functionality 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:


Step 1

Clone the patched kernel and compile the dts:

$ git clone --depth 1 -b fix/instantnoodlep-wifi https://gitlab.com/denvit/sm8250-linux/
$ cd sm8250-linux
$ make dtbs -j $(nproc)

Step 2

Extract the original boot.img ($PMOS_ROOT/chroot_rootfs_oneplus-instantnoodlep/boot/boot.img) as follows:

$ mkdir /tmp/firmware
$ cd /tmp/firmware
$ unpack_bootimg --boot_img $PMOS_ROOT/chroot_rootfs_oneplus-instantnoodlep/boot/boot.img --format=mkbootimg

Step 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

Step 4

Put your device in fastboot mode, then flash the image and reboot:

fastboot flash boot boot-repacked.img && fastboot reboot

Step 5

Verify that the chip is now working again:

instantnoodlep$ 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