How To Guide Samsung Galaxy Tab A8 2021 (SM-X200) Android 12 / Android 13 Treble flash Guide

Search This thread

Vinpinto

Member
Dec 18, 2011
40
15
NY
Your warranty will be void after any of these procedures.

* I am not responsible for the outcome for using any of this information, e.g. bricked devices, dead devices, boot loops
* do some research regarding flashing, custom ROM and unlocking bootloaders
* you chose to make these modifications under your own responsibility.

The following guide is for flashing any Treble Project compatible ROM (GSI) on the Samsung Galaxy Tab A8 2021 (SM-X200)

What's working on android 12 / 12.1 ROMs :
  • Everything
What's working on android 13 ROMs :
  • Everything but video playing, colors are inverted for all video playing, including video feed from both cameras, and apps like Netflix, Disney+, Youtube, etc.

There are two ways of flashing GSI, generic system images, for treble compatible devices:
  • ROM flash from fastboot mode.
  • Dynamic System Updates (DSU) loading

Prerequisites:

  • First you should check if your device is treble compatible, this has been already checked by me. Here's the app link for checking it if you make sure yourself
  • Then you should unlock your bootloader and flash TWRP, here's the link for it
  • Enable ADB over USB.
  • Wipe the Data Partition from TWRP
  • You can root with Magisk if you like.

ROM flash from fastboot mode:

This is my preferred mode

Instructions:

  • Turn off the device and Hold Power & Vol Up buttons during restart to enter TWRP recovery
  • Format data from TWRP and wipe all partitions
  • Navigate to reboot and select Fastboot mode
  • Download a GSI image, including LineageOS, Google Android, AOSP, or any other custom GSI Treble compatible ROM for AB partition scheme.
  • fastboot flash system system.img
  • also a fastboot -w after flashing for additional wiping wouldn't hurt
  • IMPORTANT: remember to always only flash *.img files, never flash zip, img.xz, img.tar, gz, or img.tar.zx files, look for the tools for unzipping these file formats and always extract just the system.img file for these procedures. NEVER flash the vbmeta.img this can brick your device


Dynamic System Updates (DSU) loading:

Instructions:

Enable the DSU feature flag​

Before using DSU, ensure the corresponding feature flag is enabled. You can enable the flag using one of the following methods:
  • On a device with a userdebug Android build: You can enable the feature in Settings > System > Developer options > Feature flags > settings_dynamic_system.
  • On other devices: Use the following adb command:
    adb shell setprop persist.sys.fflag.override.settings_dynamic_system true

Launch DSU​

After the feature is enabled, launch DSU using the adb tool.

  1. Download a GSI image, including LineageOS, Google Android, or any other custom GSI Treble compatible ROM for AB partition scheme.
    Note: If you build your own GSI from source, or if you download a GSI from another image server, your GSI might not be unsparsed. Use the following command inside your build tree to convert the image to an unsparsed image: simg2img system.img system_raw.img
  2. gzip the GSI. Push the GSI to the device:
    adb push system_raw.gz /storage/emulated/0/Download/
    gzip -c system_raw.img > system_raw.gz
  3. Launch DSU using adb.
    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_raw.gz \
    --el KEY_SYSTEM_SIZE $(du -b system_raw.img|cut -f1) \
    --el KEY_USERDATA_SIZE 8589934592
The KEY_SYSTEM_SIZE should be for the uncompressed image file, otherwise it will fail
IMPORTANT: remember to always only flash *.img files, never flash zip, img.xz, img.tar, gz, or img.tar.zx files, look for the tools to uncompressed these file formats and always extract always the system.img file for these procedures. NEVER flash the vbmeta.img this can brick your device

Boot into the GSI​

dsu_control.png


Figure 1. A persistent notification that you can use to control DSU.
After DSU installs the GSI, a DSU menu appears as a persistent notification inside the system notification drawer (see figure 1).

At this point, you can do one of the following:

  • Boot into the GSI by tapping Restart.
  • Clean up the GSI by tapping Discard.

Switch back to the device's original system image​

After you are done testing your app using the GSI, you can perform a cold reboot to boot the system back into its original system image.

When setting the next reboot to use a GSI, you can have the GSI stay installed through multiple boot cycles (until discarded) by enabling sticky mode, or have it used for only one boot cycle by disabling sticky mode.

The following command enables sticky mode:


adb shell gsi_tool enable

The following commands disable sticky mode:


adb shell gsi_tool disable
adb shell gsi_tool enable -s
adb shell gsi_tool disable

Install GSIs using DSU and the DSU Loader​

