[GSI][13] LineageOS 20 "Light"

Search This thread

michael_hamada

Senior Member
just gave it a try and it didn't boot, I went from lite to bVN vndklite !?
Well, so that isn't the issue caused by dirty flash. It's the issue of compatibility of your device and the ROM.
I was able to switch between ArrowOS, crDroid, LOS 20 TD and LOS 20 Lite with dirty flash without any issue on my Moto g30.
But other GSIs I tried won't boot even with clean flash.
 

3mel

Senior Member
Aug 23, 2012
1,798
596
London
Well, so that isn't the issue caused by dirty flash. It's the issue of compatibility of your device and the ROM.
I was able to switch between ArrowOS, crDroid, LOS 20 TD and LOS 20 Lite with dirty flash without any issue on my Moto g30.
But other GSIs I tried won't boot even with clean flash.
most GSIs boot for me unless they need a modded vendor... will try a clean flash later today.
 

ildar_prophet

Senior Member
Apr 20, 2011
291
45
johan-notes.blogspot.com
hi! just installed.
1. experienced failing Networking, fixed with restricted_networking_mode off
2. Bluetooth headset doesn't play music. I remember fixing it on LOS-19 by disabling a2dp offload. Now I see it disabled by default [persist.sys.phh.disable_a2dp_offload]: [true]. Hmm. What shall I do?

Having MTK phone (A11 vendor). Model AGM H3. ROM Testing 20221109-personal
@AndyYan , thanks a lot for this ROM!
 

AndyYan

Recognized Contributor
Jan 30, 2012
4,585
4,058
Beijing
A quick feedback on flashing your GSIs on poco f4 (munch). It is A/B device with dynamic partitions.

I first tried the light lineage-20.0-20221109-UNOFFICIAL-gsi_arm64_gN-secure.img.xz, however the device bootlooped.
I've had a bunch of reports of "Light" failing on Xiaomi/Redmi devices, but none detailed enough (log while bootlooping would be nice). My own Civi is working well, but it's on a slightly older MIUI12 R vendor. It does interest me when "modern" devices wouldn't boot "Light" - perhaps I should grab one of the reported devices and see for myself...
The only issue of any significance (to me, anyway) is getting the internal speaker to turn off when a headset is plugged in. On 19.1, I need to set Misc features->Force headset switch (Huawei default) and Misc features->Use alternate way to detect headsets to ON.
Bluetooth headset doesn't play music. I remember fixing it on LOS-19 by disabling a2dp offload.
Unimplemented yet, I'll check if they're as simple as a prop + a single platform-side change, and if so I'm okay with adding them next.
 
  • Like
Reactions: Heeni

3mel

Senior Member
Aug 23, 2012
1,798
596
London
could just be me but I've now downloaded lineage-20.0-20221111-UNOFFICIAL-arm64_bvN-vndklite-secure.img twice, first time I dirty flashed, the 2nd time was clean. both times the rom wouldn't boot for me.
 

pbgapski

Senior Member
Jun 30, 2014
141
49
Google Nexus 4
Sony Xperia Z2
I've had a bunch of reports of "Light" failing on Xiaomi/Redmi devices, but none detailed enough (log while bootlooping would be nice). My own Civi is working well, but it's on a slightly older MIUI12 R vendor. It does interest me when "modern" devices wouldn't boot "Light" - perhaps I should grab one of the reported devices and see for myself...

I am not sure this is related or not, but I just tried to DSU the light GSI as a simple way to grab some logs. But it just fails.

The command I used was:
Code:
adb shell am start-activity -n com.android.dynsystem/com.android.dynsystem.VerificationActivity -a android.os.image.action.START_INSTALL -d file:///storage/emulated/0/Download/system.img --el KEY_SYSTEM_SIZE 3350601728 --el KEY_USERDATA_SIZE 8589934592
And I immediately get a failed update notification.

Has anyone been able to boot this GSI in this way?
 

