Jump to content

OnePlus 10 Pro (oneplus-negroni)

From Nura Wiki
OnePlus 10 Pro
OnePlus 10 Pro running Arch Linux ARM
OnePlus 10 Pro running Arch Linux ARM
Manufacturer OnePlus
Name 10 Pro
Codename oneplus-negroni
Released 2022
Type handset
Hardware
Chipset Qualcomm Snapdragon 8 Gen 1 (SM8450)
CPU Octa-core (1x 3.00 GHz Cortex-X2
3x 2.50 GHz Cortex-A710
4x 1.80 GHz Cortex-A510)
GPU Adreno 730
Display 3216x1440 120Hz AMOLED
Storage 128/256/512 GiB
Memory 8/12 GiB
Architecture aarch64
Software
Original software
The software and version the device was shipped with.
Android 12 on Linux 5.10
Extended version
The most recent supported version from the manufacturer.
Android
Nura
Category testing
Mainline
Instead of a Linux kernel fork, it is possible to run (Close to) Mainline.
yes
pmOS kernel
The kernel version that runs on the device's port.
7.3-rc4
Features
Flashing
Whether it is possible to flash the device with pmbootstrap flasher.
Broken
USB Networking
After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system).
Works
Internal storage
eMMC, SD cards, UFS...
Works
Battery
Whether charging and battery level reporting work.
Works
Screen
Whether the display works; ideally with sleep mode and brightness control.
Works
Touchscreen
Works
Multimedia
3D Acceleration
Works
Audio
Audio playback, microphone, headset and buttons.
Broken
Camera
Broken
Camera Flash
Works
Connectivity
WiFi
Works
Bluetooth
Works
GPS
Broken
NFC
Near Field Communication
Untested
Modem
Calls
Partial
SMS
Works
Mobile data
Works
Miscellaneous
FDE
Full disk encryption and unlocking with unl0kr.
Untested
USB OTG
USB On-The-Go or USB-C Role switching.
Works
HDMI/DP
Video and audio output with HDMI or DisplayPort.
Works
Sensors
Accelerometer
Handles automatic screen rotation in many interfaces.
Works
Magnetometer
Sensor to measure the Earth's magnetism
Works
Ambient Light
Measures the light level; used for automatic screen dimming in many interfaces.
Broken
Proximity
Broken
Hall Effect
Measures magnetic fields; usually used as a flip cover sensor
Untested
Haptics
Works
Barometer
Sensor to measure air pressure
Untested


Contributors

  • Xlie

Users owning this device

  • Fluffydacat (Notes: 128GB mainline Chinese variant)
  • Xlie (Notes: OP10P, 256gb, mainline)

How to enter flash mode

Warning WARNING: Don't update to OOS/COS 15.0.0.1302! You will lose free EDL flashing!
1. Enable Developer Options: Settings -> About Phone -> Click on "Build number" 9 times
2. OEM unlocking: System -> Developer options -> Enable "OEM unlocking"
3. Unlock the bootloader: adb reboot bootloader -> fastboot logo should appear
4. Open terminal -> fastboot flashing unlock
  • If fastboot mode is unavailable (drops to system afteradb reboot bootloader)
  1. Log out of all your Google accounts
  2. Download the OxygenOS/ColorOS 12 local update image for your device:
  3. Go to local update
    • Enable Developer Options: Go to Settings > About device > Version and tap Build number 9 times.
    • Re-enter Settings: Go back to the main settings screen, then go to About device.Access Local Upgrade: Tap on the top tile (usually showing "OxygenOS" or "Up to date").
    • Tap the three dots or the gear icon in the top-right corner to reveal the Local update/Local install option.
    If local update option is not available, try to disable Internet and clear cache for OTA Update program.
    If it doesn't help or you don't have local install, try to install the OTA updater from here.
    If it says Installation failed, try to rollback to OxygenOS/ColorOS 14 and then rollback to OxygenOS/ColorOS 12.
  4. After the OxygenOS/ColorOS 12 rollback, go to Developer options and enable USB debugging and OEM unlocking.
  5. Connect your phone to PC and run
    $ adb reboot bootloader
    $ fastboot flashing unlock
    
  6. Submit unlocking on device
  7. Update to OxygenOS/ColorOS 14
  8. Flash this ABL via fastbootd.
  • Unlock the T-Mobile version

Installation

Downloading kernel source

git clone --branch 7.3-rc4 --single-branch https://github.com/Xlie-Electronic-Customs/linux.git
cd linux

Building the kernel

make O=output ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc) defconfig
make O=output ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc) sm8450.config
make O=output ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc)
make O=output ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_PATH=out-modules modules_install
cd ..

Building the rootfs image

curl -O 'https://ca.us.mirror.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz'

# create rootfs
truncate -s 5G root.img
mkfs.ext4 root.img -L root

