[GSI][13] LineageOS 20 TrebleDroid-based

Search This thread

m0byn

Senior Member
Feb 13, 2023
73
13
I installed LineageOS 20 TD on my Samsung Galaxy Tab S6. Everything works fine besides two issues:
  1. There is no toggle in settings to switch on auto-brightness.
  2. Often, but not always, when switching the tablet to standby mode (either by auto-standby, or by pressing the power button once), LineageOS seems to be restarting. To be specific, the LineageOS logo shows up and I have to reenter the code to unlock. It seems to me that it is related to having apps open while locking.
Does anyone know how to approach these issues? The auto-brightness is not such a big deal, whereas the restarting problem is more severe.
I am happy to provide any logs or additional information if necessary!
So, I was able to isolate the problem somehow. It is definitely related to using the S-Pen. If I just use the tablet without the pen everything works fine and no issue of restarting when putting the tablet to sleep. However, as soon as I do just one little thing with the S-Pen (it is enough that it shows the pointer and recognizes the S-Pen without even touching the display), the next time the tablet is put to sleep, LineageOS somehow crashes and restarts.
I am thankful for any tips on how to solve this issue since the S-Pen is indeed a core feature of the tablet for me!
I am happy to provide any more details to figure out whats the problem, be it logs or anything else.
@AndyYan would it be possible for you to have a look at this?

EDIT: S-Pen issue disappeared with March update!
 
Last edited:

AnonVendetta

Senior Member
Apr 29, 2016
1,563
562
So, I was able to isolate the problem somehow. It is definitely related to using the S-Pen. If I just use the tablet without the pen everything works fine and no issue of restarting when putting the tablet to sleep. However, as soon as I do just one little thing with the S-Pen (it is enough that it shows the pointer and recognizes the S-Pen without even touching the display), the next time the tablet is put to sleep, LineageOS somehow crashes and restarts.
I am thankful for any tips on how to solve this issue since the S-Pen is indeed a core feature of the tablet for me!
I am happy to provide any more details to figure out whats the problem, be it logs or anything else.
@AndyYan would it be possible for you to have a look at this?
Definitely weird to see this report. Will have to test for myself on both of my Samsung devices, they both have pens (a phone and a tablet).

Is your pen the kind that wirelessly charges? Or it doesn't need to be charged periodically? On my tablet, it automatically magnetizes to a location on the rear of the device, and wirelessly charges as long as it's placed there. I have a case on my tab, but it has a cutout slot on the back to fit the pen.

On my Note, it just slides into a slot in the bottom left of the phone, and charges as long as it's there. So it fits INTO the phone, rather than ONTO it, like the tab.
 

m0byn

Senior Member
Feb 13, 2023
73
13
Definitely weird to see this report. Will have to test for myself on both of my Samsung devices, they both have pens (a phone and a tablet).
I totally agree that it is weird. Looking foward to your tests.
Is your pen the kind that wirelessly charges? Or it doesn't need to be charged periodically? On my tablet, it automatically magnetizes to a location on the rear of the device, and wirelessly charges as long as it's placed there. I have a case on my tab, but it has a cutout slot on the back to fit the pen.
My tablet is a Samsung Galaxy Tab S6 and it is exactly this type of pen. However, I am pretty sure that the pen itself does not HAVE to be charged. For example, I tried the pen of my Samsung Galaxy Tab S4 tablet, which does not even have a battery, and it shows the exact same behavior while writing, but also with restarting lineage. To the best of my knowledge, the charging of the pen is only necessary to use some special Samsung features related to the pen when using OneUI.
 

IronDwarf

Senior Member
Nov 1, 2013
136
19
OnePlus 7 Pro
Redmi Note 8 Pro
The GApps that are included will be 100% compatible with the gsi. For 3rd party GApps, the LOS dev team only recommends MindTheGApps. Better to go with what's included, since you would have to flash MTG separately.
I am a little confused, I installed your latest release and runs great but no she apps installed. I tried several different yeah but none would install
 

AnonVendetta

Senior Member
Apr 29, 2016
1,563
562
Thanks i will do that
Just wanted to mention as an alternative that MicroG works fine on the vanilla versions, if you just need working Play Store and basic Google apps compatibility. Lighter installed footprint/space used, and probably less usage of system resources.

You can just install MicroG Installer Revived as a Magisk module, will work on vndklite and non-vndklite versions. Or you can manually push its' files directly into the system partition, but you'll need root access and a vndklite variant.

You can get SafetyNet to pass with MicroG too, alongside enabling securize/spoof system properties. You might also need an extra Magisk module or 2. It was passing for me when I last tested.
 
Last edited:
  • Like
Reactions: Kenaz Rune

AndyYan

