[DISCONTINUED][GSI][9][Reference] LineageOS 16.0 GSI (all archs) and how to build them

Search This thread

AndyYan

Recognized Contributor
Jan 30, 2012
4,684
4,189
Beijing
640px-Lineage_OS_Logo.png


Background:
We've been offered LOS 16 GSIs in the past (here, and here), but they haven't been updated in quite a while, so as a LineageOS lover, I decided to step up and do it myself. Turns out it wasn't so easy - there were a number of hurdles that prevented it from building properly, booting or being feature-complete. But here I am, having figured out most if not all what's needed, and verified booting on an arm64 ab device I own, I'm ready to share my findings as well as some builds with you.

Disclaimer:
This is still mostly a LineageOS team / PHH @phhusson effort, credits to them and all associated for making all this possible.
No instructions will be offered. If you're here in this forum, you should know what you're doing.
No guarantees that everything would work. This is a GSI, bugs are bound to happen.
Do not report hardware-related bugs in this thread. I am selfish and only care about getting it running on my device with whatever features I need working. Plus I'm not PHH and can't solve any either.

Download:
https://sourceforge.net/projects/andyyan-gsi/files/
Compressed as .xz archives - extract first.
Vanilla except for these changes:
  • Modifications needed to make it build/boot/feature-complete, see below
  • Disabled "vendor mismatch" warning on boot
  • Re-enabled lockscreen shortcuts
  • Default stretch-to-fullscreen (force apps to render in 18:9)

Extra tip:
If you have a relatively low-end device and experience UI stutters, try this simple build.prop trick (technically a debug property, so use at your own risk). Thanks @SnapTheRipper for bringing it up!

Modifications needed (builders-only):
Now for the juicy part. On top of PHH's already fantastic build script, you'll need these:
device/phh/treble:
build/make:
external/tinycompress:
frameworks/base:
vendor/lineage:
vendor/qcom/opensource/cryptfs_hw:
And that's it. Doesn't look like much, but most are pretty hacky solutions, and I don't expect them to be merged anywhere. As I said, I'm only interested in getting it running, I don't care what it takes.

Stuff on GitHub (builders-only):
I've also collected necessary scripts/patches and uploaded them: treble_build_los, treble_patches (PHH's treble_patches adjusted for LOS). Not the cleanest code, but should help if you still need more clues.

Donate?
https://paypal.me/AndyCGYan

Thanks for reading - I hope this could be of use to fellow LineageOS lovers / home builders.
 
Last edited:

AndyYan

Recognized Contributor
Jan 30, 2012
4,684
4,189
Beijing
Last edited:

AndyYan

Recognized Contributor
Jan 30, 2012
4,684
4,189
Beijing
As of now I've received 1 report of A-only booting up alright. Although I don't take hardware-related bug reports, it's advised to post whether it boots on your device so as to let other users know.

Thank you very much!!! Will test and give feedback....ist it build on latest Phhs V111?

Not sure how I could determine that, but it's fresh synced.

Cool, which one is the a-only? ...it's not clearly writen

avN, bvN - not clear enough?
 
G

GuestK00171

Guest
Thanks again for A-only build...tested and works great on MiMax3 with stock PIE vendor!!!

Only thing not working is equalizer for audio, opens a empty screen but no FC or error message...but ringtone, music etc. working.
 

MadalinC