# setup Arch Linux ARM root environment 
mkdir alarm
sudo tar -xzvf ArchLinuxARM-aarch64-latest.tar.gz -C alarm 
sudo pacman -Rc linux-aarch64 -r alarm
sudo cp linux/output/arch/arm64/boot/Image.gz alarm/boot/
sudo cp -r linux/output/out-modules/lib/modules/ alarm/usr/lib/
sudo rm alarm/etc/resolv.conf
sudo rm alarm/etc/mtab
sudo cp /etc/resolv.conf alarm/etc/resolv.conf
sudo cp /etc/mtab alarm/etc/mtab
sudo cp /etc/vconsole.conf alarm/etc/

# mount root.img and init prepare Arch Linux ARM environment
sudo mount root.img alarm/mnt
sudo chroot alarm

mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t devtmpfs devtmpfs /dev
pacman-key --init 
pacman-key --populate archlinuxarm

sed -i -E 's/^#?(ParallelDownloads *= *).*/\150/; s/^#?(DisableSandboxFilesystem)/\1/; s/^#?(DisableSandboxSyscalls)/\1/' /etc/pacman.conf
echo -e "\n[xec]\nSigLevel = Optional TrustAll\nServer = https://xlie-electronic-customs.github.io/xec-arch-repo/" | tee -a /etc/pacman.conf
pacman -Qq | grep linux-firmware | pacman -Rns - --noconfirm
pacman -Syu archinstall

# install packages in to root.img
pacstrap -i /mnt pacman archlinuxarm-keyring systemd-sysvcompat networkmanager msm-firmware-loader msm-modem-uim-selection linux-firmware-oplus-negroni rmtfs-oplus tqftpserv

# install plasma-mobile
pacstrap -i /mnt sddm plasma-mobile plasma-desktop bluedevil spacebar qmlkonsole plasma-dialer plasma-settings kscreen plasma-nm

systemctl --root=/mnt enable sddm

# or

# install gnome
pacstrap -i /mnt gdm gnome modemmanager

systemctl --root=/mnt enable gdm


# SSC is not supported curently
pacman -Rdd iio-sensor-proxy -r /mnt/


systemctl --root=/mnt enable NetworkManager
systemctl --root=/mnt enable ModemManager
systemctl --root=/mnt enable msm-modem-uim-selection
systemctl --root=/mnt enable bluetooth
systemctl --root=/mnt enable systemd-timesyncd
systemctl --root=/mnt enable msm-firmware-loader
systemctl --root=/mnt enable msm-firmware-loader-unpack
systemctl --root=/mnt enable rmtfs
systemctl --root=/mnt enable tqftpserv
useradd -R /mnt <your username> -m -p <user password>
passwd -R /mnt root
<root password>

# build initramfs
sed -i -E 's/^MODULES=\(([^)]*)\)/MODULES=(phy-qcom-qmp-ufs)/; s/\<(microcode|autodetect|kms)\>//g; s/  +/ /g' /etc/mkinitcpio.conf
mkinitcpio -k /boot/Image.gz -g /boot/initramfs-linux.img
exit

# put kernel modules in rootfs
sudo cp -r linux/output/out-modules/lib/modules/ alarm/mnt/lib/

# unmount root.img
sudo umount alarm/mnt

# get initramfs
sudo cp alarm/boot/initramfs-linux.img .
sudo chmod +rw initramfs-linux.img

Building vbmeta, boot, vendor_boot and root images

# build vbmeta with verification disable flag
avbtool make_vbmeta_image --output vbmeta.img --flags 2

# build vendor_boot with mainline DTB
mkbootimg --header_version 4 --vendor_boot vendor_boot.img --dtb linux/output/arch/arm64/boot/dts/qcom/sm8450-oneplus-negroni.dtb --pagesize 4096

# build boot with kernel, ramdisk and cmdline
mkbootimg --kernel linux/output/arch/arm64/boot/Image.gz --ramdisk initramfs-linux.img --header_version 4 --pagesize 4096 --os_version 12.0.0 --os_patch_level 2026-03-00 --cmdline "console=tty0 root=LABEL=root rootwait rw bootconfig" -o boot.img

# build recovery with ramdisk (without mainline recovery you can catch bootloop)
mkbootimg --ramdisk initramfs-linux.img --header_version 4 --pagesize 4096 --os_version 12.0.0 --os_patch_level 2026-03-00 -o recovery.img

# convert root into android sparse image
img2simg root.img sparse_root.img

Flashing

fastboot erase dtbo
fastboot flash vbmeta vbmeta.img
fastboot flash vendor_boot vendor_boot.img
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot erase userdata
fastboot flash userdata sparse_root.img

fastboot reboot

Additional info

Qbootctl

Warning WARNING: qbootctl WILL BRICK YOUR DEVICE on OOS/COS 15.0.0.1302 or higher, as it doesn't work from that version on. Downgrading doesn't help! EDL on this version is paid, so don't use qbootctl: https://github.com/linux-msm/qbootctl/issues/4