Recognized Contributor
Jan 30, 2012
4,682
4,185
Beijing
@AnonVendetta Thanks for voluntarily taking care of Qs while I'm gone :)
  1. Here I found a tip how to fix the S-Pen showing as a mouse pointer for the Tab S4. When trying to save the edited file using TotalCommander it gives me the error EROFS (Error read only file system). Do I need Magisk or something similar to do that? Would it be maybe possible to add this line in the GSI (given it is possible and that it does not interfere with anything else...)
  2. Apparently, the unlock with fingerprint popup is misplaced. To be specific, when unlocking an app using the fingerprint, then the circle in the popup is above (too high) the actual fingerprint sensor. I am happy to provide any details on that needed for fixing this issue!
  3. Do you by any chance know whether the Samsung Keyboard Covers for tablets work with this GSI?
  4. Is there any way to get the two top speakers working?
  1. On my builds, "setprop persist.ui.spen.pointer true" should replace the pointer with Sammy's original blue dot, but that also replaces the mouse pointer, not sure if that's a price you're willing to pay. I don't plan to get a Tab S* or any productivity-oriented tablet in the near future, so I won't work on improving this just yet. Note to others: if you notice another AOSP-based ROM with a better solution, do notify me.
  2. Unsurprisingly this device has FOD. I only inherited the FOD solution from PHH/TD, never took a look at it, so I'm not entirely sure what could be wrong either - a crude guess would be wrongly reported FOD X/Y coords, esp. under landscape.
  3. I've heard from a Tab S7 user that it worked for him (in fact he was the one who pointed out that the above pointer replacement also affecting mouse).
  4. Perhaps one of the audio options in Treble settings might help?
