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

Search This thread

lewmur

Senior Member
Apr 30, 2011
2,396
514
This is really getting frustrating. I've succeeded in getting a couple of GSI 20 ROMs to install, but they were both vanilla with no gapps and even the CORE version of Nikgapps failed to install because there wasn't enough space left on the system partition. So I tried installing the google GSI-GMS ROM and it hangs at the ANDROID logo. I know there is a fastboot method for increasing the size of the system partition because I used it on another model Galaxy Tab, but I don't know what parameters to use on this one. Anybody know where I can find the info to do that?
 

openback

Senior Member
Mar 12, 2008
51
4
New York City
Does anyone have any suggestions for fastboot not working? I have TWRP installed and rebooting to fastboot get me back to TWRP saying "Entered fastboot mode", but fastboot commands are < watiting for any device >. I'm able to adb when in recovery, so I'm assuming my drivers are good (I installed the Samsung ones), so I'm not sure what's up.

I also went a side route and extracted the ROM from this thread to an img and tried to install it via TWRP from my micro SD card. It said successful, but I just ended up in a boot loop. Help with either of these methods would be useful.
 

openback

Senior Member
Mar 12, 2008
51
4
New York City
Does anyone have any suggestions for fastboot not working? I have TWRP installed and rebooting to fastboot get me back to TWRP saying "Entered fastboot mode", but fastboot commands are < watiting for any device >. I'm able to adb when in recovery, so I'm assuming my drivers are good (I installed the Samsung ones), so I'm not sure what's up.

I also went a side route and extracted the ROM from this thread to an img and tried to install it via TWRP from my micro SD card. It said successful, but I just ended up in a boot loop. Help with either of these methods would be useful.
I also just realized that when I tell TWRP to reboot, just before it does, I see a few errors. Unsure if any of these are expected.

Code:
Failed to mount '/system_root' (Block device required)
Failed to mount '/vendor' (Block device required)
E: Unable to open /system_root/system/apex
E: Unable to load apex images from /system_root/system/apex
Updating partition details...
Failed to mount '/system_root' (Block device required)
Failed to mount '/system_ext' (Block device required)
Failed to mount '/vendor' (Block device required)
Failed to mount '/product' (Block device required)
...done
Updating partition details...
Failed to mount '/system_root' (Block device required)
Failed to mount '/system_ext' (Block device required)
Failed to mount '/vendor' (Block device required)
Failed to mount '/product' (Block device required)
...done
Full SELinux support is present
MTP Enabled
Failed to mount '/system_root' (Block device required)
 

lewmur

Senior Member
Apr 30, 2011
2,396
514
Does anyone have any suggestions for fastboot not working? I have TWRP installed and rebooting to fastboot get me back to TWRP saying "Entered fastboot mode", but fastboot commands are < watiting for any device >. I'm able to adb when in recovery, so I'm assuming my drivers are good (I installed the Samsung ones), so I'm not sure what's up.

I also went a side route and extracted the ROM from this thread to an img and tried to install it via TWRP from my micro SD card. It said successful, but I just ended up in a boot loop. Help with either of these methods would be useful.
You can't flash from this TWRP because there is no "system" option and choosing "super" doesn't work. Doesn't give error but just results in bootloop. When TWRP says "Entering fastboot", you should be connected. If
Code:
fastboot devices
doesn't show a device, then it must be a driver problem. The fact that adb works is not relevant.
 

openback

Senior Member
Mar 12, 2008
51
4
New York City
You can't flash from this TWRP because there is no "system" option and choosing "super" doesn't work. Doesn't give error but just results in bootloop. When TWRP says "Entering fastboot", you should be connected. If
Code:
fastboot devices
doesn't show a device, then it must be a driver problem. The fact that adb works is not relevant.
That explains the boot loop then. Since I don't have any devices for fastboot, what do those drivers come from? I thought the Samsung one would have that covered.
 

lewmur

Senior Member
Apr 30, 2011
2,396
514
That explains the boot loop then. Since I don't have any devices for fastboot, what do those drivers come from? I thought the Samsung one would have that covered.
Samsung doesn't support fastboot on this device. This all comes from the Devs. Read through the OP very carefully for the fastboot instructions and you find there is a driver link in there somewhere.
 

openback

Senior Member
Mar 12, 2008
51
4
New York City
Samsung doesn't support fastboot on this device. This all comes from the Devs. Read through the OP very carefully for the fastboot instructions and you find there is a driver link in there somewhere.
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
 

lewmur

Senior Member
Apr 30, 2011
2,396
514
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.
 
Last edited:
  • Like
Reactions: asripath
Why am I unable to get DSU to flash any GSIs?


Here is the log:

Device: SM-X200
SDK: Android 12 (31)
UserSelection(userSelectedUserdata=2147483648, userSelectedImageSize=-1, selectedFileUri=content://com.android.externalstorage.documents/document/primary%3Adata%2Fsystem-squeak-12-ab-vanilla.img.xz, selectedFileName=system-squeak-12-ab-vanilla.img.xz)
SingleSystemImage(uri=content://com.android.externalstorage.documents/tree/primary%3Adata/document/primary%3Adata%2Fworkspace_dsuhelper%2Fsystem-squeak-12-ab-vanilla.img.gz, fileSize=1815252992, type=SINGLE_SYSTEM_IMAGE)
InstallationPreferences(isUnmountSdCard=false, useBuiltinInstaller=false)
operationMode: SYSTEM_AND_ROOT
checkDynamicPartitions: true
checkUnavaiableStorage: true
checkReadLogsPermission: true
allocPercentage: 0.4
hasAvailableStorage: true
maximumAllowedForAllocation: 2

--------- beginning of main
D/DynamicSystemInstallationService: onStartCommand(): action=android.os.image.action.START_INSTALL
--------- beginning of system
I/DynamicSystemService: /storage/0AEB-3514: 244016 MB
I/DynamicSystemService: startInstallation -> /mnt/media_rw/0AEB-3514/dsu
E/gsid : fs type: 1590026148
E/gsid : cannot install DSU to /mnt/media_rw/0AEB-3514/dsu/
I/DynamicSystemService: Failed to open /mnt/media_rw/0AEB-3514/dsu
E/gsid : write failed: /metadata/gsi/dsu/dsu/metadata_encryption_dir: No such file or directory
I/DynamicSystemService: Failed to install userdata
D/DynamicSystemInstallationService: status: NOT_STARTED, cause: ERROR_IO, detail: java.io.IOException: Failed to start installation with requested size: 2147483648
 

thaovd1712

New member
Feb 10, 2023
2
0
i install twrp and writing system via fastboot successfully, but when reboot, i can see only logo samsung
 

seandpa

Senior Member
I'm trying to flash this ROM system-td-arm64-ab-vanilla.img. I have installed stock Android 13 and flashed TWRP and rooted with Magisk. This all worked fine and I have root access. I booted TWRP, formatted data and rebooted back to recovery. Wiped Factory Reset and flashed the new img file to Super. It appeared to work fine with no error message but it still bootloops at Samsung screen with the red nag about being unsafe. What am I doing wrong? Do I need to flash the img with fastboot instead of TWRP?

edit: Flashing with fastboot worked. I think the problem with TWRP is that there is no option to flash to system and flashing to super doesn't work.
Where did you find system-td-arm64-ab-vanilla.img to download¿
 

lewmur

Senior Member
Apr 30, 2011
2,396
514
ok, so is there something i can do to get them working?
As far as I know, the only Android 13 GSI versions that work don't include gapps because the system partition is too small. Until someone comes up with a way to enlarge the partition you are stuck with bvS. That's why I'm running the Aug 22 version of LOS 19.1 that is bgS
 
  • Like
Reactions: asripath

seandpa

Senior Member
As far as I know, the only Android 13 GSI versions that work don't include gapps because the system partition is too small. Until someone comes up with a way to enlarge the partition you are stuck with bvS. That's why I'm running the Aug 22 version of LOS 19.1 that is bgS
Thanks for that, i have lineage19.1 bvS working well, but wanting see what else
 
As far as I know, the only Android 13 GSI versions that work don't include gapps because the system partition is too small. Until someone comes up with a way to enlarge the partition you are stuck with bvS. That's why I'm running the Aug 22 version of LOS 19.1 that is bgS

Thanks for the info, wish someone had mentioned that in the thread previously - spent a few hours the other day trying to install various Lineage GSIs without success and now it makes sense why.

And again, for those Lineage GSIs that are compatible they have to be installed from a SD card that's formatted EXT4?

Because of this partition problem, I'm guessing that larger GSIs like Project Elixir or Crdroid won't install either?
 

Chaplin0906

Senior Member
Sep 10, 2021
67
11
I also tried to install gsi many times on my tab a8 but he always can't enter the system, and finally reboot into TWRP, I think I need help
 

lewmur

Senior Member
Apr 30, 2011
2,396
514
I also tried to install gsi many times on my tab a8 but he always can't enter the system, and finally reboot into TWRP, I think I need help

I also tried to install gsi many times on my tab a8 but he always can't enter the system, and finally reboot into TWRP, I think I need help
This version of Lineage 19.1 is the only one I found to work and it MUST be installed via fastboot as system. TWRP only has Super and that doesn't work. There are bvS versions of 13 that will install but without gapps. The system partition is too small to flash any gapps and no one has posted a way to enlarge the partition.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    ok, so is there something i can do to get them working?
    As far as I know, the only Android 13 GSI versions that work don't include gapps because the system partition is too small. Until someone comes up with a way to enlarge the partition you are stuck with bvS. That's why I'm running the Aug 22 version of LOS 19.1 that is bgS
    1
    Good news....I was able to successfully flash the latest LineageOS. So it's possible to install Android 13 AOSP with google services on this device.

    Boot to TWRP, format data, wipe partitions and install through fastboot

    https://sourceforge.net/projects/an...20230218-UNOFFICIAL-arm64_bgN.img.xz/download
    1
    GAPPS are includes ?
    Yes, the G indicates that in bgN. It's Google Services and Play Store - from there you can install any other Google apps you may use
  • 4
    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!
    2
    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.
    1
    GAPPS are includes ?
    Yes, the G indicates that in bgN. It's Google Services and Play Store - from there you can install any other Google apps you may use