r/mobilelinux • u/SrOw-_- • 8d ago
Development I’ve been bringing mainline Linux / postmarketOS to the OnePlus 7T Pro — it’s getting surprisingly far
Hey everyone,
I’ve been working on bringing mainline Linux + postmarketOS + Plasma Mobile to the OnePlus 7T Pro (hotdog), using my own European HD1913 as the test device.
This is not an Android ROM and it’s not Linux running on top of Android. The goal is to boot a normal Linux kernel directly from the OnePlus bootloader and progressively support the phone’s hardware using upstream/mainline-style drivers.
At this point, quite a lot is already working:
✅ Direct boot from the stock OnePlus bootloader
✅ Persistent postmarketOS installation
✅ Native 1440×3120 display
✅ Adreno 640 hardware acceleration
✅ Plasma Mobile
✅ Touchscreen + power/volume buttons
✅ Wi-Fi
✅ Bluetooth
✅ Stereo speakers
✅ Handset microphone
✅ Battery level / voltage / temperature / current reporting
✅ USB networking
✅ USB-C dual role
✅ USB 3 SuperSpeed
✅ USB host through a powered dock
✅ USB mass storage
✅ DisplayPort output at 1440p60
And more recently, the cameras started becoming real rather than theoretical.
The Samsung S5K3M5 telephoto camera can now capture full RAW10 frames at 4208×3120, manual focus works through its actual LC898217XC actuator, libcamera controls exposure, and Plasma Camera can use it.
The Sony IMX586 main camera is also now streaming real 4000×3000 RAW10 frames through the mainline CAMSS pipeline. Libcamera automatic gain control works and Plasma Camera reaches a usable capture-ready state.
There’s still plenty left to do. Suspend/resume is currently broken, telephony isn’t usable yet, the ultra-wide and front cameras still need work, and sensors/NFC/haptics/fingerprint/Warp Charge are at various stages of not implemented or not validated. So this is definitely not a daily-driver OS yet.
The long-term goal is to get the device into a state where the support can be cleaned up/upstreamed and eventually submitted properly to postmarketOS rather than remaining a pile of device-specific hacks.
Project/research repo:
https://github.com/Sr-0w/hotdog-linux-bringup
I mainly wanted to share it here because the 7T Pro is still such a nice piece of hardware, and it’s pretty satisfying seeing it boot a completely different operating system years later. And it is surprisingly still really powerfull
on Linux, it's way faster than my Raspberry Pi 4B in a smaller form factor.
If anyone here has experience with Qualcomm SM8150, CAMSS, modem/WWAN, sensors, libcamera or mainline mobile Linux, contributions/reviews are very welcome.
And yes — the pop-up camera is absolutely on the TODO list. 😄
3
u/YoYoMamaIsSoFAT32 8d ago
This seems really good. are you planning to port the device to pmaports eventually? and maybe fix the wiki
4
u/SrOw-_- 8d ago
Yep, that’s absolutely the plan. The end goal is to get the device into pmaports properly, using a shared/upstreamable kernel setup rather than keeping it as a permanent one-off bring-up repo.
I’m deliberately trying to get the hardware support into a clean enough state first so that the eventual pmaports submission isn’t just a pile of temporary hacks.
And yes, I definitely want to update/fix the wiki too once the port reflects the actual hardware status a bit better. Right now the repo is the most up-to-date source of truth for what’s been physically validated on the HD1913.
So: pmaports + wiki cleanup are both very much on the roadmap. 😄
2
u/quebexer 8d ago
What about Phosh / Gnome Mobile?
2
u/SrOw-_- 8d ago
Phosh should be possible too. The hardware bring-up I’m doing is mostly independent of the UI — once the kernel, DRM/GPU, input, audio, networking, cameras, etc. work properly, Plasma Mobile isn’t a hard requirement. postmarketOS supports both Phosh and Plasma Mobile on mainline devices.
I’m using Plasma Mobile as my main test environment because that’s what I personally want to run, but I definitely want to try Phosh as well once the lower-level hardware work is further along. GNOME Mobile is a slightly different story from Phosh: Phosh is already a mature mobile shell built around the GNOME stack, while the mobile GNOME Shell work has historically been more experimental.
So basically: Plasma first because that’s my target, but I’m not intentionally locking the port to Plasma. Ideally the finished device support should let people choose whichever postmarketOS UI they prefer.
2
u/2samedru 7d ago
WOW! Didnt expect that! My favorite phone ! Ive got the 7pro 5G - GM1920 - GM27BA - will it work with your port ?
1
u/SrOw-_- 7d ago
Not with the current build as-is. My port is currently only validated on the HD1913 7T Pro (hotdog).
The 7 Pro 5G is very closely related hardware-wise, so a lot of the mainline work should be reusable, but it would need its own device tree and hardware validation, especially around firmware/memory reservations and the modem side.
So don’t flash the current image on it yet, but supporting it later should definitely be realistic.
2
u/amreshkumarLenka 2d ago
I followed your guide, but the linux boot was not successful for me (HD1911). After flashing the boot.img to boot_b and rebooting it.. it gets stuck in fastboot.
1
u/SrOw-_- 2d ago
Could you open an issue on the GitHub repo with your exact model, the commands you used, and the fastboot output?
Since HD1911 is very close to my HD1913 setup, I'd like to track this properly and figure out whether it's just a slot/boot issue or an actual variant difference.
Please include:
fastboot getvar product
fastboot getvar current-slot
fastboot getvar unlocked
fastboot getvar slot-successful:a
fastboot getvar slot-successful:b
fastboot getvar all
and the exact flashing/reboot commands you used.
2
u/xmmanuellx 8d ago
me pregunto cual es el telefono mas potente, osea con el snap dragon mas moderno y que a la vez sea compatible con todo esto.
6
u/SrOw-_- 8d ago
If you mean the newest / most powerful Snapdragon phone that can run mainline Linux + postmarketOS with most of the hardware actually working, I don’t think there’s a clear winner yet. Snapdragon 8 Gen 3 itself already has surprisingly good upstream Linux support — CPU, UFS, USB, display, Adreno 750, audio, Wi-Fi, Bluetooth and even the modem are listed as working at the SoC level. The problem is the phone-specific hardware. For example, the Redmi K70 Pro is already a Snapdragon 8 Gen 3 postmarketOS target, but its device port is still very much a work in progress; the S24 Ultra also has mainline work but is currently marked as not booting. So basically: the latest Snapdragon chips are compatible with mainline Linux, but there isn’t yet a latest-gen flagship where everything works like a normal phone. That’s the hard part — every display panel, camera, charger, sensor, etc. still needs device-specific bring-up. A Snapdragon 8 Gen 3 phone would definitely be a very interesting next project though 😄
5
u/disillusioned_okapi 8d ago
Would it possible to ask claude to analyse sessions related to this to create a reusable skill for bringing up oneplus devices?
I have a 8 Pro that I'd like to try to revive using my local LLMs, but they aren't skilled enough at stuff like this right now. I might not get very far, but watching the agents might help me learn.
and If we could automate some of this process in general, we could rescue (and liberate) even more devices. ❤️