ildar_prophet

Senior Member
Apr 20, 2011
291
45
johan-notes.blogspot.com
2. Bluetooth headset doesn't play music. I remember fixing it on LOS-19 by disabling a2dp offload. Now I see it disabled by default [persist.sys.phh.disable_a2dp_offload]: [true].

Unimplemented yet, I'll check if they're as simple as a prop + a single platform-side change, and if so I'm okay with adding them next.
It's actually implemented. But there's a bug: https://github.com/phhusson/treble_experimentations/issues/2480
So setting to false fixed the issue.
 

ildar_prophet

Senior Member
Apr 20, 2011
291
45
johan-notes.blogspot.com
@AndyYan , the ROM misses the lptools. So I cannot expand the partition to install the MicroG. Help!
Nevermind, I got the binary from the TrebleDroid and it works just fine.
Anyway, I suggest having lptools in the ROM.
 
Last edited:

3mel

Senior Member
Aug 23, 2012
1,798
596
London
But the real big problem is that it seems to not support the Signature Spoofing a.k.a. FAKE_PACKAGE_SIGNATURE. So MicroG doesn't work.
Right?
I'm using zygisk LSPosed module and fake gapps module with the light build, everything seems to be working OK, all boxes ticked. I'm using nogoolag microG tho.
 

AndyYan

Recognized Contributor
Jan 30, 2012
4,585
4,058
Beijing
And I immediately get a failed update notification.
DSU immediately failing likely indicates something's wrong with your parameters - logcat should tell you exactly what.
It's actually implemented.
It's not... It's a "phh"-series prop, and had such been implemented in "Light", they'd be under a different name.
Anyway, I suggest having lptools in the ROM.
not support the Signature Spoofing a.k.a. FAKE_PACKAGE_SIGNATURE
Noted, but again, I'd prefer not to expand "light" excessively. If TD-based works better for you, simply switch to that.
 

ildar_prophet

Senior Member
Apr 20, 2011
291
45
johan-notes.blogspot.com
Noted, but again, I'd prefer not to expand "light" excessively. If TD-based works better for you, simply switch to that.
1. lptools is a matter to ~50kB. Shouldn't disturb the "lightness" ))
2. MicroG is very honored in FOSS community, strongly recommended. And again, AFAIK it's a very light patch, yet strongly recommended.

I'll definitely try the TD LOS20 but I'm sure I'll miss your "personal" patches because my FP sensor is crap.

thanks!
 

pbgapski

Senior Member
Jun 30, 2014
141
49
Google Nexus 4
Sony Xperia Z2
I've had a bunch of reports of "Light" failing on Xiaomi/Redmi devices, but none detailed enough (log while bootlooping would be nice). My own Civi is working well, but it's on a slightly older MIUI12 R vendor. It does interest me when "modern" devices wouldn't boot "Light" - perhaps I should grab one of the reported devices and see for myself...

I have just tried it again and it worked. The main difference is that previously I was on stock, now on ArrowOS, but I cannot rule out some error on my side previously.

The GSI used was lineage-20.0-20221109-UNOFFICIAL-gsi_arm64_gN-secure.

For the record:
Code:
adb shell am start-activity -n com.android.dynsystem/com.android.dynsystem.VerificationActivity  -a android.os.image.action.START_INSTALL  -d file:///storage/emulated/0/Download/gsi.img.gz --el KEY_SYSTEM_SIZE 3350601728  --el KEY_USERDATA_SIZE $((8*1024*1024*1024))

As for the debug part, could you please point to docs or explain how to generate useful logs in this scenario?
 

ildar_prophet

Senior Member
Apr 20, 2011
291
45
johan-notes.blogspot.com
My short report on testing the ROM on my AGM H3 (MTK):
1. Works almost perfectly.
2. BT stack crashes with some headsets. Similar to https://github.com/phhusson/treble_experimentations/issues/376 but I didn't check the logcat yet.
3. BLE doesn't connect until scanned, https://github.com/phhusson/treble_experimentations/issues/2413
4. NFC not detected, https://github.com/phhusson/treble_experimentations/issues/1073

