[ROM][SM-T500] Samsung Galaxy Tab A7 10.4 (2020) - LineageOS 19.1 (and TWRP 3.6.1)

Search This thread

agreenbhm

Senior Member
Jun 14, 2010
245
144
USA
Samsung Galaxy S21
Hello world, I have successfully built LineageOS 19.1 with Gapps for the SM-T500 (Tab A7 10.4 2020) using Andy Yan's LOS GSIs. Lineage is current as of 3/24/2022. I have also compiled TWRP version 3.6.1, based on Android 11 (previous release was Android 10-based). I have attempted to make this install as painless as possible. Please read the notes below carefully. WARNING: you are responsible for your own actions, so please be careful. If you brick something, that's on you.
  1. Update to latest stock ROM as of 3/24/2022 (T500XXU3BVB3).
  2. Unlock bootloader using steps described in this thread. Make sure that after your device wipes and reboots after the bootloader is unlocked that you go through the setup wizard again and back into Developer Settings and enable OEM Unlocking. I think you need to connect to wifi for this option to appear, so if you don't see it try that.
  3. Boot to download mode, then install VBMeta Disabler via Odin.
  4. Reboot to download mode, then install TWRP via Odin.
  5. Reboot to download mode again, then install LineageOS via Odin.
  6. Boot to TWRP, push "fix_brightness.sh" to the device and run it, then format data.
That should be all that is necessary. If you get stuck in a loop with TWRP where you can't boot to system (seems to happen regularly to me) I included a script in TWRP that should get you out. From the TWRP cli run the command "exit_twrp". It will say "out of space" when finished (instantly). Then reboot to system. If for some reason that still doesn't work and you boot back to TWRP, repeat.

Known Issues:
  • OS-encrypted storage (Internal Data) not able to be decrypted in TWRP.
  • TWRP touchscreen seems to be unresponsive for several seconds upon first booting into TWRP. Just patiently wait a few seconds and try again.
  • You'll see errors in TWRP about /keyrefuge, etc. Ignore that. I believe it's related to the inability to decrypt internal storage using FBE.
  • Installing Gapps (Nik and Flame) doesn't work, but no worry because the ROM includes Gapps :)
  • Security: by default this ROM has root access and USB debugging (adb) is enabled unsecured. Anyone can plug into it and have full root access. So disable USB debugging if you don't want that! TWRP is the same way, though data is encrypted. Someone could install malware into your system partition though. In short, this is for hobbyists, not someone with security concerns.
Sources:
Files:
Updates:
  • You can update this ROM yourself by installing a new GSI to the system partition.
    • Download new GSI from here onto Micro SD card: https://sourceforge.net/projects/andyyan-gsi/files/lineage-19.x/
    • Boot into TWRP
    • Run command: blockdev --setrw /dev/block/mapper/system
    • Run command: dd if=/external_sd/<your_downloaded_gsi.img> of=/dev/block/mapper/system bs=1M
    • Wait for dd command to finish, then reboot into system. Don't forget to use "exit_twrp" command if you keep booting into TWRP.
 
Last edited:

agreenbhm

Senior Member
Jun 14, 2010
245
144
USA
Samsung Galaxy S21
Thanx! I must flash gsi via Odin over AP?
If by GSI you mean the Lineage .tar file I linked to, then yes. That particular file is more than a GSI, it is a super partition including the GSI, vendor, product, and odm partitions. Flash this via Odin to AP and in the future you can install standalone GSIs of Lineage using TWRP with the instructions at the bottom of the post.
 
  • Like
Reactions: torekiki

lewmur

Senior Member
Apr 30, 2011
2,462
523
After formatting data, tablet just keeps booting to TWRP. Won't boot to system.
 

hakkers420

Senior Member
Aug 29, 2010
104
4
Ontario
Hi thanks for all your work. Question , I do step 3 successfully and it boots to OS, but step 4 when I try to install TWRP it fails and when trying to boot I get error "Only official released binaries are allowed to be flashed(vbmeta)" and I need to reinstall stock OS for it to boot again. Any Suggestions what I may be missing or doing wrong?
 

