OnePlus 9 & 9 Pro (oneplus-lemonade & oneplus-lemonadep)

From postmarketOS
OnePlus 9 & 9 Pro
OnePlus 9 booting mainline with simple framebuffer.
OnePlus 9 booting mainline with simple framebuffer.
Manufacturer OnePlus
Name 9 & 9 Pro
Codename oneplus-lemonadep, oneplus-lemonade
Released 2021
Category testing
Pre-built images no
Original software Android
Original version 11 on Linux 5.4
Hardware
Chipset Qualcomm Snapdragon 888 (SM8350)
CPU Octa-core (1x2.84 GHz Kryo 680 & 3x2.42 GHz Kryo 680 & 4x1.80 GHz Kryo 680)
GPU Adreno 660
Display 1440x3216 120Hz AMOLED (9 pro), 1080x2400 120Hz AMOLED (9)
Storage 128/256 GiB
Memory 8/12 GiB
Architecture AArch64
Type handset
Unixbench Whet/Dhry score 8844.2
Features
USB Networking
Works
Flashing
Works
Touchscreen
Partial
Display
Partial
WiFi
Partial
FDE
Mainline
Works
Battery
Partial
3D Acceleration
Broken
Audio
Broken
Bluetooth
Works
Camera
Broken
GPS
Broken
Mobile data
Broken
Internal storage
SMS
Broken
Calls
Broken
USB OTG
Works
NFC
Broken
Sensors
Accelerometer
Broken
Magnetometer
Ambient Light
Proximity
Hall Effect
Barometer
Power Sensor
Misc
Built-in DVB
Camera Flash
Keyboard
Touchpad
USB-A
HDMI/DP
Ir TX
Ir RX
Stylus
Memory Card
Haptics
Ethernet
FOSS bootloader

Contributors

robbbbbb, aissa, paweier

Users owning this device


How to enter flash mode

TLDR:

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: Unplug and turnoff the device -> Hold volume up&down with power simultaneously -> fastboot logo should appear
4. Finally: open terminal -> fastboot oem unlock

Non-TLDR: Unlocking and rooting the phone

Installation

BACKUP YOUR DEVICE FIRST especially (but not limited to) the dtbo, super, and boot partitions (Backing partitions with ADB).

You can try pulling original super.img to restore to Android later:

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

Install and init pmbootstrap first (installation guide)

sudo apt install python3-pip
pip3 install pmbootstrap
pmbootstrap init


(Optional) Clone the downstream codebase, and rebase with master:

cd /path/to/your/pmaports (for example: /home/administrator/.local/var/pmbootstrap/cache_git/pmaports)
git remote add downstream https://gitlab.com/Robbbbbb/pmaports.git
git fetch downstream && git checkout oneplus-lemonade
git rebase master

(Optional) Update the checksums when the package is changed:

pmbootstrap checksum linux-oneplus-lemonade


Compile the kernel for aarch64 and flash rootfs to the super partition:

pmbootstrap build device-oneplus-lemonade
pmbootstrap install
pmbootstrap flasher flash_rootfs
pmbootstrap flasher flash_dtbo
pmbootstrap flasher flash_kernel
pmbootstrap flasher boot


SSH into the device (Full instructions):

ssh user@172.16.42.1

See also