Actually the bugs are the same as with the Phh's AOSP 12 and TD ROMs.
If anyone has an idea how to fix those, plz raise the voice. Thanks,
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Updated all variants with January security patches. [Insert obligatory backup-and-test warning here]

    Some users have reported that securize bootloops their device, and the current "integrally securize" approach means they can't boot up even once. This month I've changed it yet again to "securize on-demand", which is similar to how you securize on PHH/TD-based (a toggle in Treble Settings), but reversible and doesn't require SU.
    For new users who are unsure about whether securize might bootloop your device, please turn on USB Debugging and Rooted Debugging below it, and if/when you do hit a bootloop on the next boot, you'll have a rooted ADB shell available to you, from where you can toggle off manually:
    Code:
    adb root
    adb shell setprop persist.sys.treble.securize false
    adb reboot
    For users who are already on a gN build, be sure to toggle it on and reboot right after you update!

    Also implemented:
    Rejected:
    • FDE and unencrypted data - @DerTeufel1980 - given that yours is actually a legacy device, I recommend just using TD-based instead (I was hit by CoV last month and skipped an update; I'll update it in a few days). Thank you for understanding.
    Although I don't quite deal with Samsung devices in "Light", I've fixed and tested exfat for Samsung/Sony here, and since it applies to more than Samsung, I'm leaving this one in.

    Fixed an oversight that caused Settings to not have a search bar.

    And finally, I've examined / received reports about 2 Snapdragon 8 Gen 2 (SM8550) devices which have a common bug of no call audio. This one's gonna take me a while to figure out (AIDL coding-wise), but since SM8550 isn't going international very soon, I won't rush it.
    2
    Thanks a lot for your reply!
    1) My device (redmi note 10 pro) is not a legacy device. So what would you recommend, light or Treble-Based?
    2) Is this oss? Do I need to first flash some firmware? I am currently using ArrowOS 12 and TWRP. (I will use sd card to flash)
    3) I think my device is arm64, with a/b, please correct me if I am wrong. But I dont understand vndklite. Should I use that or secure? ( I will not use gapps and I dont need safety net pass.)
    Thank you!
    1. Try light first, then trebledroid.
    2. The whole idea of GSI is that there's no firmware in /system. You're supposed to use gsi with stock everything. You can use xiaomifirmwareupdater to get both latest stock firmware and /vendor
    3. vndklite is for some legacy devices.
    2
    my f4 still does not show nav buttons; I have tried toggling the 'override navigation buttons' in treble settings, which was enabled by default, but it had no effect;
    Indeed that switch needs a re-toggle (most devices do have a navbar on first boot, so I coded it to default ON when it isn't set), plus a reboot, to come into effect.
    The basis of this (again, inherited from PHH) is the ubiquitous "qemu.hw.mainkeys" prop which has very high priority in the framework and also shouldn't be touched by non-emulator vendors. If even that doesn't work, then your device has a really rogue vendor...
    there is now a constant notification from google play stating that the device is not certified. I am not sure this is expected or not, but it was not there in the previous build.
    Me (moto g30) too....:unsure:
    That's how non-Securized g* builds have always been, and why I made "integrally securized" earlier...

    For users who are already on a gN build, be sure to toggle it on and reboot right after you update!
    If it keeps appearing even after Securizing, just silence it by long pressing, GAPPS will start to work regardless.
    1
    What is the difference between this and Treble-Droid based? ( For devices other than what AndyYan has.) (which device do they have anyway?)
    To regular users, "Light" will have generally worse device support, but due to what's already mentioned in OP plus my favoritism towards it, will get updated easier and faster. I guess that's it? So yeah, I actually would like people to use TD-based, if that means one less not-so-elegant patch in "Light".
    For some of the devices I use, see the forum signature. Nowadays I tend to choose form (aesthetics) over function (specs/value), so even though I can obviously afford a large fleet, I intentionally miss many popular ones like Redmi Notes.
    1
    Updated all variants with January security patches. [Insert obligatory backup-and-test warning here]

    Some users have reported that securize bootloops their device, and the current "integrally securize" approach means they can't boot up even once. This month I've changed it yet again to "securize on-demand", which is similar to how you securize on PHH/TD-based (a toggle in Treble Settings), but reversible and doesn't require SU.
    For new users who are unsure about whether securize might bootloop your device, please turn on USB Debugging and Rooted Debugging below it, and if/when you do hit a bootloop on the next boot, you'll have a rooted ADB shell available to you, from where you can toggle off manually:
    Code:
    adb root
    adb shell setprop persist.sys.treble.securize false
    adb reboot
    For users who are already on a gN build, be sure to toggle it on and reboot right after you update!

    Also implemented:
    Rejected:
    • FDE and unencrypted data - @DerTeufel1980 - given that yours is actually a legacy device, I recommend just using TD-based instead (I was hit by CoV last month and skipped an update; I'll update it in a few days). Thank you for understanding.
    Although I don't quite deal with Samsung devices in "Light", I've fixed and tested exfat for Samsung/Sony here, and since it applies to more than Samsung, I'm leaving this one in.

    Fixed an oversight that caused Settings to not have a search bar.

    And finally, I've examined / received reports about 2 Snapdragon 8 Gen 2 (SM8550) devices which have a common bug of no call audio. This one's gonna take me a while to figure out (AIDL coding-wise), but since SM8550 isn't going international very soon, I won't rush it.
    thankyou so muchhhhhhh. your work is amazingg
  • 23
    640px-Lineage_OS_Logo.png

    LineageOS is a free, community built, aftermarket firmware distribution of Android, which is designed to increase performance and reliability over stock Android for your device.
    LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.
    All the source code for LineageOS is available in the LineageOS GitHub repo. And if you would like to contribute to LineageOS, please visit Gerrit Code Review.

    MUST-READ BACKGROUND - Android 13 and the two approaches:
    As some of you already know, due to various reasons, @phhusson , who kickstarted the GSI trend and committed to it over the years, is backing out from future development
    - there won't be any AOSP 13+ builds or patches directly from him. He did most of the heavylifting for fixing bugs and implementing features, and selflessly supported more than his AOSP GSIs and more than devices he own. For the situation of GSIs today, we owe him a big thank-you.
    Since PHH made up his mind, a number of existing builders incl. myself have formed the TrebleDroid organization, with PHH himself helping us in technical issues. TD will forward-port PHH's final patches (v415) onto Android 13 and attempt to fix new issues. This is still a new and ongoing process, but if done right, will have compatibility and feature-completion on par with past PHH-based GSIs.
    Meanwhile, I'm aware that at least I myself am not as capable as PHH, and won't be able to look after the myriad of patches and devices, esp. legacy ones (pre-A10). Therefore, inspired by @PeterCxy , I'm taking a different approach - start over from AOSP's generic gsi_* target, add in the minimum amount of fixes needed for my own devices, shaking off much of the legacy burden in the process and making it easier for myself to follow/maintain. This is a radical, selfish approach that by definition won't work for legacy devices anymore, and won't work as well as PHH-based GSIs that you've come to love either. However, I've fixed it up to my own daily-driver standards, and I figured it should still be of use to many. For now, I call this the "light" approach.

    Disclaimer:
    No flashing 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.
    The selfish nature of this approach means I can and will ignore certain bugs as I see fit. Deal with it or kindly go try something else.

    Download:
    https://sourceforge.net/projects/andyyan-gsi/files/
    Scroll down for the naming rules of variants.
    Compressed as .xz archives - extract first.

    Stuff on GitHub (builders-only):
    Most things should be self-explanatory. Not the cleanest code, but should help if you need some clues.
    Thanks to:
    • The LineageOS team - helping me out even when they don't offer GSIs themselves
    • @phhusson - shaped the treble community, and even the "light" approach uses his fixes/infra extensively
    • @PeterCxy - inspired me with his personal-use GSI, and coded critical fixes such as sysbta
    • ...and more
    Donate?
    https://paypal.me/AndyCGYan
    7
    Updated all variants with Android 13 QPR1 and December security patches. [Insert obligatory backup-and-test warning here]

    As usual with "feature drops", things can change or break majorly.

    Newly implemented:
    • Disable A2DP offload
    • Alternative audio jack detection
    • Signature spoofing for priv-app (just like in PHH/TD-based)
    • Optional FP lockout (set persist.sys.fp.lockouts.disable to true to disable timeout on failed FP attempts)
    • Built-in PHH-SU app for *S variant

    Rejected:
    • Force headset audio (slightly harder to implement, and not proven effective outside of Huawei)
    • lptools
    7
    Updated all variants with November security patches. [Insert obligatory backup-and-test warning here]

    As teased a few days ago, here's a gN build with MindTheGapps, plus both vN and gN are now "integrally securized", for better chances (but not guaranteed) to pass SN. OP will be updated to reflect these changes.

    A "personal" build has also been uploaded to Testing.

    I'd like to once again remind you that "light" will remain a selfish approach. For other needs e.g. Samsung oddities, please wait for the TD-based batch which I'll make a thread for shortly, see if that would scratch your itch instead.
    7
    Updated all variants with January security patches. [Insert obligatory backup-and-test warning here]

    Some users have reported that securize bootloops their device, and the current "integrally securize" approach means they can't boot up even once. This month I've changed it yet again to "securize on-demand", which is similar to how you securize on PHH/TD-based (a toggle in Treble Settings), but reversible and doesn't require SU.
    For new users who are unsure about whether securize might bootloop your device, please turn on USB Debugging and Rooted Debugging below it, and if/when you do hit a bootloop on the next boot, you'll have a rooted ADB shell available to you, from where you can toggle off manually:
    Code:
    adb root
    adb shell setprop persist.sys.treble.securize false
    adb reboot
    For users who are already on a gN build, be sure to toggle it on and reboot right after you update!

    Also implemented:
    Rejected:
    • FDE and unencrypted data - @DerTeufel1980 - given that yours is actually a legacy device, I recommend just using TD-based instead (I was hit by CoV last month and skipped an update; I'll update it in a few days). Thank you for understanding.
    Although I don't quite deal with Samsung devices in "Light", I've fixed and tested exfat for Samsung/Sony here, and since it applies to more than Samsung, I'm leaving this one in.

    Fixed an oversight that caused Settings to not have a search bar.

    And finally, I've examined / received reports about 2 Snapdragon 8 Gen 2 (SM8550) devices which have a common bug of no call audio. This one's gonna take me a while to figure out (AIDL coding-wise), but since SM8550 isn't going international very soon, I won't rush it.
    6
    Notes:
    • I now have a rather taxing day job, and can't devote nearly as much time/effort into this as I did as a student, or even a year ago.
    • No A-only or VNDKLite builds. These are concepts that don't exist natively.
    • GAPPS builds are offered as-is without guarantees. As a Chinese I can't/won't help with GAPPS/SN issues - please help each other out.
    • ADB is intentionally insecure, even on first boot (turned on by default and no authentication needed). GSIs are more fragile compared to device-specific custom ROMs, both on first boot (no-boot issues) and on subsequent boots (after tuning certain Treble settings), and I insist that no-auth ADB is a must-have for debugging and general fail-safe.
    • Signature spoofing (MicroG) is supported, but only for priv-apps. This is a security consideration from PHH.
    • Refer to #9 for explanation/workaround of an MediaTek-specific kernel bug that causes no internet.