agreenbhm

Senior Member
Jun 14, 2010
245
144
USA
Samsung Galaxy S21
Hi thanks for all your work. Question , I do step 3 successfully and it boots to OS, but step 4 when I try to install TWRP it fails and when trying to boot I get error "Only official released binaries are allowed to be flashed(vbmeta)" and I need to reinstall stock OS for it to boot again. Any Suggestions what I may be missing or doing wrong?
When you do step 3 and boot to the os make sure you verify that bootloader unlock is still enabled in Developer Options. If it is, I suggest reinstalling stock and then starting over.
 

hakkers420

Senior Member
Aug 29, 2010
104
4
Ontario
Good, that's what it should be. Try reflashing the vbmeta disabler again and then flashing TWRP.
So I tried that but it fails in Odin.


<ID:0/004> Added!!
<ID:0/004> Odin engine v(ID:3.1401)..
<ID:0/004> File analysis..
<ID:0/004> Total Binary size: 0 M
<ID:0/004> SetupConnection..
<ID:0/004> Initialzation..
<ID:0/004> Get PIT for mapping..
<ID:0/004> Firmware update start..
<ID:0/004> NAND Write Start!!
<ID:0/004> SingleDownload.
<ID:0/004> vbmeta.img
<ID:0/004> FAIL! (Auth)
<ID:0/004>
<ID:0/004> Complete(Write) operation failed.
<OSM> All threads completed. (succeed 0 / failed 1)
 

Attachments

  • PXL_20220325_153034586.jpg
    PXL_20220325_153034586.jpg
    374.3 KB · Views: 423

agreenbhm

Senior Member
Jun 14, 2010
245
144
USA
Samsung Galaxy S21
So I tried that but it fails in Odin.


<ID:0/004> Added!!
<ID:0/004> Odin engine v(ID:3.1401)..
<ID:0/004> File analysis..
<ID:0/004> Total Binary size: 0 M
<ID:0/004> SetupConnection..
<ID:0/004> Initialzation..
<ID:0/004> Get PIT for mapping..
<ID:0/004> Firmware update start..
<ID:0/004> NAND Write Start!!
<ID:0/004> SingleDownload.
<ID:0/004> vbmeta.img
<ID:0/004> FAIL! (Auth)
<ID:0/004>
<ID:0/004> Complete(Write) operation failed.
<OSM> All threads completed. (succeed 0 / failed 1)
I know I ran into this once the past few days but am having difficulty remembering exactly how I resolved it. I think your best bet is to start from scratch, reinstalling stock and doing a factory reset.
 

hakkers420

Senior Member
Aug 29, 2010
104
4
Ontario
On the page for unlocking bootloader that you provided are you supposed to do all 7 steps or can I just do up to step 3 and not worry about 4-7?
 

Noskilldode

Member
Apr 22, 2021
8
1
If by GSI you mean the Lineage .tar file I linked to, then yes. That particular file is more than a GSI, it is a super partition including the GSI, vendor, product, and odm partitions. Flash this via Odin to AP and in the future you can install standalone GSIs of Lineage using TWRP with the instructions at the bottom of the post.
I am a huge fan of GSI but doesnt realy understand what it is and how to use it ( this isnt my first account just forget my pw XD) so it would be a pleasure for me if you would write a few words about it thanks in advantage :_)
 

Noskilldode