Android Verified Boot (vbmeta)

This device uses Android Verified Boot (AVB). To boot the mainline kernel, you may need to flash vbmeta partition with vbmeta.img with verification disabled flag.

Partitions vbmeta_vendor and vbmeta_system in android used by vbmeta partition but in linux they are unused

Boot mainline directly from ABL

The Android 12 bootloader only reads the DTB from the vendor_boot partition. The boot partition is used for kernel, ramdisk and cmdline. recovery partition just for ramdisk, it use kernel and cmdline from boot partition.

DTBO Partition

board-id exists in mainline DTB, so the DTBO partition can be erased.

Display

The brightness switch works well. Frequency switching between 60Hz, 90Hz and 120Hz works well too, but resolution switching between FHD (1080x2412) and WQHD (1440x3216) doesn't. These resolution modes have a different slice width and height, and mainline DRM driver only supports one slice width/height for the panel. Support for multiple slice width/heights will be added in the future. Currently, FHD mode is available in the panel driver, but you can manually set slice width 720 and slice height 24 and it will set WQHD mode.

Battery

Shows percentage and charges when the ADSP remote processor is up. Power Delivery 30W and Oplus SuperVOOC work well! Charging icon works correctly.

USB OTG

OTG Vbus works when the ADSP remote processor up! USB 2.0 has some issues after connecting charger and with OTG adapters (descriptor error). With USB hub it work`s well(tested on Ugreen CM888)! Power Delivery charging with USB hub works! But if you wan`t get works USB 2.0 first one hub must be connected to phone and get powered with usb otg vbus and only than connect external charger.

DP Alt Mode

DP Alt Mode works when the ADSP remote processor is up!

Wi-Fi

Wi-Fi still works well with a custom firmware build, 2.4G and 5G work well with high speed.

Wi-Fi firmware build guide

Wi-Fi firmware can be built from the bdwlang file to board-2.bin with the qca-swiss-army-knife utility.

board-2.json
[
    {
        "board": [
        {
            "data": "bdwlang.elf",
            "names": ["bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=0108,qmi-chip-id=18,qmi-board-id=255"]
            }
        ]
    }
]

Then get m3.bin, amss20.bin, regdb.bin from the modem_a/b partition (NON-HLOS.bin firmware file). Get bdwlang.elf file from odm.img firmware file

simg2img odm.img odm
mkdir o
mount odm o
cp odm/etc/wifi/bdwlang.* .

Here is description of the bdwlang files obtained from the cnss driver source code:

bdwlang.b0a # North America (T-Mobile version)
bdwlang.b0e # EU
bdwlang.b0c # China, India
bdwlang.elf # Global?

Put bdwlang.elf in the same directory as board-2.json. Then build:

python qca-swiss-army-knife/tools/scripts/ath11k/ath11k-bdencoder -c "board-2.json" -o board-2.bin

Then put the files

board-2.bin -> /lib/firmware/ath11k/WCN6855/hw2.1/
m3.bin -> /lib/firmware/ath11k/WCN6855/hw2.1/
amss20.bin -> /lib/firmware/ath11k/WCN6855/hw2.1/amss.bin
regdb.bin -> /lib/firmware/ath11k/WCN6855/hw2.1/

If you don't want to build the Wi-Fi firmware, just copy bdwlang.elf as board.bin into the firmware directory:

bdwlang.elf -> /lib/firmware/ath11k/WCN6855/hw2.1/board.bin

With the linux-firmware-atheros package, Wi-Fi works poorly. 2.4G works with low speed and 5G has a very low signal.

NFC

NFC support was added, but it hasn't been tested. The rfkill command shows that NFC is hardware and software unblocked.

Modem

IPA v5.1 driver support has been added.

rmtfs fork: https://github.com/Xlie-Electronic-Customs/rmtfs

Currently, cellular works on SIM slot 1.

Mobile data, calls (without audio), SMS, USSD work well!

GPS is don`t work.

Alert slider

Works partially. While changing position it calls the change position input event, but the slider position event doesn't work.

SSC

Works with hexagonrpc fork: https://github.com/ZXlieC/hexagonrpc

Currently works accelerometer, magnetometer and gyroscope. Barometer is untested because iio-sensor-proxy and ssccli don`t support it.

Pay attention on patch destination, to get works sensors oneplus 10 pro requires 2 extra locations:

odm/config/ /odm/etc/sensors/config

sensors/sns_reg_version /mnt/vendor/persist/sensors/registry/sns_reg_version

Later this hexagonrpc fork, sensor firmware package and support linking locations from persist partition to /usr/share/qcom in msm-firmware-loader will be added in xec-arch-repo.

Haptics

qcom-hv-haptics support been added in XEC mainline project. Haptics works with fftest and later will be added special haptics package in to xec-arch-repo to get haptics work in system.

See also