yashsingh1/xdaforums huggingface dataset:
[Galaxy Tab S2 Android Development] aljazzair:
Thank you for your feedback.

The way I installed the ROM and various Gapps each time is:

- reboot to TWRP (same version as yours )

- Swipe to Factory Reset + Format Data + Advanced Wipe > Dalvit/ART, System, Data, Internal Storage, Cache (basically checked everything except MicroSD/USB)

- Reboot to TWRP before installing LOS

- Install LOS and Gapps together

- Boot to System and setup the device

Each time I changed the Gapps package, I did all that over again, maybe I am missing something, but I never intended to do a dirty flash even when switching Gapps.

The weird thing was Mindthegapps installed fine the first time, but the second time, after testing other gapps and wiping everything, I got error 1 when I tried to reinstall it. Also, looking at the logs, it mentioned a compatibility issue with Android 7 which is weird, maybe the tablet keeps a copy of the OEM system install on a partition somewhere?

Regarding the two other issues:

- Sound not outputting: I had settings with mixed languages. Next time I will test with just one language, maybe it's what messed up the sound output for Assistant. But the 'stock' Lineage Music app not outputting sound was weird and I doubt it is linked to language settings.

- RIL: today I left my tablet plugged to recharge for most of the day. I rebooted several times, and each time the SIM was recognized except earlier in the day when the battery was close to or lower than 20%. It may be too early to tell, but I am wondering if there is a correlation between low battery and SIM being detected. My tablet is old, and in the past it sometimes would turn off when the battery is low.

My sim card does not require a pin code.

But if by PIN you mean unlocking the tablet itself, I must admit I am very quick at doing that every time.

I will refrain from unlocking the tablet rapidly, and see if it helps.

When the sim is detected, it does take a while to show up on LOS18, indeed about 30 seconds according to adb logcat for radio.

I will keep on testing.

Thank you again for making these builds available to us.
[Galaxy Tab S2 Android Development] aljazzair:
No arm64 would install on my T815 either. I assumed it was only Snapdragon tablets that were arm64 and not Exynos?
[Galaxy Tab S2 Android Development] kartik_09:
yes u r indeed correct, (partially) as the exynos 5433 was actually a 64bit chip, but was locked down to 32bit via the lower level bootloader, and in order to modify the lower level bootloader u would require UART access, which is the low level programming acces to the tablet, and samsung probably did not make a 64bit lower level BL because of no actual earning by this or this could be for the fact that it was simply impossible for them aswell, and they prob just decided to do it 32bit as it launched with android 5 which did not support 64bit cpu, while the SD version of the tablet launched with android 6 which from start supported 64bit

But judging on the fact that he said he used an arm64 package for it and it is the package in his drive, got me a bit too confused

And also 64bit package would not aswell install on all the roms i used as it said the device is 32bit
[Galaxy Tab S2 Android Development] MrBrause:
This was all mentioned in here:

https://xdaforums.com/t/exynos5433-...sion-for-20-roms-sm-t710-and-sm-t810.4600455/

This idea to try arm64 was born because I did not found arm for Android 13 for my favourite OpenGApps package.
[Galaxy Tab S2 Android Development] MrBrause:
The BPF errors start as soon as you leave the airplane mode and they stop as you enter airplane mode. But wifi itself is working although you receive the errors.

EDIT: These errors are also present if I do not install any GApps-package.
[Galaxy Tab S2 Android Development] MrBrause:
The only difference is that I turn on "rm -rf" in Settings to remove possible encryption.
[Galaxy Tab S2 Android Development] retiredtab:
The above messages are because our kernel is too old to support eBPF. We need hacks to make Android 12+ even possible.
[Galaxy Tab S2 Android Development] retiredtab:
I don't use gapps, but 3 people in our pre ALPHA test group use them and I reported what works at that time. Specifically, if you look at post #21 at

https://xdaforums.com/t/unofficial-...t710-feb-21-2024.4600533/page-2#post-89133524