Forgive me. The status bar clock. Only has left and right placement options (and I'm on a moto g power (2021) with the camera in the screen which obscures the left placement).
Sounds like your device has an ill-defined overlay - the "center" option is only removed when there's a center cutout defined.
PS: any way of disabling 'Trust' and removing encryption?
Trust's notif can be disabled, after which it shouldn't affect daily usage.
Encryption is a vendor-specific thing, and by now all modern devices default to enabled. Most vendors are now also read-only (EROFS and such), so you can't even change the fstab to disable that.
So, I was able to isolate the problem somehow. It is definitely related to using the S-Pen. If I just use the tablet without the pen everything works fine and no issue of restarting when putting the tablet to sleep. However, as soon as I do just one little thing with the S-Pen (it is enough that it shows the pointer and recognizes the S-Pen without even touching the display), the next time the tablet is put to sleep, LineageOS somehow crashes and restarts.
Logcat me the crash, I'll check for the obvious.
BTW, I own a Sammy Note10 5G, which happens to be my only device on TD-based (the rest are all on "Light"). It doesn't crash like you described.
 
  • Like
Reactions: Hatrackman

Hatrackman

Senior Member
Feb 25, 2015
70
1
50
Victoria
www.capitaldaily.ca
@AnonVendetta
Trust's notif can be disabled, after which it shouldn't affect daily usage.
Encryption is a vendor-specific thing, and by now all modern devices default to enabled. Most vendors are now also read-only (EROFS and such), so you can't even change the fstab to disable that.

Andy, if you could only have one device/OS for a year which would you rather, TDBased or 'Light'?
 

Hatrackman

Senior Member
Feb 25, 2015
70
1
50
Victoria
www.capitaldaily.ca
I have a VNDKLite enabled phone (Moto G Power 2021). Is that what you're talking about when you say Known but will not implement/fix:
Compatibility with legacy (pre-A10) devices, A-only, VNDKLite? Screenshot of Treble Info attached
"Light" any day, unless someone f's with me and intentionally gave me a legacy device or a Sammy.
 

Attachments

  • Screenshot_20230320-203311_Trebuchet.png
    Screenshot_20230320-203311_Trebuchet.png
    81.8 KB · Views: 20

AnonVendetta

Senior Member
Apr 29, 2016
1,563
562
@AnonVendetta Thanks for voluntarily taking care of Qs while I'm gone :)

  1. On my builds, "setprop persist.ui.spen.pointer true" should replace the pointer with Sammy's original blue dot, but that also replaces the mouse pointer, not sure if that's a price you're willing to pay. I don't plan to get a Tab S* or any productivity-oriented tablet in the near future, so I won't work on improving this just yet. Note to others: if you notice another AOSP-based ROM with a better solution, do notify me.
  2. Unsurprisingly this device has FOD. I only inherited the FOD solution from PHH/TD, never took a look at it, so I'm not entirely sure what could be wrong either - a crude guess would be wrongly reported FOD X/Y coords, esp. under landscape.
  3. I've heard from a Tab S7 user that it worked for him (in fact he was the one who pointed out that the above pointer replacement also affecting mouse).
  4. Perhaps one of the audio options in Treble settings might help?

Sounds like your device has an ill-defined overlay - the "center" option is only removed when there's a center cutout defined.

Trust's notif can be disabled, after which it shouldn't affect daily usage.
Encryption is a vendor-specific thing, and by now all modern devices default to enabled. Most vendors are now also read-only (EROFS and such), so you can't even change the fstab to disable that.

Logcat me the crash, I'll check for the obvious.
BTW, I own a Sammy Note10 5G, which happens to be my only device on TD-based (the rest are all on "Light"). It doesn't crash like you described.
I don't mind giving up the generic mouse pointer for a pen pointer.

I'm wondering if you know of some way to query the charge level #/status (charging/not charging)? Not necessarily with a GUI, perhaps terminal commands or something? I know that the pen charges when it's "docked" to the back of tab/inside phone, it's easy to deduce this, since when it's not working, or barely working, it's either battery low or dead. And after a time of docking it, i can usually use it again within 15-20 mins. At some level, GSIs recognize the pen because they're charging it, but I wish I knew of a way to be sure.
 

AnonVendetta

Senior Member
Apr 29, 2016
1,563
562
I have a VNDKLite enabled phone (Moto G Power 2021). Is that what you're talking about when you say Known but will not implement/fix:
Compatibility with legacy (pre-A10) devices, A-only, VNDKLite? Screenshot of Treble Info attached
My devices supports all of the options shown in your screenshot, except "seamless upgrades". For some reason, Samsung is just too damn stubborn to adopt true A/B slots on their devices. In the same vein, they also refused to implement adoptable storage, despite it common amongst other manufacturers.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Updated all variants with May security patches and in sync with TD 20230429. [Insert obligatory backup-and-test warning here]
    3
    Lecture you? Dude, by installing just one Google app after your MicroG exhbition all that you said above failed down deep in the water so better revise your thinking from ground up :D
    Unfortunately, Play Store is a necessary addition to MicroG. And it's otherwise the only not open source Google app i include. It's pretty much the only way to buy apps or make in-app purchases. And some apps check their licenses to make sure they're not pirated. Without PS, this isn't possible, not without resorting to other apps/methods that coincidentally are forbidden for discussion by XDA rules.

    If "revise your thinking" means "switch back to GApps" or "buy an iPhone"....no thanks. If I'm just going to play by the accepted rules that Google and the manufacturers push, then this means that I should only run stock ROMs, always keep bootloader locked, etc. No to that too.

    On this, we can agree to disagree, and that's the end of this line of conversation, I'm drawing the line by deciding it's not worth discussing with you anymore. It all started because you asked "Why not just flash G variant than?" I interpreted this as you not being aware of MicroG, or why some would choose it over GApps.
    2
    It's strange really, flashed week ago or so and still no stats. We'll keep on looking but at least I know it's me and not for rest of you guys, ✌️
    Oh, gotta say I debloated a ton of apps from it so I may exaggerated a bit lol
    You probably debloated too much. There's not much of a point in doing so, LOS is very clean, even the GApps builds. If you want a gsi that doesn't need debloating, go for Phh's AOSP vanilla builds. No fluff, just raw Android. And its' bugs will be 99% the same as this LOS. For GApps, use vndklite and flash MindTheGApps on top, if you have TWRP.
    2
    @syneoa: I suggest reflashing the gsi, then using this to debloat:


    It doesn't really delete anything, so if you debloat too much, just edit your config file and reflash the mod zip. Anything you've "deleted" will be back.

    You can also do real deletion without a module, but then it will be harder to put something back if you make a mistake.

    For deleting mobile data stuff, I guess you missed the "remove telephony subsystem" option in Phh Treble Settings, Misc menu.
    2
    So, how I see it, you're using unofficial, spoofing method to interact with Google services and putting yourself at risk of being more vulnerable security wise and potentially being banned with your Google account indefinitely.
    Why not just abandon Google ecosystem and move to Microsoft or Apple or use any of so called dumb phones?
    Although I respect open source projects I dislike the methods used.
    It's either I use official Play Services and give them more data, more battery usage, etc, or I use an open source solution that respects my privacy. Both sides have negatives/positives.

    With the way Treble gsis have implemented signature spoofing, it's not so much of a security risk. Spoofing only gets granted to privileged system apps, not user apps. Which means MicroG must be installed in the system partition, or else it won't be granted the spoofing permission. And I'm not aware of anything else besides MicroG that actually make use of this spoofing. Or exploits/vulnerabilities that use it.

    And because I have to manually install MicroG on LOS, due to it not being bundled, there is an implicit acceptance on my part of any risks involved.

    I don't care if Google bans my account, I would only lose access to Gmail and a handful of paid apps. The risk of being banned is very low, I challenge anyone here to point out even 1 proven instance of someone being banned due to using MicroG.

    There's no possibility that I would ever consider Apple's mobile products, I absolutely despise how their stuff is totally locked down. With Android, at least the OS is open source, even if the Google components aren't. Can't say the same for Windows or iOS.

    Sometimes it is necessary to use not widely accepted methods to accomplish a goal. Let the end suit the means. I pride myself on being willing to be adaptable and flexible, oftentimes opting for maverick approaches to solving a problem. Think outside the box, as they say.

    And speaking of security, don't even try to lecture me. By running this gsi or any other, you have already accepted that you must at least unlock your bootloader. And if you listen to the powers that be, that's a bad thing too, a security risk. Both you and I have accepted this risk. By their very nature, gsis are unofficial. Since we have both accepted this risk, then I deem it no less OK for me to accept any risks of going against the grain by using MicroG instead of Play Services.
  • 25
    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.
    Earlier, inspired by @PeterCxy , I took the "light" approach, which starts over from AOSP's generic gsi_* target and adds the minimum amount of fixes needed for my own devices, intentionally leaving many legacy devices behind. For more details about it, visit its own thread.
    Meanwhile, 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. This thread contains LOS builds based on TrebleDroid's collective work, which supposedly suits legacy devices, Samsung, etc. better than "light".

    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.

    MUST-READ - reporting bugs:
    If you want to report a bug, then you MUST try reproducing on an AOSP reference build of around the same date from TrebleDroid, and ONLY proceed to report here when it's specific to this GSI. This filters out bugs common to all TD-based GSIs, which you should still let me know, but it might not be mine to fix. I might silently ignore your report if you skip this.

    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
    • @phhusson - shaped the treble community, and still takes care of TrebleDroid at a higher level
    • @PeterCxy - coded critical fixes such as sysbta
    • The TrebleDroid builders
    • ...and more
    Donate?
    https://paypal.me/AndyCGYan
    7
    Updated all variants with April security patches and in sync with TD 20230417. [Insert obligatory backup-and-test warning here]

    All modern Xiaomi/Redmi devices should be able to see high refresh rates now (if supported), without having to spoof properties globally.
    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.
    • I now daily-drive "light", so I can't test TD-based builds as extensively as before. For the same reason, I likely won't build/upload any TD-based "personal" build either.
    • While most >=A13 GSIs out there are going to be TD-based, some perform better than others - some devs have their own patches that haven't been merged into TD yet. I myself will stay close to TD's raw patchset as much as possible, without picking patches from others left and right. If you find another GSI working better, don't just complain - try to narrow down which ones, and the intersection of them might be an unmerged patch that, if approved, would be merged into TD and benefit all.
    • 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.
    • On *S variants, install PHH-SU and you'll get basic root for apps, good for devices that don't play well with Magisk or when you don't need modules.
    • Refer to this post for explanation/workaround of an MediaTek-specific kernel bug that causes no internet.
    6
    Updated all variants with Android 13 QPR2 and March security patches. [Insert obligatory backup-and-test warning here]

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

    Fixed in-call audio on Snapdragon 8 Gen 2 (SM8550), tested on OnePlus 11, should pave the way for future QCOM SoCs as well. Users of other SM8550 devices like Xiaomi 13 and RedMagic 8 Pro/+ might want to try this out too. Also pushed to TD upstream, so in case you don't like LOS, it's still coming to your favorite TD/-based GSI later.

    Imported some SN fixes from HentaiOS - GAPPS users should now get CTS profile match as well.

    Fixed videos sometimes getting stuck after pausing and resuming, thanks @Cozzmy13 for working it.

    Fixed two-pane layout in Settings for tablets - set an appropriate density then force stop Settings for it to take effect.

    And finally for builders, starting this month LOS has moved to Git LFS for hosting their Chromium webviews. Please re-init the repo with "--git-lfs" flag BEFORE syncing again or you will hit errors. If you already have a bad sync, clear the residue and re-init:
    Code:
    rm -rf external/chromium-webview/prebuilt/*
    rm -rf .repo/projects/external/chromium-webview/prebuilt/*
    rm -rf .repo/project-objects/LineageOS/android_external_chromium-webview_prebuilt_*
    5
    Updated all variants with January security patches and in sync with TD 20230104. [Insert obligatory backup-and-test warning here]

    During my CoV downtime, A13 QPR1 happened and TD-based had a lot of changes as well, which accumulated to this month and I had to update more patches than expected (way more than "Light" - lower maintenance is why I made that in the first place). I might've made oopsies along the way, so I don't feel quite confident about this batch, and you should exercise extra caution.

    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.phh.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!

    Properly fixed exfat for Samsung/Sony, tested on the one Sammy I still own.