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

From postmarketOS Wiki
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
Type handset
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
Software
Original software Android
Original version 11 on Linux 5.4
postmarketOS
Category testing
Pre-built images no
Mainline yes
Unixbench Whet/Dhry score 8844.2
Features
Flashing
Works
USB Networking
Works
Internal storage
SD card
Battery
Partial
Screen
Partial
Touchscreen
Partial
Multimedia
3D Acceleration
Broken
Audio
Broken
Camera
Broken
Camera Flash
Connectivity
WiFi
Partial
Bluetooth
Works
GPS
Broken
NFC
Broken
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
FDE
USB OTG
Works
HDMI/DP
Sensors
Accelerometer
Broken
Magnetometer
Ambient Light
Proximity
Hall Effect
Haptics
Barometer

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

  • Initial merge request:

pmaports!2459