[Samsung Galaxy Tab A series Guides, News, & Discus] agreenbhm:
Update: March 24 2022: This ROM has been retired and a new one based on LOS 19.1 (and TWRP based on Android 11) have taken its place. New thread here: https://xdaforums.com/t/rom-sm-t500...4-2020-lineageos-19-1-and-twrp-3-6-1.4421365/

---

Update 9:46am EST July 15 2021: new builds of TWRP and LineageOS with TWRP touch fixed and LOS w/ space for Gapps is now live.

WARNING: USE AT YOUR OWN RISK.

I have successfully ported TWRP and Lineage OS 18.1 to the Samsung Galaxy Tab A7 10.4 (2020), aka SM-T500. This is my first time porting TWRP or LOS, so there may be issues unknown about at this time. Thus far, the only known issue is that the touchscreen in TWRP does not work. This can be worked around by using a USB mouse and/or accessing the device via ADB.

Here are the steps to follow:

Update your device to the latest stock ROM (as of this writing) either using the built-in system updater or via Odin. You want the build that ends with "3BUF3".

Unlock device bootloader using instructions from other threads. This will wipe your device.

Boot into download mode and flash "vbmeta_disabled_R.tar" via Odin in the "Userdata" slot to disable verified boot. This will wipe your device again.

Boot device back into download mode and flash TWRP via Odin in the "AP" slot. If you boot up into the stock ROM rather than booting directly back into download mode then go through the initial setup process of the stock ROM and enable developer tools and ensure OEM Unlocking is still enabled (VaultKeeper can possibly undo OEM Unlocking if you get to the ROM but don't go into Developer Tools and view OEM Unlocking is enabled, so make sure to do this).

Boot device into TWRP (recovery mode) and format (not wipe) your data partition. Then reboot back into TWRP.

Push LineageOS (super.new.ext4.img) to device. Ideally push it to an SD card formatted with ExFat or EXT2/3/4 (FAT/FAT16/FAT32/VFAT won't work due to file-size limitations).

Install LineageOS image to "Super" partition. Make sure to select "Install from Image" in order to show .img files in the install selector screen.

(Optional) Push NikGapps Omni to your device and install the zip. Make sure you include a "nikgapps.config" file in your "/tmp" folder that is configured to install to "system" rather than "product" or "default".

Reboot to system. You should now be in LOS with Gapps.

(Optional, but recommended): Install Magisk via TWRP

(Optional, but recommended): Run fix script to fix brightness slider not working and to make Magisk work. If you didn't install Magisk but only want the brightness fix, just enter "n" when prompted in the script. To run the script:

NOTE: Script has .txt file extension to allow hosting on AFH. Remove that so it's just .sh to match the instructions below.

Download and push to device when booted into TWRP

adb push sm-t500_fixes.sh /tmp

Enter an adb shell

adb shell

Change directories and set permissions

cd /tmp

chmod +x /tmp/sm-t500_fixes.sh

Run script

/tmp/sm-t500_fixes.sh

Tips:

If you are not seeing all of your storage space in the OS on the internal flash, boot to TWRP and format data.

Flash TWRP via "AP" slot and flash VBMeta_Disabler via "Userdata" slot in Odin.

Flash LineageOS as an Image, not as a Zip.

For Gapps, use the latest NikGapps for ARM64 and Android 11/R.

For Gapps, make sure you install to the System partition and not Product. To do this you need to slightly modify a nikgapps.config file. Instructions on that can be found on the NikGapps site.

Downloads:

LineageOS 18.1 20210615 Beta 2: https://www.androidfilehost.com/?fid=14943124697586369438

TWRP 3.5.2 Beta 3: https://www.androidfilehost.com/?fid=14943124697586369439

vbmeta_disabled_R: https://www.androidfilehost.com/?fid=14943124697586369440

Fixes for brightness and Magisk (sm-t500_fixes.sh): https://www.androidfilehost.com/?fid=14943124697586369521

Known Issues:

OS-encrypted storage (Internal Data) not able to be decrypted in TWRP.

Brightness controls don't work: Fixed via "sm-t500_fixes.sh script.

TWRP touch screen doesn't work (use USB keyboard or adb). Should be fixed with TWRP Beta 3.

TWRP formatting external SD card may hardbrick device. Do not do this! Fixed with TWRP Beta 2.

Source (device tree for TWRP from my Github): https://github.com/agreenbhm/android_device_samsung_gta4lwifi

Source (kernel sources from Samsung): https://opensource.samsung.com/uploadSearch?searchValue=Sm-t500#