The exact version is given as to what works. You don't NEED the latest version because Google Play will update itself silently in the background when it checks for updates. Sometimes the "latest" version doesn't work and going back to an earlier version does.

Since I don't use gapps, I will NEVER write any guides on which to use. Also, as I stated in the which gapps to use discussion, "It's your responsibility to put in some hours of research to find out what gapps works for you."

Even if I used gapps, I'm not going to test each and every project and release to make sure it works with exynos5433. Some projects are better than others, some are completely UNTESTED, some have well written documentation if users bother to read them. Some "popular" gapps projects are completely abandoned and just because it's popular doesn't mean it's good either or tested.
[Galaxy Tab S2 Android Development] MrBrause:
Yes, I spent a lot of time on reseaching. The last thing I've tried was to set

ro.kernel.ebpf.supported=false

in either system.prop or overriding it with the BoardConfigs

and similar things dealing with BPF for older kernels (like patches working on for example BpfLoader.cpp).
[Galaxy Tab S2 Android Development] MrBrause:
Thanks for opening this discussion. Very helpful.
[Galaxy Tab S2 Android Development] aljazzair:
Hello,

I tried LOS20.

Initial test without Sim Card or SD card inserted.

Installation procedure:

- reboot to TWRP (same version as OP i.e. latest for T815)

- Advanced Wipe > Dalvit/ART, System, Data, Internal Storage, Cache (basically checked everything except MicroSD/USB)

- Format Data

- Advanced Wipe > Select System > Repair or Change FS > Format to FAT, then repeat to Format system partition to EXT4 (this is an attempt to avoid /mnt/system mounting issues previously mentioned)

- Reboot to TWRP before installing LOS

- Install LOS / Gapps* / Magisk sequentially via ADB

- Boot to System and setup the device

I get:

Welcome to LineageOS screen, allow USB Debugging for my Linux machine

Accessibility Settings => Image is not centered, the V for Vision Settings is partially off screen

I selected the highest font and display settings, as I usually do, and things now appear OK

Select Language, skip network setup, allow access to location and GPS data download

Leave Lineage Recovery prompt unchecked

Setup pattern to lock tablet

Tablet is booted up!

I like Android 13 interface, it feels very soft and intuitive!

Launching the default apps is very fast and responsive.

Many thanks for sharing the build and for your hard work!

I will be putting the tablet through a day or so of intensive use, and report my findings.

*NikGapps-basic-arm64-13-20230716-signed
[Galaxy Tab S2 Android Development] MrBrause:
Great. Looking forward your feedback.

Sent from SM-G930F using ReLabs
[Galaxy Tab S2 Android Development] retiredtab:
The above is already there since 19.1 during initial bring up as per (just past 2 years).

"shivatejapeddi authored and retiredtab-gerrit committed on Mar 26, 2022 "

https://github.com/retiredtab/andro...mmit/883a46487a72150a8c828c9bdca1b88ff582c65d

and lives in 20 at

https://github.com/retiredtab/andro...mmit/883a46487a72150a8c828c9bdca1b88ff582c65d
[Galaxy Tab S2 Android Development] kartik_09:
I aswell tried LOS20 for t815y, installed it yesterday night and the idle drain was improved a lot, only drained 1 percent over the night, whhich is abt 9-10 hours, but i tried now to reflash the LOS20 with nikgapps-stock instead of basic because just my preferance, and well that didnt work, they probably patched the gapps or something to show error with arm32 devices(my guess) so went back to basic,

Initial impression of this thing on android 13 is really good, the UI is like butter, and i really liked the new material you UI, its smooth and soft,

and havent saw a bug till now, ( probably because i didnt use it for more than 5 or 10 minute)