Member
Apr 22, 2021
8
1
Hello world, I have successfully built LineageOS 19.1 with Gapps for the SM-T500 (Tab A7 10.4 2020) using Andy Yan's LOS GSIs. Lineage is current as of 3/24/2022. I have also compiled TWRP version 3.6.1, based on Android 11 (previous release was Android 10-based). I have attempted to make this install as painless as possible. Please read the notes below carefully. WARNING: you are responsible for your own actions, so please be careful. If you brick something, that's on you.
  1. Update to latest stock ROM as of 3/24/2022 (T500XXU3BVB3).
  2. Unlock bootloader using steps described in this thread. Make sure that after your device wipes and reboots after the bootloader is unlocked that you go through the setup wizard again and back into Developer Settings and enable OEM Unlocking. I think you need to connect to wifi for this option to appear, so if you don't see it try that.
  3. Boot to download mode, then install VBMeta Disabler via Odin.
  4. Reboot to download mode, then install TWRP via Odin.
  5. Reboot to download mode again, then install LineageOS via Odin.
  6. Boot to TWRP, push "fix_brightness.sh" to the device and run it, then format data.
That should be all that is necessary. If you get stuck in a loop with TWRP where you can't boot to system (seems to happen regularly to me) I included a script in TWRP that should get you out. From the TWRP cli run the command "exit_twrp". It will say "out of space" when finished (instantly). Then reboot to system. If for some reason that still doesn't work and you boot back to TWRP, repeat.

Known Issues:
  • OS-encrypted storage (Internal Data) not able to be decrypted in TWRP.
  • TWRP touchscreen seems to be unresponsive for several seconds upon first booting into TWRP. Just patiently wait a few seconds and try again.
  • You'll see errors in TWRP about /keyrefuge, etc. Ignore that. I believe it's related to the inability to decrypt internal storage using FBE.
  • Installing Gapps (Nik and Flame) doesn't work, but no worry because the ROM includes Gapps :)
  • Security: by default this ROM has root access and USB debugging (adb) is enabled unsecured. Anyone can plug into it and have full root access. So disable USB debugging if you don't want that! TWRP is the same way, though data is encrypted. Someone could install malware into your system partition though. In short, this is for hobbyists, not someone with security concerns.
Sources:
Files:
Updates:
  • You can update this ROM yourself by installing a new GSI to the system partition.
    • Download new GSI from here onto Micro SD card: https://sourceforge.net/projects/andyyan-gsi/files/lineage-19.x/
    • Boot into TWRP
    • Run command: blockdev --setrw /dev/block/mapper/system
    • Run command: dd if=/external_sd/<your_downloaded_gsi.img> of=/dev/block/mapper/system bs=1M
    • Wait for dd command to finish, then reboot into system. Don't forget to use "exit_twrp" command if you keep booting into TWRP.
thank you you did a amazing work
 
  • Like
Reactions: agreenbhm

agreenbhm

Senior Member
Jun 14, 2010
245
144
USA
Samsung Galaxy S21
I am a huge fan of GSI but doesnt realy understand what it is and how to use it ( this isnt my first account just forget my pw XD) so it would be a pleasure for me if you would write a few words about it thanks in advantage :_)
In short, a GSI is a special type of system image that is made to work across multiple devices. It stands for generic system image. The ROM that I included in the op is a super image which contains not only the system partition but also the vendor partition, which includes device specific drivers and things like that, plus a couple other partitions.
 

lewmur

