How To Guide [GUIDE] [T220/T225] Flash a GSI on the A7 Lite (without TWRP)

Search This thread

tom.android

Senior Member
Jul 12, 2016
1,626
434
im a bit of a newbie when it comes to flashing custom roms so i struggle a bit when it comes to using things like fasbootD, it would make my life a lot easier if i could find a way to flash it with ODIN but i'll give fastbootD a shot
1.Extract your "recovery.img.lz4" from Your AP Firmware here. ( uses winzip or 7-zip)

2. I'll patch this "recovery.img.lz4" to recovery_fastbootD.tar then you must flash this tar file to replace old recovery.

3. When you have patched (boot.img+vbmeta.img) + recovery_fastbootD that I call it " 3in1.tar" then you can uses command to flash your own any GSI.

More detail please read my tutorial here https://forum.xda-developers.com/t/rewrite-using-fastbootd.4544863/

FastbootD Command
=FastbootD===

adb devices
adb reboot fastboot
fastboot erase system

fastboot flash system PixelExperience_Plus_arm64-ab-vndklite-13.0-20230421-UNOFFICIAL.img


-------> if founded not enough spaces to resized partition.
fastboot erase product
fastboot resize-logical-partition product 0x0
fastboot getvar all

-----> if resized product success then you will saw
(bootloader) partition-size:product:0x0

fastboot -w

*At FastbootD Menu select
-Enter Recovery

*At Recovery Menu select
-Wipe data/Factory reset
confirm

-Reboot system now

==================================
 
Last edited:

Xardly

Member
Apr 9, 2023
18
1
so im trying to use your guide but when i try to flash the vbmeta.img it gives me an "unknown command" error
 

Attachments

  • Screenshot 2023-04-28 225122.png
    Screenshot 2023-04-28 225122.png
    35.7 KB · Views: 29

tom.android

Senior Member
Jul 12, 2016
1,626
434
so im trying to use your guide but when i try to flash the vbmeta.img it gives me an "unknown command" error
-You can't uses fastbootd with vbmeta.
-Please make one tar file (boot.img.lz4 +vbmeta.img.lz4) then patch with magisk in your tab device.
-create 3in1.tar and flash with odin.
_After your tab had (magisk-patch boot.img + magisk-patch vbmeta.img+ recovery patch) tar. Then you can uses fastboot command.
 
Last edited:

applekid2016

New member
May 8, 2023
1
0
Hi everyone, this is a short guide on how to flash a GSI on the A7 Lite (without TWRP).

Its a nice little tablet for the price but it doesn't have a very powerful SOC and for me the One UI is barely usable on this device. The launcher and the whole system UI feel extremely laggy, but apps generally run fine.

I tried phhusson's custom Android 12 GSI and the device was almost resurrected. Much much less UI lag and the battery life is the same as stock ROM. The only thing i found not working is MTP but i don't need it.

Since i saw a couple users here asking about GSIs i decided to make a very simple guide.

As always do this at your own risk. You may brick your device. You will void your warranty.

Follow the guide only if you know what your are doing. Read each step carefully and avoid copy pasting stuff randomly.

I won't go deep into details as i believe you should have some basic knowledge if you decide to do this.

The procedure sould work for both T220 and T225 (i tested it on a T220).

I did this on Windows using WSL for some of the steps.

Sources


Thanks to @kkoo and @Brepro1 for the useful info

- https://forum.xda-developers.com/t/...sing-odin-without-twrp-phh-lineageos.4114435/
- https://forum.xda-developers.com/t/...r-img-and-flashing-our-modifications.4196625/

Requirements​


- Unlocked bootloader

If you haven't done this already follow the steps in parts 1-2 from:


- Latest official ROM

I used T220XXU1AVE1 for EUX region


- Download your preferred GSI

I used AOSP 12.1 v414 with gapps from phhusson


- Clean vbmeta.img from Google


Tools​


- lz4


- simg2img


- lpunpack and lpmake


- tar-md5-script-tool

Use the attached tar-md5-script-tool.zip

Steps​


1. Extract official ROM files (BL, AP, CP, CSC)

2. Extract AP .tar.md5

3. Decompress the extracted super.img.lz4