Will probably do a feedback or smth if u want
[Galaxy Tab S2 Android Development] kartik_09:
Btw is there any possibility that fingerprint might be re-added to the rom, as even though FP unlock does not work, it still was usable for locked apps, FP lock in different apps or FP unlock for a locked chat, and now im completely unable to lock them(whatsapp chats)
[Galaxy Tab S2 Android Development] kartik_09:
Was this me or did anyone else notice the tablet getting super hot, almost enough to make your hands burn after abt 1 min of use after waking up and lagging a lot on LOS20 for t815
[Galaxy Tab S2 Android Development] aljazzair:
I did not notice unusual heat or lag after wake up.

Did you try the audio output?
[Galaxy Tab S2 Android Development] kartik_09:
Well i actually have a completely different issue with google assistant, which is that it never worked on my tablet using any gapps package on any custom rom i tried

And will try reflashing with mindthegapps now to see if gapps might be the culprit or a bad install( it was a clean install though)
[Galaxy Tab S2 Android Development] kartik_09:
Also the battery caliberation was messed up a bit ( by abt 10 or 15 percent) compared to TWRP and the LOS18 rom i had when installing it and the kernel reported me 4000mah battery which was T7xx battery size while this is the T815
[Galaxy Tab S2 Android Development] kartik_09:
Well mindthegapps arm does not work here aswell, it says unable to mount system even after a reboot in recovery and manually mounting it
[Galaxy Tab S2 Android Development] aljazzair:
Hello

I have done some more testing with both LOS18 and LOS20 for T815.

1) I think the audio issues I have reported before may be attributable to Gapps.

I noticed that installing Nikapps Core results in a better experience with regards to Audio.

2) I tested RIL, it works, albeit sometimes yes sometimes not.

This may be a hw issue with my device as my sim tray broke inside the slot a while back, which required servicing to remove the broken piece.

The issue is present on LOS17 as well on my device.

3) The following may be attributable to LOS20 in my humble opinion:

GPS is not working as it should on LOS20.

It is very difficult to get a fix, much more difficult than with previous versions.

To test this I wiped everything, installed LOS and Nikapps Core and app called GPS Locker from the same location:

- with LOS17 (ripee): the initial fix takes around 90 seconds, and I see about 10-15 satellites

- with LOS18 (@MrBrause ): the initial fix takes around 90 seconds, and I see about 10-15 satellites

- with LOS20 (@MrBrause ): cannot get a fix, the device sees 1 or 2 satellites, with weak signal

I did this three times for each, with complete wipes in between, and every time the result was the same:

LOS17 and LOS18 get a GPS fix, LOS20 does not.

I am available to provide logs, would appreciate it if you could test GPS on your end.

Thank you.
[Galaxy Tab S2 Android Development] eduyl:
@MrBrause The audio issues with maps, assistant and lineage music app somehow doesn't exist in the los20 I built for my t815 except for the bluetooth audio( I havent tested it yet). Most probably it's because of the kernel or some other things I don't know because the audio policy configuration works perfectly fine on my device. Also are you using 3.10.108 or 3.10.9 kernel version?
[Galaxy Tab S2 Android Development] aljazzair:
Hello

Thank you for reporting your experience. I have two questions:

- What Gapps package did you pick if any? (source and exact version would be nice)

- Can you please test if your GPS can get a fix on your tablet?

It is very easy to test with a free app such as this:

GPS Test - Apps on Google Play

Get GPS and sensor information all in one place with an accessible format

play.google.com

Thank you
[Galaxy Tab S2 Android Development] aljazzair:
Further on the GPS issue with LOS20, I noticed the following lines in adb logcat:

W sh : type=1400 audit(0.0:7195): avc: denied { getattr } for path="/system/bin/toolbox" dev="mmcblk0p19" ino=1152 scontext=u:r:gpsd:s0 tcontext=u:object_r:toolbox_exec:s0 tclass=file
W sh : type=1300 audit(0.0:7195): arch=40000028 syscall=327 per=800008 success=no exit=-13 a0=ffffff9c a1=ac657284 a2=be975d00 a3=0 items=1 ppid=29588 ppcomm=gpsd auid=4294967295 uid=1021 gid=1000 euid=1021 suid=1021 fsuid=1021 egid=1000 sgid=1000 fsgid=1000 ses=4294967295 tty=(none) exe="/system/bin/sh" subj=u:r:gpsd:s0 key=(null)
D gpsd : WakeLock(Release,GPSD)
F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xada83780 in tid 29934 (gpsd), pid 29588 (gpsd)
F DEBUG : Cmdline: /vendor/bin/gpsd -c /vendor/etc/gps.xml
(...)
[c2] init: Service 'gpsd' (pid 29588) received signal 11

Spoiler content hidden.

@MrBrause is there something you could suggest I do to resolve this?

Thank you.
[Galaxy Tab S2 Android Development] retiredtab:
The above is a bug I already fixed in Dec 2, 2022 as per

https://github.com/retiredtab/propr...mmit/e187d755b8ef9fcd3abf86b25f67f96263c38d35

and metterschling applied to T715 as per

https://github.com/metterschlg/prop...mmit/ff3287167d4cc1f990854132cac1817e4a4ef5ac

Here's the same patch for the T815 gpsd file. I downloaded the unpatched gpsd from

https://github.com/metterschlg/prop...ts210ltexx/proprietary/system/vendor/bin/gpsd

and did the following

$ ./patchelf-0.9 --replace-needed libutils.so libutils-v32.so gpsd
warning: working around a Linux kernel bug by creating a hole of 1527808 bytes in ‘gpsd’
$ sha1sum gpsd
016b4b142304f1f0a4dcfab2b30cc83dee44efb6 gpsd

To use this patched gpsd, you need to

1. Download zip and unzip patched gpsd
2. Boot into TWRP.
3. In TWRP, touch mount system (to mount system partition)
4. Open a terminal or command prompt on your PC computer.
5. Use adb to push the patched gpsd into the correct directory using the command below
adb push gpsd /system//vendor/bin/gpsd
6. Verify patched gpsd got pushed properly by comparing the sha1sum (it should match above)
adb shell sha1sum /system/vendor/bin/gpsd
## EDIT. See post below for part #2 of this patch.
7. If yes, then reboot into OS and retest gps. It should work now.
[Galaxy Tab S2 Android Development] retiredtab:
Here's part 2 of the patch. Verify that this file libutils-v32.so exists

https://github.com/metterschlg/andr...mmit/89358a9e2fff6ec74b67ab96cc1fc4668cc416df

by

# Open a terminal or command prompt on your PC.
$ adb shell sha1sum /system/vendor/lib/libutils-v32.so
44237e351bbfbe6f6b4a69f1ba4aebf903fa9885 /system/vendor/lib/libutils-v32.so

This can be done in TWRP at any time in the above post. That file SHOULD already be there. Again the sha1sum should match.
[Galaxy Tab S2 Android Development] aljazzair:
Many thanks for taking the time to review my previous post and provide these instructions.

Here is what I did:

- Downloaded the zip file attached above on my linux box, unzipped

- Checked the gps daemon file SHA-1 hash against the one you provided

- Wiped tablet (I had installed LOS18)

- Pushed gpsd to my external sdcard using adb

- checked the SHA-1 hash on the external sdcard

- installed LOS20, NikappsCore arm64 (07162023) alongside a couple of corresponding addons (Wellbeing, Clock, Device Health) as well as Magisk Delta Kitsune via TWRP

- Wipe Dalvik & Cache, Reboot to Recovery

- Mount System on TWRP

- Via ADB shell, checked hash of existing gpsd, confirming it is a different file

- Via ADB shell, checked the presence of /system/vendor/lib/libutils-v32.so

- Via ADB shell, verified the SHA1 hash of /system/vendor/lib/libutils-v32.so

- Boot to system, basic setup for testing purposes

- Settings > Location > Turn off Google Accuracy, Wifi & Bluetooth to be in pure GPS mode

