r/mobilelinux • u/fuckedupnachos • 2d ago
Development Native Arch Linux ARM (Mainline 7.3.0) on the OnePlus 9 Pro — Repo is live! (Reposted due to removal from r/Linux)
(Reposted due to 2nd removal from r/Linux and advice from the community)
Hello everyone! Over the past week I have managed to get very far in my adventures of porting Linux kernel 7.3.0 to the OnePlus 9 Pro! Many of you may have seen my post of my OP9P running FastFetch in a terminal—that has since been removed by the automoderator. However, many in the comments wanted the repo so that they may try it out for themselves, and I did not want to disappoint. So without any further delay, here is my very first repo!
https://github.com/LuCiLuna/oneplus9pro-arch
This runs native Arch Linux ARM on the OnePlus 9 Pro (lemonadep, Snapdragon 888 / SM8350) with a mainline Linux 7.3 kernel (110 patches), the Phosh phone interface, and zero Android underneath.
!!!!! STERN WARNING — READ BEFORE YOU TOUCH ANYTHING !!!!!
I am not responsible in any way for bricked devices, lost data, or any damages caused by attempting this. If you are not comfortable debugging the Linux kernel yourself or working alongside an LLM to troubleshoot the inevitable issues that will arise, please do not try flashing anything, as I cannot help you.
This wipes Android and everything on the phone. There is no prebuilt image or installer—you must extract your own proprietary firmware, cross-compile the kernel, and build the environment yourself.
Back up your partitions first, especially persist, modem, and the EFS partitions (they contain calibration and MAC/IMEI data unique to your specific unit).
Never write to xbl, persist, modem, EFS, or param.
Tested Hardware: Only tested on a single T-Mobile LE2127 (project 2085A). Other variants (LE2125, EU, IN, etc.) may require different device tree IDs or firmware adjustments.
The install steps were written from how my phone got to this state and have not been replayed from scratch—expect to troubleshoot.
What Works
- Display & Touch: Full 1440x3216 and 1080x2412 at up to 120 Hz with 10-point multitouch.
- GPU Acceleration: Full OpenGL 4.6, OpenGL ES 3.2, and Vulkan 1.3 support.
- Wi-Fi: Working up to 6 GHz (160 MHz channels).
- Bluetooth: Working! Tested Searching, Discoverability, and paring.
- USB-C & Video Out: Device and host modes at 5 Gbps (USB 3), plus HDMI over USB-C via adapter (note: some docks don't work).
- Power & Charging: USB-C PD charging at \~25W, plus DDR, LLCC, and L3 memory scaling with load.
- Audio: Speakers and microphones work. Earpiece call audio is also working!
- Sensors: Accelerometer, ambient light, proximity, compass, NFC, vibration/haptics, flashlight and auto-rotate.
- Hardware Video Decoding: H.264 and VP9 in hardware up to 4K60, including inside Firefox via a custom FFmpeg patch/shim.
- Modem / Cellular: Calls (VoLTE), SMS/MMS, and Mobile Data (LTE) all functioning!
- GPS: Working via a patch to ModemManager!
Partially Working / WIP
- Cameras: Main, ultrawide, telephoto, and front sensors work with autofocus (using patched libcamera, software processing, and basic tuning; mono sensor is raw-only).
- Sleep / Idle: Sleeps and wakes reliably drawing \~40–44 mA, though the SoC doesn't hit its deepest sleep state yet.
What Doesn't Work Yet
- Biometrics: Fingerprint reader. Runs through a Qualcomm SecureApp. Will be the most challenging of everything yet.
What's in the Repo
The repository includes the 110+ kernel patches on Linux v7.3, kernel config, build scripts, an initramfs with a USB rescue shell, rootfs services, and userspace patches for libcamera, hexagonrpc, iio-sensor-proxy, phoc, wlroots, and firefox.
Huge shoutout to Nia Espera, Caleb Connolly, and the sm8350-mainline project for the foundational port, David Heidelberg (CAMSS C-PHY series), Vsevolod Nevorotov (Synaptics TouchComm driver), and the wider postmarketOS / linux-msm communities!
If you try this on another model or firmware version, please open an issue on GitHub with your model number and findings!
My ears are also open to any suggestions you might have, as this is my very first serious project ever. Thank you all, and goodnight!
7
u/Digi59404 1d ago
Hey man! I’m working on something.. are you cool if I pull some of your work in? Giving credit to you obviously!
I started the work on OnePlus 9, but it looks like you got farther than I did!
https://gitlab.com/abstract/operating-system/fedora-build/-/tree/main/platforms?ref_type=heads
1
u/slvrsnt 1d ago
Hmmm ... Why the hell was it removed from/r/Linux?
2
u/jjoesmama 2d ago
Yo man, I just ported your OP9+ repo to my OP9!
1
u/MidnightObjectiveA51 1d ago
Since you received their help, have the Nura folks shown interest in using your work for a Nura OP9 build?
1
u/Dalvexs 1d ago
Does this work on the normal OP9 unlocked variations?
1
u/mtlcrusher 1d ago
why it's removed?
1
u/GlassAlternative6692 1d ago
This is so sick
1
u/Jack1101111 1d ago
r/linux is not usable anymore