Code:
lz4 -d super.img.lz4 super.img

4. Convert the sparse super.img

Code:
simg2img super.img super.ext4.img

5. Unpack super.ext4.img

Code:
lpunpack super.ext4.img

I got 4 partitions in my image (should be the same for all T220/T225 ROMs):

- odm.img
- product.img
- system.img
- vendor.img

6. Replace system.img with your GSI (rename it to system.img)

7. Get the size of all partitions and the size of the original super.ext4.img (not the sparse super.img)

Code:
stat -c '%n %s' IMG_FILE.img

8. Repack super.img

Code:
lpmake --metadata-size 65536 \
--super-name super \
--metadata-slots 2 \
--device super:ORIGINAL_SUPER_IMG_SIZE \
--group main:SUM_OF_ALL_PARTITIONS_SIZES \
--partition odm:readonly:ODM_PARTITION_SIZE:main \
--image odm=./odm.img \
--partition product:readonly:PRODUCT_PARTITION_SIZE:main \
--image product=./product.img \
--partition system:readonly:SYSTEM_PARTITION_SIZE:main \
--image system=./system.img \
--partition vendor:readonly:VENDOR_PARTITION_SIZE:main \
--image vendor=./vendor.img \
--sparse \
--output ./super_new.img

Replace ORIGINAL_SUPER_IMG_SIZE, SUM_OF_ALL_PARTITIONS_SIZES, ODM_PARTITION_SIZE, PRODUCT_PARTITION_SIZE, SYSTEM_PARTITION_SIZE, VENDOR_PARTITION_SIZE with the values you obtained in step 7.

Read lpmake docs for a more detailed expalation of the args used above:


9. Compress the repacked super_new.img

Code:
lz4 -B6 --content-size super_new.img super_new.img.lz4

10. Compress the clean vmbeta.img

Code:
lz4 -B6 --content-size vbmeta.img vbmeta.img.lz4

11. Extract tar-md5-script-tool.zip

12. Put all the *.img.lz4 files extracted from AP .tar.gz in tar-md5-script-tool dir

13. Replace super.img.lz4 and vbmeta.img.lz4 in tar-md5-script-tool dir with your repacked and compressed super_new.img.lz4 (rename it to super.img.lz4) and the clean compressed vbmeta.img.lz4

14. Run batch.bat in tar-md5-script-tool dir

You will find the new AP .tar.md5 in the temp-folder subdir

15. Flash your custom AP .tar.md5 with Odin along with BL, CP, CSC from original ROM

16. Reboot into recovery and do a factory reset

17. Done
i am having trouble finding a firmware file for sm-t220 that has all the components BL, AP, CP, CSC. every stock rom that ive downloaded only has AP and BL. Can you help me with this?
 
- Project Elixir 3.6 (Android 13) For SM-T220 (February 23rd update)
- Region: XAR
- Firmware needed: T220XXS2CWA6 (Android 13)
- Has GApps and Magisk 25.2
- Security: February 5th, 2023.
- microSD exFAT compatible
DISCLAIMER: FIRMWARE NEEDED IS T220XXS2WA6 (Android 13). I'm just sharing, not open to GSI building requests/tutorials and I'm not a developer. DO NOT FLASH IF YOU HAVEN'T FLASHED THE ANDROID 13 FIRMWARE SPECIFIED ABOVE, MEANING BOOTLOADER, THE CSC FILE ALONG WITH THE FOLLOWING LINKED GSI IMAGE IN THE AP SLOT. PREPARE FOR A FACTORY RESET. IF YOU DON'T KNOW WHICH FIRMWARE YOUR T220 IS ON, THEN YOU SHOULD *NOT* BE HERE. I AM NOT RESPONSIBLE FOR ANY DAMAGES BY FLASHING THIS. GSI image:

Remember:
  1. Enable Double Tap To Wake in Phh Treble Settings > Samsung features > Enable double tap to wake. Reboot.
  2. Fix headset support enabling "Use alternate way to detect headsets" in Phh Treble Settings > Misc features. Reboot.
  3. Set "Smallest width" on either "Display" settings or "Developer options" at 598 if you don't want the toolbar.