Senior Member
Apr 30, 2011
2,462
523
What is the syntax to push the fix_brightness file? I have it on the extternal SD card. Can I just copy to a directory on the internal SD?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Thanks - I did that + found a different site for the source files (for some reason the new site files were larger by ~1gb) + used a different computer. From there it all went well. Got a bit paniced at 1am in the morning!
    If you are looking for the stock Samsung firmware, do a search for "frija". It is a tool developed by an XDA member to download directly from Samsung.
  • 20
    Hello world, I have successfully built LineageOS 19.1 with Gapps for the SM-T500 (Tab A7 10.4 2020) using Andy Yan's LOS GSIs. Lineage is current as of 3/24/2022. I have also compiled TWRP version 3.6.1, based on Android 11 (previous release was Android 10-based). I have attempted to make this install as painless as possible. Please read the notes below carefully. WARNING: you are responsible for your own actions, so please be careful. If you brick something, that's on you.
    1. Update to latest stock ROM as of 3/24/2022 (T500XXU3BVB3).
    2. Unlock bootloader using steps described in this thread. Make sure that after your device wipes and reboots after the bootloader is unlocked that you go through the setup wizard again and back into Developer Settings and enable OEM Unlocking. I think you need to connect to wifi for this option to appear, so if you don't see it try that.
    3. Boot to download mode, then install VBMeta Disabler via Odin.
    4. Reboot to download mode, then install TWRP via Odin.
    5. Reboot to download mode again, then install LineageOS via Odin.
    6. Boot to TWRP, push "fix_brightness.sh" to the device and run it, then format data.
    That should be all that is necessary. If you get stuck in a loop with TWRP where you can't boot to system (seems to happen regularly to me) I included a script in TWRP that should get you out. From the TWRP cli run the command "exit_twrp". It will say "out of space" when finished (instantly). Then reboot to system. If for some reason that still doesn't work and you boot back to TWRP, repeat.

    Known Issues:
    • OS-encrypted storage (Internal Data) not able to be decrypted in TWRP.
    • TWRP touchscreen seems to be unresponsive for several seconds upon first booting into TWRP. Just patiently wait a few seconds and try again.
    • You'll see errors in TWRP about /keyrefuge, etc. Ignore that. I believe it's related to the inability to decrypt internal storage using FBE.
    • Installing Gapps (Nik and Flame) doesn't work, but no worry because the ROM includes Gapps :)
    • Security: by default this ROM has root access and USB debugging (adb) is enabled unsecured. Anyone can plug into it and have full root access. So disable USB debugging if you don't want that! TWRP is the same way, though data is encrypted. Someone could install malware into your system partition though. In short, this is for hobbyists, not someone with security concerns.
    Sources:
    Files:
    Updates:
    • You can update this ROM yourself by installing a new GSI to the system partition.
      • Download new GSI from here onto Micro SD card: https://sourceforge.net/projects/andyyan-gsi/files/lineage-19.x/
      • Boot into TWRP
      • Run command: blockdev --setrw /dev/block/mapper/system
      • Run command: dd if=/external_sd/<your_downloaded_gsi.img> of=/dev/block/mapper/system bs=1M
      • Wait for dd command to finish, then reboot into system. Don't forget to use "exit_twrp" command if you keep booting into TWRP.
    4
    First time flashing Samsung, first time using heimdall instead of Odin in Archlinux. These are the steps I switched from Odin following the instructions from https://forum.xda-developers.com/m/agreenbhm.2655703/ on the first post in this thread https://forum.xda-developers.com/t/...eos-19-1-and-twrp-3-6-1.4421365/post-86632267 :

    #Installed Heimdall from AUR
    Install with AUR package manager of choice https://aur.archlinux.org/packages/heimdall-git
    ###Flash Untarred vbmeta_disabled_R.tar
    heimdall flash --VBMETA vbmeta.img --no-reboot
    ###Flash untarred TWRP
    heimdall flash --RECOVERY recovery.img
    ###Flash untarred and unlz4ed LineageOS
    heimdall flash --SUPER super.img
    ###Rebooted into TWRP
    adb push fix_brightness.sh /
    adb shell
    chmod +x fix_brightness.sh
    ./fix_brightness.sh
    ###Format Data in TWRP
    ###Reboot System in TWRP
    Kept rebooting into TWRP
    adb shell
    exit_twrp


    Worked well except the reported WiFI problem. XSA (Australia) variant.

    Tried following agreenbhm's instructions from https://forum.xda-developers.com/t/...eos-19-1-and-twrp-3-6-1.4421365/post-86693825

    #check for last version of stock firmware
    samloader -m SM-T500 -r XSA checkupdate
    #Download last version of stock firmware
    samloader -m SM-T500 -r XSA download -v T500XXU3BVB4/T500OLM3BVB4/T500XXU3BVB4/T500XXU3BVB4 -O .
    #Unencrypt it
    samloader -m SM-T500 -r XSA decrypt -v T500XXU3BVB4/T500OLM3BVB4/T500XXU3BVB4/T500XXU3BVB4 -V 4 -i SM-T500_1_20220304080951_2k076a7d3v_fac.zip.enc4 -o SM-T500_1_20220304080951_2k076a7d3v_fac.zip
    #Unzip
    unzip SM-T500_1_20220304080951_2k076a7d3v_fac.zip
    #Used Odin3 to flash
    BL -> BL_T500XXU3BVB4_CL23447145_QB49681114_REV00_user_low_ship_MULTI_CERT.tar.md5
    AP -> AP_T500XXU3BVB4_CL23447145_QB49681114_REV00_user_low_ship_MULTI_CERT_meta_RKEY_OS11.tar.md5
    CSC -> CSC_OMC_OLM_T500OLM3BVB4_CL23447145_QB49681114_REV00_user_low_ship_MULTI_CERT.tar.md5

    *Checks WiFi, it works.

    #Download Mode
    heimdall flash --VBMETA vbmeta_disabled_R.img
    #Reboot Download Mode
    heimdall flash --RECOVERY recovery.img
    #Boot into TWRP
    adb shell
    blockdev --setrw /dev/block/mapper/system
    dd if=/external_sd/lineage-19.1-20220320-UNOFFICIAL-arm64_bgS-vndklite.img of=/dev/block/mapper/system bs=1M
    #Reboot system
    Stuck rebooting in TWRP
    There is no exit_twrp anymore
    adb shell
    dd if=/dev/zero of=/dev/block/by-name/misc
    #Reboot system

    *Still reboot loops into TWRP
    When I wipe dalvik, data and cache. I get errors:
    Failed to mount /keydata (invalid argument)
    Failed to mount /keyrefuge (invalid argument)

    #Enter TWRP
    Format Data
    adb shell
    dd if=/dev/zero of=/dev/block/by-name/misc
    #Reboot System
    #Fix Brightness
    adb reboot recovery
    adb push fix_brightness.sh /
    adb shell
    chmod +x fix_brightness.sh
    ./fix_brightness.sh
    #Reboot System


    Boots into Lineage and WiFi works!
    Thanks agreenbhm!
    4
    I want to load Lineage 19.1 on my SM-T500 tablet, but it has been using the stock rom with the latest firmware T500XXS4CVJ1 using bootloader 4. ODIN won't let me downgrade to firmware T500XXU3BVB3, with bootloader 3. I started with my T500XXS4CVJ1 firmware, and loaded the LineageOS 19.1 Beta2 as described. No issues loading it, but the Wifi isn't working as many have noted. Loading later versions of Andy Yan's GSI didn't fix the issue.

    Is anybody working on a Lineage 19.1 ROM starting with a bootloader 4 firmware? A way to downgrade to the previous bootloader version firmware?

    I have another SM-T500 tablet modified back when I had the T500XXU3BVB3 firmware, and I like it. (It is nice to have a Wifi tablet with working Wifi!)
    2
    Then yes vbmeta flahed on userdata odin ..here once was successful.then another attempt red notice appear only official files can be flashed (vbmeta)....this way.

    I remember in my attempt on Skyhawk recovery. Flashed both vbmeta and recovery one sitting in ap for recovery userdata for vbmeta..then press conbination buttons power off volume up volume down all together 😁😁😁. And. Da da .wowo i am in eecovery working fine .
    So my reading on flashing are different methods i get lost . What is the proper one .
    🤔🤔🤔
    Firsh of all, what worked on one install, won't work on another. I depends on what the DEV included in their tar. Some include vbmeta and recovery in their ROM. This one doesn't. You have to start from stock, FACTORY RESET, flash vbmeta, FACTORY RESET, and then flash TWRP.
    And each time connect wifi and enable DEV mode.
    2
    I'm having problems with the wifi, i can't turn it on, it's normal?