OnePlus 7 Pro LineageOS & AOSP: How to install, current status and more!

There was a time when Android tinkerers used to be crazy about custom ROMs. Vanilla Android (aka AOSP) wasn’t much feature-rich then, whereas OEM UIs were inconsistent or bloated (*cough* TouchWiz *cough*).

samsung_touchwiz
TouchWiz from Samsung: The ancestor of today’s One UI

During that period, the developers started something amazing. Tons of new features were written from scratch; even some OEM specific components were reverse-engineered. That was the true golden age of custom ROM development.

cm_theme
CyanogenMod, one of the most popular custom ROMs, featured a dedicated theme engine

There is another side of the story.

With time, Google has incorporated many features into AOSP. OEM skins got matured as well, and they are often tightly integrated with the device security (example: Samsung Knox).

Given the out of the box rich experience from the stock ROMs, paired with the roadblocks involved into unlocking bootloaders (Widevine level degradation, SafetyNet failure etc.), a huge chunk of users prefer not to install custom ROMs.

onepls_7_pro_widevine_l3_bootloader_unlocked
OnePlus 7 Pro (bootloader unlocked and rooted): Widevine fall back to L3 from L1 (Click/Tap to zoom)

Nevertheless, adventurous minds are always looking for new challenges. The arrival of Project Treble makes it possible to boot (at least in theory) a generic system image (GSI) on any compatible device, although real life mileage varies.

A generic system image (GSI) is a system image with adjusted configurations for Android devices. It’s considered a pure Android implementation with unmodified Android Open Source Project (AOSP) code that any Android device running Android 8.1 or higher can run successfully.

(Source)

OnePlus 7 Pro was launched with Android 9.0 Pie on board, thus it does support Project Treble. However, you can’t straightaway boot the regular Android Q beta GSI published by Google. Note that the developer preview build of Android Q for OnePlus 6/6T and 7 Pro released by the OEM is not a generic image.

oneplus_android_q_announcement

While the Android Q GSI issues are being debugged, we have tried out the AOSP Pie GSI from Pierre-Hugues HUSSON (popularly known as phhusson). Moreover, the LineageOS 16.0 GSI compiled by AndyYan has also been tested.

oneplus_7_pro_los_gsi_about_device
OnePlus 7 Pro running LineageOS 16.0 GSI

A surprising amount of components are working, including telephony, SMS, cellular data, Bluetooth, Wi-Fi, speaker/microphone, brightness control etc. Camera does work with included camera app as well as Google Camera, although the front camera is stuck in its popped up position until reboot.

oneplus_7_pro_gsi_front_camera_stuck

We are not able to test VoLTE/VoWifi as our carrier doesn’t support them here. One of the noticeable bug is the non-working fingerprint reader. Both vanilla AOSP and LineageOS detect the presence of fingerprint sensor, but can’t identify the finger.

oneplus_7_pro_gsi_fingerprint_bug
Nope, the fingerprint scanner is in the screen!

We have already collected the logs and shared them with the devs. The icons on the status bar are slightly cut at the edge, which can be solved by a custom overlay.

Installation instructions

1. Make sure you are on latest firmware (see here).

2. Unlock the bootloader.

3. You need to have stock kernel matching with the current installed OxygenOS. If you are unsure, download them from the same thread mentioned above and flash on both slots:

fastboot flash boot_a name_of_the_boot.img
fastboot flash boot_b name_of_the_boot.img

4. Download latest phh-AOSP or LineageOS 16.0 GSI by AndyYan. We need the ARM64 AB variant.

5. Unpack and flash it on the both slots of system:

fastboot flash system_a name_of_the_system.img
fastboot flash system_b name_of_the_system.img

6. Extract the stock vbmeta.img from the official OTA update ZIP and flash it like the following:

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

7. Wipe userdata:

fastboot -w

8. Reboot to system:

fastboot reboot
oneplus_7_pro_los_gsi_status
LineageOS 16.0 GSI on OnePlus 7 Pro: Working WiFi, Bluetooth and mobile data

Are you planning to switch from OxygenOS? Comment below.

PiunikaWeb is a unique initiative that mainly focuses on investigative journalism. This means we do a lot of hard work to come up with news stories that are either ‘exclusive,’ ‘breaking,’ or ‘curated’ in nature. Perhaps that’s the reason our work has been picked by the likes of Forbes, Foxnews, Gizmodo, TechCrunch, Engadget, The Verge, Macrumors, and more. Do take a tour of our website to get a feel of our work. And if you like what we do, stay connected with us on Twitter (@PiunikaWeb) and other social media channels to receive timely updates on stories we publish.

Want to work for PiunikaWeb and enjoy best-in-industry compensation & benefits? You'll be glad to know we're hiring experienced candidates.

Kingshuk De

I came from a mixed background of Statistics and Computer Science. My research domains included embedded computer systems, mobile computing and delay tolerant networks in post-disaster scenarios. Apart from tinkering with gadgets or building hackintosh, I like to hop on various subreddits and forums like MyDigitalLife and XDA.