HEY I WANT LINK PLEASE !! WHY DID YOU REMOVED ITT
 
Learn how to do it yourself, instructions on first post. I don't owe you anything so you can drop the caps.
Sorry SIR ! for my behaviour actually i am new to this gsi making and i really don't get it ! i have onced succesfully flashed your file but then i flashed stock one and i not able to file your SM-t220 GSI file that's why i tried to download it but it's removed from mediafire ! {:iam15} 😢😢
 

tom.android

Senior Member
Jul 12, 2016
1,626
434
Are there so many tutorials about SM-T22x here, from history till now from nothing (hard way) to very easy method why don't read and upgrade your skill from it.
 
  • Like
Reactions: Sakuna

Madacam

Member
Feb 26, 2020
16
1
Hello Nirogu325,

You get a lot of requests for tab a7 lite compilations. Can you make a compilation for my own tablet? Here are the firmware references: SM-T225_XEF_T225XXS3CWC2 (android 13). The gsi I'm interested in is LeOS or AOSP without GAPPs.

I've consulted a few compilation tutorials but, given my computer level, I don't feel equipped to do it by myself, on the other hand I know how to use Odin. If this is possible for you, I'd be grateful. (excuse my English translation).
 

tom.android

Senior Member
Jul 12, 2016
1,626
434
Hello Nirogu325,

You get a lot of requests for tab a7 lite compilations. Can you make a compilation for my own tablet? Here are the firmware references: SM-T225_XEF_T225XXS3CWC2 (android 13). The gsi I'm interested in is LeOS or AOSP without GAPPs.

I've consulted a few compilation tutorials but, given my computer level, I don't feel equipped to do it by myself, on the other hand I know how to use Odin. If this is possible for you, I'd be grateful. (excuse my English translation).
if you can used odin why not to try fastbootD , only a little commands you will get any GSI run on your tab.
-LeOS -T is only run on T225 with exFAT sdcard supported.
-AOSP without Gapps , you should test with TrebleDroid before .
 
Last edited:

Madacam

Member
Feb 26, 2020
16
1
Hello, thank you for your follow-up and all your advice.

I have some practice with the adb and fastboot commands acquired on my nexus 7 flox as well as twrp. But, at the time, there was no vbmeta to manage... Since then, my custom rom installation references are no longer up to date.

But with all the xda tutorials, I hope to succeed in installing LeOS 20 gsi (pending on xubuntu and windows) with or without twrp, especially with the fastboot commands...