- Installed GPS apps (GPS Test, GPS Status & Toolbox, GPS Data, GPS Locker)

- Boot to recovery

- Mount System on TWRP

- Via adb shell, backed up the existing gpsd file and

- copied the new gpsd file you provided over the old one at /system/vendor/bin/gpsd

- Booted the tablet to System

- Fired up a GPS App

Result: No GPS fix at all.

Via adb, checked that the gpsd file has indeed the proper checksum:

gts210ltexx:/ # sha1sum /system/vendor/bin/gpsd
016b4b142304f1f0a4dcfab2b30cc83dee44efb6 /system/vendor/bin/gpsd

Time to look at adb logcat, I notice this:

adb logcat | grep -i -e gps -e bcm

E [c7] init: cannot execv('/vendor/bin/gpsd'). See the 'Debugging init' section of init's README.md for tips: Permission denied

!! All the files in the /system/vendor/bin directory ownership was root:shell

Whereas the gpsd file I copied over was owned by root:root

Also, gpsd is did not have the executable attribute !!

# ls -ltah /system/vendor/bin/gpsd
-rw-r--r-- 1 root root 5.8M Apr 4 10:49 gpsd

whilst the other executables look like:

-rwxr-xr-x 1 root shell 177.9K Jan 1 2009 argosd
-rwxr-xr-x 1 root shell 101.6K Jan 1 2009 awk
(etc...)

so i did:

chmod +x /system/vendor/bin/gpsd
chown root:shell /system/vendor/bin/gpsd

/system/vendor/bin # ls -ltah gpsd
-rwxr-xr-x 1 root shell 5.8M Apr 4 10:49 gpsd

Reboot to system

Fire up a GPS App:

View attachment 6088134

THANK YOU @retiredtab !!

:)

Time to put my old tab to use in my good old SUV:

View attachment 6088146
[Galaxy Tab S2 Android Development] aljazzair:
Update on LOS 20:

Have reinstalled the OS alongside NikGapps Core and some basic addons, which resolved my audio issues. The GPS patch mentioned above works perfectly.

Added Magisk Kitsune with Zygisk, with a module to create 3GB Zram partition.

Use Hail to freeze apps that are not in use & save ram, Island to manage work profile.

KDE Connect for interactions with Linux.

Nova Launcher to customize the interface:

View attachment 6090620

Been testing LOS20 intensively, as a Navigation / Phone / Media device in my SUV.

The tablet is much more pleasant to use with LOS20, than with previous versions.

As this is an Alpha build, there were occasional hiccups, but all in all nothing that would make me stay away from it (crossing fingers).

The only thing that is a bit frustrating is the inability to use a Bluetooth device for calling, which is expected as per the release notes.

Also, looking at the volume of messages in logcat is a bit scary, not sure if it's the result of a verbose setting, or if it is the same on previous builds as well...

As I have a Linux box, I would very much like to learn to make builds to keep everything updated!

The tab S2 form factor, light weight and Super Amoled screen are just perfect.

Thanks again to @MrBrause @retiredtab @metterschling and everyone else for making this possible!
[Galaxy Tab S2 Android Development] MrBrause:
Thanks for your feedback and intensive testing.

I am still dealing with the log-messages also. They are mostly still concerning BPF and some other strange errors during the build-process. I will commit the gps and ril-fixes in Github as soon I reach a stable build without high-volume log-spams. I also tried my mixer-path-file from the 18.1 commit and was able to make at at least a telephone-call. I am not sure if I am able to crack the hard nut with bluetooth and the fingerprint, as the senior-members dealed with these topics as well, but I will try.
[Galaxy Tab S2 Android Development] retiredtab:
If you want to change the size of the zram partition, you don't need a 3rd party module to do it. You can change line 21 in the file called fstab.universal5433

https://github.com/retiredtab/andro...x/blob/20-r22/rootdir/etc/fstab.universal5433

