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,046
342
hello i manage to boot cheris os 13 on t220, everyting works fine , but i cant install any app from playstore (i get an error) and a yellow triangle in any app i try to install.
this is because i install a slim version of gsi?
slim = only one google playstore app.
what error?
 

tom.android

Senior Member
Jul 12, 2016
1,046
342
cherishos 13 v20221113 BgS slim https://github.com/ChonDoit/treble_cherishos_patches/releases/tag/A13-v20221113
i was able to install 2 apk manually from explorer , and google chrome from playstore, but when i try to instal firefox or any other browser i get error, neither from playstore or manually using a file explorer
This version is Not supported exFAT micro sdcard .
》 Try CherishOS_v415-arm64-bgS-lite-secure_20220816.img.xz (works well for SM-T220 based Android 12)
 

t111

Member
Dec 6, 2013
22
0
i cant find bgS lite secure , i can only find v415 BgN lite secure, can you post me a link?
 

t111

Member
Dec 6, 2013
22
0
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
 
Last edited:

tom.android

Senior Member
Jul 12, 2016
1,046
342
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
You can download from here but must extract system.img .
 

nirogu325

Senior Member
Oct 15, 2010
3,739
1,938
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.
 

Jacksonz91

Member
Aug 26, 2010
23
2
Malaysia
Hi,

I am noob here, stuck at Step 5. I am getting “read failed: Invalid argument” after executing the command stated in the guide

./lpunpack super.ext4.img


Please help, been stuck here for few hours still can’t figure it out, am I missing something? My FW is SM-T220_XME_T220XXS1BVJ1

Thanks.
 

tom.android

Senior Member
Jul 12, 2016
1,046
342
Hi,

I am noob here, stuck at Step 5. I am getting “read failed: Invalid argument” after executing the command stated in the guide

./lpunpack super.ext4.img


Please help, been stuck here for few hours still can’t figure it out, am I missing something? My FW is SM-T220_XME_T220XXS1BVJ1

Thanks.
chmod +x otatools/bin/lpunpack
 
  • Like
Reactions: Jacksonz91

nirogu325

Senior Member
Oct 15, 2010
3,739
1,938
Hi,

I am noob here, stuck at Step 5. I am getting “read failed: Invalid argument” after executing the command stated in the guide

./lpunpack super.ext4.img


Please help, been stuck here for few hours still can’t figure it out, am I missing something? My FW is SM-T220_XME_T220XXS1BVJ1