Thanks again for sharing your skills.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    Hi everyone, this is a short guide on how to flash a GSI on the A7 Lite (without TWRP).

    Its a nice little tablet for the price but it doesn't have a very powerful SOC and for me the One UI is barely usable on this device. The launcher and the whole system UI feel extremely laggy, but apps generally run fine.

    I tried phhusson's custom Android 12 GSI and the device was almost resurrected. Much much less UI lag and the battery life is the same as stock ROM. The only thing i found not working is MTP but i don't need it.

    Since i saw a couple users here asking about GSIs i decided to make a very simple guide.

    As always do this at your own risk. You may brick your device. You will void your warranty.

    Follow the guide only if you know what your are doing. Read each step carefully and avoid copy pasting stuff randomly.

    I won't go deep into details as i believe you should have some basic knowledge if you decide to do this.

    The procedure sould work for both T220 and T225 (i tested it on a T220).

    I did this on Windows using WSL for some of the steps.

    Sources


    Thanks to @kkoo and @Brepro1 for the useful info

    - https://forum.xda-developers.com/t/...sing-odin-without-twrp-phh-lineageos.4114435/
    - https://forum.xda-developers.com/t/...r-img-and-flashing-our-modifications.4196625/

    Requirements​


    - Unlocked bootloader

    If you haven't done this already follow the steps in parts 1-2 from:


    - Latest official ROM

    I used T220XXU1AVE1 for EUX region


    - Download your preferred GSI

    I used AOSP 12.1 v414 with gapps from phhusson


    - Clean vbmeta.img from Google


    Tools​


    - lz4


    - simg2img


    - lpunpack and lpmake


    - tar-md5-script-tool

    Use the attached tar-md5-script-tool.zip

    Steps​


    1. Extract official ROM files (BL, AP, CP, CSC)

    2. Extract AP .tar.md5

    3. Decompress the extracted super.img.lz4

    Code:
    lz4 -d super.img.lz4 super.img

    4. Convert the sparse super.img

    Code:
    simg2img super.img super.ext4.img

    5. Unpack super.ext4.img

    Code:
    lpunpack super.ext4.img

    I got 4 partitions in my image (should be the same for all T220/T225 ROMs):

    - odm.img
    - product.img
    - system.img
    - vendor.img

    6. Replace system.img with your GSI (rename it to system.img)

    7. Get the size of all partitions and the size of the original super.ext4.img (not the sparse super.img)

    Code:
    stat -c '%n %s' IMG_FILE.img

    8. Repack super.img

    Code:
    lpmake --metadata-size 65536 \
    --super-name super \
    --metadata-slots 2 \
    --device super:ORIGINAL_SUPER_IMG_SIZE \
    --group main:SUM_OF_ALL_PARTITIONS_SIZES \
    --partition odm:readonly:ODM_PARTITION_SIZE:main \
    --image odm=./odm.img \
    --partition product:readonly:PRODUCT_PARTITION_SIZE:main \
    --image product=./product.img \
    --partition system:readonly:SYSTEM_PARTITION_SIZE:main \
    --image system=./system.img \
    --partition vendor:readonly:VENDOR_PARTITION_SIZE:main \
    --image vendor=./vendor.img \
    --sparse \
    --output ./super_new.img

    Replace ORIGINAL_SUPER_IMG_SIZE, SUM_OF_ALL_PARTITIONS_SIZES, ODM_PARTITION_SIZE, PRODUCT_PARTITION_SIZE, SYSTEM_PARTITION_SIZE, VENDOR_PARTITION_SIZE with the values you obtained in step 7.

    Read lpmake docs for a more detailed expalation of the args used above:


    9. Compress the repacked super_new.img

    Code:
    lz4 -B6 --content-size super_new.img super_new.img.lz4

    10. Compress the clean vmbeta.img

    Code:
    lz4 -B6 --content-size vbmeta.img vbmeta.img.lz4

    11. Extract tar-md5-script-tool.zip

    12. Put all the *.img.lz4 files extracted from AP .tar.gz in tar-md5-script-tool dir

    13. Replace super.img.lz4 and vbmeta.img.lz4 in tar-md5-script-tool dir with your repacked and compressed super_new.img.lz4 (rename it to super.img.lz4) and the clean compressed vbmeta.img.lz4

    14. Run batch.bat in tar-md5-script-tool dir

    You will find the new AP .tar.md5 in the temp-folder subdir

    15. Flash your custom AP .tar.md5 with Odin along with BL, CP, CSC from original ROM

    16. Reboot into recovery and do a factory reset

    17. Done
    2
    Can we boot lineage-19.1 GSI (nogapps, no magisk ) on tab 7 lite ?
    if yes, please compile for test Thank you.
    Device: SM-T225 Regeion: THL
    Happy testing :)

    GSI: lineage-19.1-20220613-UNOFFICIAL-arm64_bvS-vndklite.img

    https://www.filehosting.org/file/details/8249475/GSI-Lineage-19.1_SM-T225_THL_T225XXU1AVB2.zip
    2
    Are there so many tutorials about SM-T22x here, from history till now from nothing (hard way) to very easy method why don't read and upgrade your skill from it.
    never mind ! i just install fastbootd and a custom gsi from Tutorials ! THX A LOT @tom.android
    2
    i flashed this rom but after the factory reset on the recovery, the tablet freezes on the animated logo cherish os.
    maybe the problem is the base firmware ? i used the T220XXS1BVJ2 base firmware Android 12
    No, your base is not the problem. That particular version of A12 CherishOS uses PHH v415 which has issues booting for our devices. Only PHH v414 or v416 GSIs like this one boot for us (it works for VJ2 firmware, tested it myself). Sadly I don't see any other developer releasing an A12 v416 based GSI like the one I linked to so yes, that's what we have for now until the newer A13 GSIs pick up the v416 patches hopefully.