1. # reboot into TWRP
2. # Touch Mount System (to mount /system as read/write)
3. # open up a terminal or command prompt on your PC
4. # use adb pull to get the file
adb pull /system/vendor/etc/fstab.universal5433
5. # use your favourite text editor to change 50% to 75% if you want to try more zram
6. # save changes
7. # use adb push to put updated file
adb push fstab.universal5433 /system/vendor/etc/fstab.universal5433
8. # reboot back into OS
9. # Note this has to be done EVERYTIME you update the rom

Having said that, I've never seen zram set to 100% and I highly doubt zram will ever be that efficient.

If you want to make builds, you need at least 32 GB DRAM, dual core CPU, some Ubuntu based distro (I use Lubuntu).

If you don't have 32GB DRAM, you can use a combination of zram-config and traditional swap on either SSD or hard disk. For example, if you have 16GB DRAM, then use zram-config (default is 50% of physical DRAM) and make a 16GB swap partition. This will give you 24GB swap in total.

sudo apt install zram-config
# reboot
[Galaxy Tab S2 Android Development] retiredtab:
Also, the zram implementation in the 3.10.x kernel is realy old. I expect newer versions to be faster, better and more efficient.

I recently started using zram-config on all my systems at home and wished I would have learned about it way earlier. When compiling roms, I've seen it hit almost 4:1 compression ratio in DRAM.

PS. Depending on your PC specifications, building LineageOS 20 can take several hours. I forgot to mention you probably need at least 250GB disk space. However, I've been experimenting and using btrfs file system with zstd compression and I can fit the source code, build files, etc in about 150GB.
[Galaxy Tab S2 Android Development] aljazzair:
Thank you very much for drawing my attention to this. The Magisk module I use defaults to 3GB, I did not think it through and you're right setting it to 100% does not make a lot of sense.

I noticed that by default, in LOS20, zram seems to be set at 50%

So I tried to set it to 1G using the zstd algo, for testing purposes.

The logic behind that choice was a simple computation of the purported compression benefit vs lz4 (up to 0.7 AFAIK).

I ran this command to find out whether zstd was supported:

adb shell zstd -vV
*** zstd command line interface 32-bits v1.5.1, by Yann Collet ***
*** supports: zstd, gzip, lz4

However, when I set the zram to zstd using the module, I got a message that says 'zstd not supported' so I assume the zstd functionality for zram compression might not be enabled in the device's kernel?

Would that be something easy to do/beneficial?

I understand that zstd is supposed to be very good in general, and that its relevance depends on the specific hardware in use. I can see it is preferred by some here on xda, but I am not 100% sure how it would fare on Exynos 5433.

It could be a nice to add to a future build if not too time consuming, to test in real life, assuming this is something that was not tried before and ruled out.
[Galaxy Tab S2 Android Development] aljazzair:
Thanks for those details.

My linux box uses a 8700K CPU so 12 cores that reach 4.9Ghz with a slight overclock, with 32 GB of RAM at 2400Mhz.

I tried to find examples of people compiling LineageOS on that kind of HW, I can see it is mostly likely several hours, probably between 4 and 6 if I am not mistaken.

However I run a variant of Arch Linux on my box, not (L)Ubuntu, running KVM-Qemu with several VMs on top. My file system is ZFS, it makes use of zstd where useful & the storage devices managed are diverse (NVME, SSD, HDD).

I can probably spare 150 Gigs on an NVME that currently has 300Gig space left, other than that I have several TBs available on spinning disks, but I am not sure those are fast enough for this purpose.

I am going to investigate using ZRAM on my system as well, this is something I have never tried.

Does the Linux system have to be debian based for the compilation of LOS to be relatively easy?

If yes, would compiling in a VM provisioned with dedicated cores and sharing memory with the host be a viable option?

I know any linux distro is supposed to work, and there is a lineage-development package available in AUR, I am just not sure how complicated it would be to transpose existing work in a different linux environment.

Thank you.