Android 11 introduced the DSU Loader, a tool available in the device's developer options that lets you download, install, and manage GSIs entirely through the system's UI.

To install a GSI using the DSU Loader, follow these steps on a device running Android 11 or higher:

  1. Enable developer options on your device.
  2. Open your device's Settings app, then tap Developer options > DSU Loader.
  3. Choose the GSI that you want to install on your device.
    DSU loader interface for selecting a GSI
  4. Agree to the GSI terms and conditions.
    After you agree to the terms and conditions, the GSI that you selected starts downloading. You can check the status of the download through the DSU notification.
  5. After the download has finished, tap Restart to boot the GSI.
    DSU notification with options for managing the GSI
  6. When you want to switch back to your device's original system image, tap Restart from the DSU system notification.
    [IMG alt="DSU notification with an option that lets you reboot the device using the
    original system image"]https://developer.android.com/static/images/topic/dsu/restart-original-system-image.png[/IMG]


Thanks to Magendanz for the TWRP recovery​

 
Last edited:

WackyHacky1

Member
Sep 13, 2022
26
10
only issue is rainbow six mobile and pubg new state detect it as a emulator so how would we fix this?
 

jeffbar2

New member
Nov 21, 2022
2
0
Twrp keeps saying entering fastboot but never does.
I think it was using older versions of adb and usb drivers
 
Last edited:

MarcusGuy1108

Member
Aug 11, 2018
10
1
Does this trip knox like on s22 etc, or does it go back to normal if you restore back to original and relock bootloader?
 

lewmur

Senior Member
Apr 30, 2011
2,331
504
Does this trip knox like on s22 etc, or does it go back to normal if you restore back to original and relock bootloader?
AFAIK, the knox bit is a physical "fuse" and once it is tripped, it will never restore back. But normally Sansung will still honor the warranty so long as you go back to a stock ROM and relock the bootloader. That will also re-enable OTA updates.
 

MarcusGuy1108

Member
Aug 11, 2018
10
1
AFAIK, the knox bit is a physical "fuse" and once it is tripped, it will never restore back. But normally Sansung will still honor the warranty so long as you go back to a stock ROM and relock the bootloader. That will also re-enable OTA updates.
I see, just like the phones... damn samsung. Thank you very much for the quick response.
 

lewmur

Senior Member
Apr 30, 2011
2,331
504
I see, just like the phones... damn samsung. Thank you very much for the quick response.
It isn't just Samsung. Installing a custom ROM or rooting your device will void the warranty with all makers. But at least Samsung will still honor the warranty unless there is some indication that what you did caused the problem. Like bricking the device. But if it is really a hardware problem, they'll still fix it for free during the warranty period.
 

MarcusGuy1108

Member
Aug 11, 2018
10
1
It isn't just Samsung. Installing a custom ROM or rooting your device will void the warranty with all makers. But at least Samsung will still honor the warranty unless there is some indication that what you did caused the problem. Like bricking the device. But if it is really a hardware problem, they'll still fix it for free during the warranty period.

I mean the knox warrantee bit
 

lewmur

Senior Member
Apr 30, 2011
2,331
504
I know what you meant. Yes, the warranty bit is blown. But as I said, Samsung will honor it anyway unless they feel something you did caused the problem. Of course, you will still have to reflash to a stock rom, relock the bootloader and factory reset before sending in for repair.
 

MarcusGuy1108

Member
Aug 11, 2018
10
1
I know what you meant. Yes, the warranty bit is blown. But as I said, Samsung will honor it anyway unless they feel something you did caused the problem. Of course, you will still have to reflash to a stock rom, relock the bootloader and factory reset before sending in for repair.
Maybe I'll try it then. I like a lot about this tablet but god is it sluggish on OneUi. Games and all that work fine (even smooooth) but animations and stuff on OneUI are just.... wow
 

lewmur

Senior Member
Apr 30, 2011
2,331
504
Maybe I'll try it then. I like a lot about this tablet but god is it sluggish on OneUi. Games and all that work fine (even smooooth) but animations and stuff on OneUI are just.... wow
There is a fix for that. It has to do with using ADB to change the options for how to size the ramdisk to zero. You might try googling "Samsong One Ui laggy". Lineage doesn't have One Ui so it doesn't have the problem.
 
  • Like
Reactions: w00tnezz

ke4peo

Senior Member
Oct 23, 2010
142
5
Samsung Galaxy S21
Hey all. I just recently bought a Tab A8 32GB and was looking for a way to load a ROM on it so I can use the SD Card as internal storage.

I found this guide, but I'm not seeing some of the steps it says to take on my device. I've enabled Developer Options, but I don't see the DSU/GSI stuff. Nor the 'feature flag' to turn that on.

I know back in the old days all you have to do way flash a recovery image and then you could load the ROM from recovery. Is that still the basic process? Can I flash TWRP and then flash the ROM, or is more detailed now than that?
 

Vinpinto

Member
Dec 18, 2011
40
15
NY
Hey all. I just recently bought a Tab A8 32GB and was looking for a way to load a ROM on it so I can use the SD Card as internal storage.

I found this guide, but I'm not seeing some of the steps it says to take on my device. I've enabled Developer Options, but I don't see the DSU/GSI stuff. Nor the 'feature flag' to turn that on.

I know back in the old days all you have to do way flash a recovery image and then you could load the ROM from recovery. Is that still the basic process? Can I flash TWRP and then flash the ROM, or is more detailed now than that?
The full process for flashing is in the first post, in case you don't have the DSU option
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Sorry, I read it multiple times before making my post and I still don't see a link for that. I did go searching and found https://github.com/fawazahmed0/Latest-adb-fastboot-installer-for-windows and installing that did get me further, but still getting errors:

    Code:
    >fastboot flash system system.img
    Sending sparse 'system' 1/11 (261764 KB)           OKAY [ 17.567s]
    Writing 'system'                                   FAILED (remote: 'No such file or directory')
    fastboot: error: Command failed
    >fastboot oem device-info
    FAILED (remote: 'Unable to open fastboot HAL')
    fastboot: error: Command failed

    This looks like it might be due to bad partitions in my previous post? If I go in TWRP and try to mount system, it won't allow it either, but I'm not sure the right way to get this working again
    I think you need to start over by flashing the stock ROM with Odin. The only thing I see that's confusing in the OP is the fastboot -w instructioin. It isn't needed if you formatted data and then factory reset in TWRP. And if you run that command AFTER flashing the system.img, you erase what you just flashed. If you feel you need to run it, do it BEFORE flashing system.img.

    edit: When you enter fastboot mode, you should see a new listing in Windows Device manager for a kedacom device. The latest Samsung USB drivers support this but earlier versions don't.
  • 2
    Your warranty will be void after any of these procedures.

    * I am not responsible for the outcome for using any of this information, e.g. bricked devices, dead devices, boot loops
    * do some research regarding flashing, custom ROM and unlocking bootloaders
    * you chose to make these modifications under your own responsibility.

    The following guide is for flashing any Treble Project compatible ROM (GSI) on the Samsung Galaxy Tab A8 2021 (SM-X200)

    What's working on android 12 / 12.1 ROMs :
    • Everything
    What's working on android 13 ROMs :
    • Everything but video playing, colors are inverted for all video playing, including video feed from both cameras, and apps like Netflix, Disney+, Youtube, etc.

    There are two ways of flashing GSI, generic system images, for treble compatible devices:
    • ROM flash from fastboot mode.
    • Dynamic System Updates (DSU) loading

    Prerequisites:

    • First you should check if your device is treble compatible, this has been already checked by me. Here's the app link for checking it if you make sure yourself
    • Then you should unlock your bootloader and flash TWRP, here's the link for it
    • Enable ADB over USB.
    • Wipe the Data Partition from TWRP
    • You can root with Magisk if you like.

    ROM flash from fastboot mode:

    This is my preferred mode

    Instructions:

    • Turn off the device and Hold Power & Vol Up buttons during restart to enter TWRP recovery
    • Format data from TWRP and wipe all partitions
    • Navigate to reboot and select Fastboot mode
    • Download a GSI image, including LineageOS, Google Android, AOSP, or any other custom GSI Treble compatible ROM for AB partition scheme.
    • fastboot flash system system.img
    • also a fastboot -w after flashing for additional wiping wouldn't hurt
    • IMPORTANT: remember to always only flash *.img files, never flash zip, img.xz, img.tar, gz, or img.tar.zx files, look for the tools for unzipping these file formats and always extract just the system.img file for these procedures. NEVER flash the vbmeta.img this can brick your device


    Dynamic System Updates (DSU) loading:

    Instructions:

    Enable the DSU feature flag​

    Before using DSU, ensure the corresponding feature flag is enabled. You can enable the flag using one of the following methods:
    • On a device with a userdebug Android build: You can enable the feature in Settings > System > Developer options > Feature flags > settings_dynamic_system.
    • On other devices: Use the following adb command:
      adb shell setprop persist.sys.fflag.override.settings_dynamic_system true

    Launch DSU​

    After the feature is enabled, launch DSU using the adb tool.

    1. Download a GSI image, including LineageOS, Google Android, or any other custom GSI Treble compatible ROM for AB partition scheme.
      Note: If you build your own GSI from source, or if you download a GSI from another image server, your GSI might not be unsparsed. Use the following command inside your build tree to convert the image to an unsparsed image: simg2img system.img system_raw.img
    2. gzip the GSI. Push the GSI to the device:
      adb push system_raw.gz /storage/emulated/0/Download/
      gzip -c system_raw.img > system_raw.gz
    3. Launch DSU using adb.
      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_raw.gz \
      --el KEY_SYSTEM_SIZE $(du -b system_raw.img|cut -f1) \
      --el KEY_USERDATA_SIZE 8589934592
    The KEY_SYSTEM_SIZE should be for the uncompressed image file, otherwise it will fail
    IMPORTANT: remember to always only flash *.img files, never flash zip, img.xz, img.tar, gz, or img.tar.zx files, look for the tools to uncompressed these file formats and always extract always the system.img file for these procedures. NEVER flash the vbmeta.img this can brick your device

    Boot into the GSI​

    dsu_control.png


    Figure 1. A persistent notification that you can use to control DSU.
    After DSU installs the GSI, a DSU menu appears as a persistent notification inside the system notification drawer (see figure 1).

    At this point, you can do one of the following:

    • Boot into the GSI by tapping Restart.
    • Clean up the GSI by tapping Discard.

    Switch back to the device's original system image​

    After you are done testing your app using the GSI, you can perform a cold reboot to boot the system back into its original system image.

    When setting the next reboot to use a GSI, you can have the GSI stay installed through multiple boot cycles (until discarded) by enabling sticky mode, or have it used for only one boot cycle by disabling sticky mode.

    The following command enables sticky mode:


    adb shell gsi_tool enable

    The following commands disable sticky mode:


    adb shell gsi_tool disable
    adb shell gsi_tool enable -s
    adb shell gsi_tool disable

    Install GSIs using DSU and the DSU Loader​

    Android 11 introduced the DSU Loader, a tool available in the device's developer options that lets you download, install, and manage GSIs entirely through the system's UI.

    To install a GSI using the DSU Loader, follow these steps on a device running Android 11 or higher:

    1. Enable developer options on your device.
    2. Open your device's Settings app, then tap Developer options > DSU Loader.
    3. Choose the GSI that you want to install on your device.
      DSU loader interface for selecting a GSI
    4. Agree to the GSI terms and conditions.
      After you agree to the terms and conditions, the GSI that you selected starts downloading. You can check the status of the download through the DSU notification.
    5. After the download has finished, tap Restart to boot the GSI.
      DSU notification with options for managing the GSI
    6. When you want to switch back to your device's original system image, tap Restart from the DSU system notification.
      [IMG alt="DSU notification with an option that lets you reboot the device using the
      original system image"]https://developer.android.com/static/images/topic/dsu/restart-original-system-image.png[/IMG]


    Thanks to Magendanz for the TWRP recovery​

    2
    Just wanted to say thanks to everyone who helped me. Finally got Lineage installed and formatted my 256GB SD card as internal storage! So far, it's only had one little quirk, but it's a livable one until I figure it out.

    The quirk? After I installed and formatted my Sandisk 256GB SD card as internal storage inside Settings the Storage section sees it, but when I tap on Storage it circles and then closes the Settings app. Like I said, quirky...but livable so long as it sees all the storage. :)

    Edit: Fixed it! Basically went into TWRP and factory reset (with the SD card inserted) and also made sure to wipe the SD card. After rebooting and setting up my Google account again, it allowed me to format as internal and now doesn't crash!
    1
    Maybe I'll try it then. I like a lot about this tablet but god is it sluggish on OneUi. Games and all that work fine (even smooooth) but animations and stuff on OneUI are just.... wow
    There is a fix for that. It has to do with using ADB to change the options for how to size the ramdisk to zero. You might try googling "Samsong One Ui laggy". Lineage doesn't have One Ui so it doesn't have the problem.
    1
    Which I did flash TWRP. But there is no fastboot option that I can find in TWRP. There's "Reboot system now" and "Reboot into bootloader".

    Reboot Into Bootloader just takes me to the same cyan screen and doesn't allow ADB to do anything.
    The recovery shown in your pics is the standard recovery and NOT TWRP. When flashing TWRP you MUST disable the auto-reboot option in Odin because if the tablet reboots to system, it will overwrite TWRP. When TWRP finishes flashing in Odin, hold the vol down and power until the screen blanks. Then, immediately switch from vol down to vol up to reboot to TWRP. You have to do this fast or it will reboot system again and you'll have to do it again.