Member
Sep 25, 2018
30
16
Just tested this on a Nokia 7 Plus (B2N) with the bvN images. Everything seems to work just fine, except for VoLTE/VoWiFi (which I don't care that much about anyways...).

Voice calls, Camera, MusicFX, Fingerprint, Bluetooth, LTE, all work as expected. Will come back after some usage with more info about battery life and such.
@AndyYan Awesome stuff, Andy! Thank you for this guide--will try to build it myself soon enough after I run your build for a few days to test.

By the way, do you think this will get OTA updates from LineageOS? The updater seems to work as expected, but haven't seen any new options there yet.

Thanks again!
 

MadalinC

Member
Sep 25, 2018
30
16
Nope, LOS team even stated explicitly they won't be making any official GSIs.

Oh, that is very unfortunate. It is running really smooth as a GSI :(

So that means that each security patch comes out, I will need to start from scratch and reflash the image? That would make it a bit a pain each month :confused:

Anyways, thanks for the quick reply!
 

odysseus84

Senior Member
Dec 19, 2010
520
115
Solothurn
On the Galaxy S9: I dirty flashed it over vanilla phh 111 to see if it boots. It did with the usual force close of course.
Then I wiped and reflashed. But stuck at the boot animation. The splash screen was there for a half century too... my guess is the ramdisk stoff from the kernel. there are some other Kernel version I will try those later.
 

Dejvid50

Senior Member
Dec 11, 2013
789
962
Nothing Phone 1
Done, check OP. I can't spare an A-only device to test it though, try at your own risk.
EDIT: might have to wait for SF to mirror the file...
Now I'm busy, at night I will try to flash and will report. Thanks for your work
EDIT: Ok, so I was try to flash on Huawei P10 Lite with OpenGapps, and can't boot, no logo, just goes to recovery, that's all.. I was WIPE system, data, cache, dalvik cache
 
Last edited:

drxllxffxct

Senior Member
Aug 5, 2012
368
539
Thanks again for A-only build...tested and works great on MiMax3 with stock PIE vendor!!!

Only thing not working is equalizer for audio, opens a empty screen but no FC or error message...but ringtone, music etc. working.

do you mind sharing the instructions for flashing the gsi? im on the latest pie beta on my max3.
 
Finally there's a LOS 16 GSI! I have been looking to try to compile my own with phh build script.

Sorry which one should I use _avN or _bvN if I have an A Only Arm64 (Wayne).

I tried to flash the _avN and got stuck at the Mi logo.

Thank you very much to do the work.

Sent from my Mi MIX 2 using XDA Labs
 

Top Liked Posts

  • There are no posts matching your filters.
  • 83
    640px-Lineage_OS_Logo.png


    Background:
    We've been offered LOS 16 GSIs in the past (here, and here), but they haven't been updated in quite a while, so as a LineageOS lover, I decided to step up and do it myself. Turns out it wasn't so easy - there were a number of hurdles that prevented it from building properly, booting or being feature-complete. But here I am, having figured out most if not all what's needed, and verified booting on an arm64 ab device I own, I'm ready to share my findings as well as some builds with you.

    Disclaimer:
    This is still mostly a LineageOS team / PHH @phhusson effort, credits to them and all associated for making all this possible.
    No instructions will be offered. If you're here in this forum, you should know what you're doing.
    No guarantees that everything would work. This is a GSI, bugs are bound to happen.
    Do not report hardware-related bugs in this thread. I am selfish and only care about getting it running on my device with whatever features I need working. Plus I'm not PHH and can't solve any either.

    Download:
    https://sourceforge.net/projects/andyyan-gsi/files/
    Compressed as .xz archives - extract first.
    Vanilla except for these changes:
    • Modifications needed to make it build/boot/feature-complete, see below
    • Disabled "vendor mismatch" warning on boot
    • Re-enabled lockscreen shortcuts
    • Default stretch-to-fullscreen (force apps to render in 18:9)

    Extra tip:
    If you have a relatively low-end device and experience UI stutters, try this simple build.prop trick (technically a debug property, so use at your own risk). Thanks @SnapTheRipper for bringing it up!

    Modifications needed (builders-only):
    Now for the juicy part. On top of PHH's already fantastic build script, you'll need these:
    device/phh/treble:
    build/make:
    external/tinycompress:
    frameworks/base:
    vendor/lineage:
    vendor/qcom/opensource/cryptfs_hw:
    And that's it. Doesn't look like much, but most are pretty hacky solutions, and I don't expect them to be merged anywhere. As I said, I'm only interested in getting it running, I don't care what it takes.

    Stuff on GitHub (builders-only):
    I've also collected necessary scripts/patches and uploaded them: treble_build_los, treble_patches (PHH's treble_patches adjusted for LOS). Not the cleanest code, but should help if you still need more clues.

    Donate?
    https://paypal.me/AndyCGYan

    Thanks for reading - I hope this could be of use to fellow LineageOS lovers / home builders.
    24
    Things are really smooth and flawless! Tested since my latest comment on this thread and no regreats ever since ?

    However, background imagens app crashes sometimes (not a big issue, but maybe check that out in the future).

    NOTE: I found a really strong solution for the ones who suffer from UI/app stutters like me. It really brings the performance to stock-like level, which is great on a GSI. Kudos to Anton Paulic and Dinolek for this.
    You have to paste the following code in your vendor build.prop (to prevent the lost of it during system flashes)

    debug.sf.latch_unsignaled=1
    14
    Updated all variants with September security patches and in sync with PHH v119. [Insert obligatory backup-and-test warning here]
    - Now covering all device architectures, including arm-ab, arm_binder64-a, arm_binder64-ab - as shown by the survey, these have very few users and thus weren't thoroughly crowd-tested, but I believe I've done what I can here. I've worked around the privapp permissions so you won't need that whitelist xml from earlier.
    - Using PHH's FOD implementation, as stated before
    - Minor changes to building process will be synced to GitHub shortly, when I have time

    Since I shelled out quite a bit for that SSD, here's a donation link if you like this stuff and want to help me a bit: https://paypal.me/AndyCGYan
    13
    A lil teaser - I managed to build and boot LOS 17 based on PHH v200.e. The building flow is largely unchanged, which is a relief. The image itself seems to function okay (I didn't test it in-depth), but LOS 17 upstream is still under development so certain features are missing, and the issues and non-booting samples people report about PHH v20x builds should also apply here.
    I might upload a test build for one arch after I clean up the process, but actual release will follow PHH's.
    Please keep in mind that PHH v20x is currently pre-release. The best thing to do right now is to try installing those AOSP test builds on your devices and report non-booting/bugs/instabilities to help PHH develop.
    12
    Updated all 3 variants with July security patches and in sync with PHH v115. [Insert obligatory backup-and-test warning here]