Thanks.
I use a different command.
./otatools/bin/lpunpack /mnt/*your path*/super.ext4.img /mnt/*the path you want the contents to be put in*
 
  • Like
Reactions: Jacksonz91

SpackleBit

New member
Nov 17, 2022
1
0
On the step 7 I keep getting device must have valid size when I did as it said or at least I think I did. Here's the command and output:
[email protected]:~/script# lpmake --metadata-size 65536 \
> --super-name super \
> --metadata-slots 2 \
> --device super:6023020544\
> --group main:4668772352\
> --partition odm:readonly:4349952:main \
> --image odm=./odm.img \
> --partition product:readonly:1184133120:main \
> --image product=./product.img \
> --partition system:readonly:2770960384:main \
> --image system=./system.img \
> --partition vendor:readonly:709328896:main \
> --image vendor=./vendor.img \
> --sparse \
> --output ./super_new.img
Block device must have a valid size.
 

Attachments

  • Screenshot_20230101_023035.png
    Screenshot_20230101_023035.png
    34.2 KB · Views: 10

dragonfly.12

Member
Jan 3, 2023
6
0
GOOD NEWS EVERYBODY...
For user who confused using windows script or wsl or linux
i have tested, and suceesed mod , using application termux.apk for android, to unpack and repack super.img.lz4
the first thing you open termux
launch code
apt upgrade
pkg install lz4
pkg install android-tools
you can put super.img in phone storage
then enter this code to select your current workspace
cd /
cd sdcard
congrats, you now can execute code lpmake,lpunpack,lz4,simg2img...
you can install zarchiver for extract tar
follow tutor in this first post to extract and mod your super.img
in termux you dont need ./lpunpack ./simg2img anymore,, you can use lpunpack simg2img instead without adding ./ in front of command


nb: i flash in odin.. only use super.img compressed to tar and vbmeta.img compressed to tar
select AP, in odin
i flashed super.img.tar (customed gsi), phone will bootloop, but dont panic, plug cable data, use power + vol- , until off, then hold vol+ and vol-, until odin mode appear
then flash vbmeta.img.tar
phone can boot into gsi normally..

i hope this reply can answer, user who confused using cmd command in windows,,, like me
 

nirogu325

Senior Member
Oct 15, 2010
3,739
1,938
On the step 7 I keep getting device must have valid size when I did as it said or at least I think I did. Here's the command and output:
[email protected]:~/script# lpmake --metadata-size 65536 \
> --super-name super \
> --metadata-slots 2 \
> --device super:6023020544\
> --group main:4668772352\
> --partition odm:readonly:4349952:main \
> --image odm=./odm.img \
> --partition product:readonly:1184133120:main \
> --image product=./product.img \
> --partition system:readonly:2770960384:main \
> --image system=./system.img \
> --partition vendor:readonly:709328896:main \
> --image vendor=./vendor.img \
> --sparse \
> --output ./super_new.img
Block device must have a valid size.
You forgot to post the WSL output for each file size. To have that error you must have input some wrong numbers in there.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Post #11 is wrong firmware for mine. Mine is T220XXS1BVJ2
    ...come on, man. Read the Bootloader file name for VJ2. You'll see it ends with VGB. But if you still insist it's wrong then don't use it and make it yourself.
    1
    I know that, but your tar file. It didn't work for me.. thanks
    Image reuploaded. Made manually now.

    - Project Elixir 3.5 (Android 13) For SM-T220
    - Region: XAR
    - Firmware needed: T220XXU1CVL7 (Android 13)
    - Has GApps and Magisk 25.2
    - Security: January 5th, 2023.
    - microSD exFAT compatible
    DISCLAIMER: FIRMWARE NEEDED IS T220XXU1CVL7 (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: HERE

    Remember to set "Smallest width" on either "Display" settings or "Developer options" at 598 if you don't want the toolbar.

    Set these and reboot right after.
    Samsung Features
    -Enable stereo audio mode
    -Enable double tap to wake (after a reboot unlock at least once)
    Misc features
    -Use alternate way to detect headsets
    -Bluetooth workarounds: MediaTek
    -Force-disable A2DP offload
  • 8
    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
    Thank you so much for compiling the AP for me bro but when i try to flash it with odin i get this error
    <ID:0/004> Firmware update start..
    <ID:0/004> SingleDownload.
    <ID:0/004> preloader.img.lz4
    <ID:0/004> FAIL!


    For your information the current OS build on my tablet is INS with the baseband version of T225XXU1AVB2 and security patch of 1 Feb 2022 hope this helps you.
    Here is GSI build for SM-T225_INS_T225XXU1AVB2
    https://www.filehosting.org/file/details/7129248/GSI-12_SM-T225_INS_T225XXU1AVB2.zip
    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.
    2
    Successfully flashed GSI with magisk on my T220 following the OP's procedure. MTP is not working as the OP said. However, I can use my flash drive so I don't really miss MTP.

    I chose "system-squeak-arm64-ab-vndklite-gapps-secure.img.xz" for GSI. "Treble Info" app can tell you what image would be compatible with your device.

    If you want to use a different launcher like Nova instead of the default one, change the "Smallest width" setting from 600 to 598 in Developer options to hide the annoying taskbar.

    AOSP-Mods and "Project Themer - Android 12+" work fine for me.

    Here is my build for my device SM-T220 (SM-T220_EUX_T220XXU1AVE1):

    GSI: system-squeak-arm64-ab-vndklite-gapps-secure.img.xz
    Custom AP: https://www.filehosting.org/file/details/7045394/AP_TAR_MD5_CUSTOM_FILE_ODIN.tar.md5
    Custom AP with Magisk patch: https://www.filehosting.org/file/details/7045714/magisk_patched-25101_cauJQ.tar

    You can extract BL and Home_CSC from SM-T220_EUX_T220XXU1AVE1.

    Screenshot_20220624-113012.pngScreenshot_20220624-113035.pngScreenshot_20220624-113131.pngScreenshot_20220624-113205.png

    Notes: My device is actually SM-T220 XAR, but I have been updating it with SM-T220 EUX firmware versions without any issue.