Accessories CustomAP 2022

Search This thread

Difficul

Senior Member
Jul 2, 2021
322
18
No your PC, you run fastboot at pc.

1663850926506.png

It doesn't show
 

20 Oct 2022​

ArrowOS 12.1 GSI Unofficial Now support exFAT sdcard

13 oct 2022 ( For Samsung Devices)​

UPDATE: TUTORIAL Create CustomAP framework For Odin Flashing. (Part 1, 2)

"Step by Step CREATE CustomAP for Odin Flashing with Patching Dynamic Partitions."
(Part 2)

"Step by Step CREATE CustomAP for Odin Flashing
(Part 1)

Resources:

✓Patching Dynamic Partitions in Android Super Image​

https://blog.senyuuri.info/posts/2022-04-27-patching-android-super-images/

✓Where is the Ubuntu file system root directory in Windows Subsystem for Linux and vice versa?


✓How to install Ubuntu sub-system with WSL2 ?​


✓Install Ubuntu on WSL2 on Windows 10​


10 Oct 2022​

SparkOS v12.6 with Mod Offline Charging.

6 Prerequisites for Tab A7 Lite GSI installation


READ:Step BY Step CREATE CustomAP framework file for GSI flashing with Odin.

How to chooses GSI variant?

vndklite variant or non-slim varian = R/W + Secure (No SU)


Sep 2022

New SUPERIOR OS GSI12L (Base A12)


Sound modules for CherishOS A12L​

========​

!! TEST UPDATE CUSTOM AP firmware for install GSI WITHOUT LOST DATA.​

I have founded KG 'Broken' status after Odin fashing with Home_CSC although uninstall Magisk before. But i can flash Stock Firmware back to ' Checking' status.🤮

View attachment 5714357
NOTE:- By normal this 'Broken' status , we can't boot into system.
>>>>>>>>>>>>>

New Update: for Android 12

" Custom AP for install GSI without TWRP

(Step by Step) with imjtool ( no lpunpack )"

install in action here https://forum.xda-developers.com/t/...ite-without-twrp.4456821/page-9#post-87418505

Step by Step making Custom AP firmware.
here: https://forum.xda-developers.com/t/...stom-ap-overlay-making.4473159/#post-87204333

>>>>>>>>>>>>>>

Treble GSI Overlay

Enable Auto-Screen Brightness

https://forum.xda-developers.com/t/...-a7-lite-sm-t225-t-220.4487817/#post-87379271

>>>>>>>>>>>>>

Warning ! First flash install A12 with Odin then/or delete cache device after reboot system will auto-relock Bootloader.

( Back to Stock Firmware (no root) Always , Before changes across System )

Full tutorial list: ( if you are in a hurry)

1. CherishOS unofficial GSI Base on A11

2. Pixel experience plus GSI Base on A11

3. SUPERIOR OS. (BASE ON A11 ROM) unofficial GSI (Recommended)


Essential part of tutorial​


View attachment 5691901
!!! Want more detail , please download Ain1.jpg.
IF YOU DON'T KNOW ABOUT " TWRP FASTBOOT".

Easy & Quick RESTORE FROM (ANY GSI ) BACK TO (STOCK with TWRP)

!!! If you are already on the A11 ***(pure stock)
-( U must be on stock rom to flashsing GSIs .)

!!! Bootloader unlocked.
check Developer options

  1. OEM unlocking toggle is grayout. (full state unlocked)
  2. USB debugging is enable . ( connect with Computer, run "adb devices" Enter ) gives permission to debugging with your computer.
!!! Download the actual Firmware A11 with Frija or samfirm or Bifrost, and extract
it and you will get 5 files (AP, BL, CP, CSC and HOME_CSC). All files are in tar format and can be opened by 7-Zip, WinRAR or other archrive software.

1. Flash the FW A11
- BL + AP + CP + CSC ( clean data)
- put (TWRP + vbmeta_disabler)dot tar in USERDATA slot.
and click "Start"

NOTE.
• Default Auto reboot to system.

Your device will reboot but it will not boot into system as "vbmeta signature" has changed.

2. When Auto Boot into TWRP mode from step 1.

In your TWRP Recovery menu.

• Go to Advanced > Terminal, type: multidisabler. Click Enter.

• Go back to Main menu , Wipe > Format Data > type yes.

Option<<<Install the Magisk.apk with TWRP >>>

3. Boot---->System
Done

NOTE: If you wish to install TWRP without rooting, there are numerous pitfalls to consider. For example, a stock device is protected by Android Verified Boot. This is implemented as a vbmeta partition that contains cryptographic digests for verifying the integrity of boot.img, recovery.img and other partitions/images. Flashing TWRP without first flashing a vbmeta image with verity disabled will render your device unable to boot.

Download:
(TWRP225 + vbmeta_disabler).tar https://mega.nz/file/QTIWmTJb#jIneu-vSC-tOSzN-mFhOurCtShGuZTkyoRrQ791R24s

twrp 220 + vbmeta_disabler :https://mega.nz/file/BTR1FbDL#oMfBn7TQCy2j0Qk3EtIOafoD2IY01AsX8UIOR-mSSVc

>>>>>>>>>>>>>>>>>>>>>>

BACKUP CURRENT STATE OF THE SYSTEM BY TWRP

1. Forced Restart into TWRP Recovery mode.
Or command>> adb reboot recovery
( key combo press & hold Power + Vol up until screen showed yellow text " warranty bit" )

2. Black screen show then press power then volumn button. For activated recovery screen.

3. At Backup menu select
Data, Boot, Recovery, Super, NVRAM, NVdata
Select storage -----> internal or external SD card
Swipe to Backup


Then you can try & test GSI BACK and FORTH with my tutorial.

>>>>>>>>>>>>>>>>>

✓ offline-charging patch


View attachment 5698081

1.Turn off device state
2 then plugin power charging cable
3."knox warranty bit Warning state" was showed up ...Still always on screen not going anywhere except you press & hold combo key (power + vol down).
4. within 10s--> offline-charging patch do its jobs.
5. Blank screen show up with underneath charging state, you can turn-on by press power button like a normal way.


Not blank screen after "set warranty ..." turn off

-Offline-charging Patch function = charging while turn-off state without breaking by "Knox Warranty bit " from Samsung.

here's the fix for offline charging

( now working when bootloop or struck in "set warranty" state.)

https://github.com/ponces/treble_bu...system_core/0003-fix-offline-charger-v7.patch

Screenshot_20220827-104433_Vivaldi Browser.jpg
You can. Open device by press power button while we are on charging state.
>>>>>>>>>>>>>>>>>>>>


✓ Treble GSI Overlay for SM-T220 , 225 ,225N


Overlay is crucial as it fixes the following :

• Brightness stack

• CPU core frequencies

• Missing battery usage stats

• Missing night light toggle

• Ambient light & Doze

In Action & Download here: https://forum.xda-developers.com/t/...-a7-lite-sm-t225-t-220.4487817/#post-87379271
every time I do the procedure this happens when using FORMAT DATA YES



(everything goes ok in fastboot and flashing files) I use TWRP with mouse with dongle. and TWRP is boot again and again, does not enter the system
 

Attachments

  • 20221022_171507.jpg
    20221022_171507.jpg
    1.5 MB · Views: 20
  • 20221022_044436.jpg
    20221022_044436.jpg
    765 KB · Views: 16
  • 20221022_071511.jpg
    20221022_071511.jpg
    2.3 MB · Views: 18
every time I do the procedure this happens when using FORMAT DATA YES


(everything goes ok in fastboot and flashing files) I use TWRP with mouse with dongle. and TWRP is boot again and again, does not enter the system
 

Attachments

  • 20221022_044436.jpg
    20221022_044436.jpg
    765 KB · Views: 17
  • 20221022_071511.jpg
    20221022_071511.jpg
    2.3 MB · Views: 18
  • 20221022_171507.jpg
    20221022_171507.jpg
    1.5 MB · Views: 19

izimen

Senior Member
Apr 8, 2012
262
12
Paris
hello after following your tutorial step by step I managed to create a customAP of CherishOS_v415-arm64-bgS-slim-lite_20220919 everything seems to have gone well even odin did not indicate any error to me after the flash but when my tab restarted I have bootloop I tried a factory reset from recovery and the same bootloop again and again
is there an error somewhere I have a T220 with android 12 BVGB CSC EUX stock installed and the bootloader unlocked here
 

tom.android

Senior Member
Jul 12, 2016
1,172
366
hello after following your tutorial step by step I managed to create a customAP of CherishOS_v415-arm64-bgS-slim-lite_20220919 everything seems to have gone well even odin did not indicate any error to me after the flash but when my tab restarted I have bootloop I tried a factory reset from recovery and the same bootloop again and again
is there an error somewhere I have a T220 with android 12 BVGB CSC EUX stock installed and the bootloader unlocked here

ok i will make CustomAP for you to prove your situation.


** You must used Android 12 based on

( T220XXU1BVGB ) if not refashing Stock First.


I don't update to T22xXXS1BVI2.


Screenshot_20221030_090100.jpg


Note If you uses Magisk to root, you must download only secure GSI only or you must get rid of SuperSU inside GSI file.

Check with your making.(odin don't give any error)


Process for verify making CustomAP

1) extract super.img.lz4 from AP.tar (with winrar or winzip)

2)
Code:
sudo lz4 -d  super.img.lz4  super.img

sudo  simg2img super.img  super.raw

./imjtool super.raw extract

3)
extract system.img from GSI (with winrar or winzip)
CherishOS_v415-arm64-bgS-lite-secure_20220816.img.xz

4)
Code:
stat -c '%n %s' *.img
output
CherishOS_v415-arm64-bgS-lite-secure_20220816.img 3625308160
odm.img 4349952
product.img 1184133120
super.img 5802091760
vendor.img 709328896

5)
Code:
stat -c '%n %s' super.raw
output
super.raw 6023020544

6)
Group main size = odm 4349952 + product.img 1184133120 + vendor.img 709328896 + GSI 3625308160
Total = 5523120128

7) Making formular for creating super_new.img

Code:
sudo ./otatools/bin/lpmake --metadata-size 65536 \
 --super-name super \
 --metadata-slots 2 \
 --device super:6023020544 \
 --group main:5523120128\
 --partition odm:readonly:4349952:main \
 --image odm=./odm.img \
 --partition system:readonly:3625308160:main \
 --image system=./system.img \
 --partition vendor:readonly:709328896:main \
 --image vendor=./vendor.img \
 --partition product:readonly:1184133120:main \
 --image product=./product.img \
 --sparse \
 --output ./super_new.img

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

9)
Code:
stat -c '%n %s' super_new.img.lz4
output
super_new.img.lz4 3258953929

10)
create CustomAP with tar-md5-script

Final
---> Magisk 24.3 patch
---->uses to flashing at the same time( together with CustomAP) at UserData Slot

or patch after finished fashing already at AP Slot

Download here https://mega.nz/file/kaYWyBJR#RYIk4ysQ1w4HqpLkYm7eLW1maol-ZyopIMpMxD9kaZo

Download CustomAP for Multi CSC OXM
Capture.PNG

extract with winRAR befor flashing.

Please refer my Step by Step CustomAP if you lost creating way.

( Report back )
 
Last edited:
  • Like
Reactions: izimen

izimen

Senior Member
Apr 8, 2012
262
12
Paris

ok i will make CustomAP for you to prove your situation.


** You must used Android 12 based on

( T220XXU1BVGB ) if not refashing Stock First.


I don't update to T22xXXS1BVI2.


View attachment 5746959

Note If you uses Magisk to root, you must download only secure GSI only or you must get rid of SuperSU inside GSI file.

Check with your making.(odin don't give any error)


Process for verify making CustomAP

1) extract super.img.lz4 from AP.tar (with winrar or winzip)

2)
Code:
sudo lz4 -d  super.img.lz4  super.img

sudo  simg2img super.img  super.raw

./imjtool super.raw extract

3)
extract system.img from GSI (with winrar or winzip)
CherishOS_v415-arm64-bgS-lite-secure_20220816.img.xz

4)
Code:
stat -c '%n %s' *.img
output
CherishOS_v415-arm64-bgS-lite-secure_20220816.img 3625308160
odm.img 4349952
product.img 1184133120
super.img 5802091760
vendor.img 709328896

5)
Code:
stat -c '%n %s' super.raw
output
super.raw 6023020544

6)
Group main size = odm 4349952 + product.img 1184133120 + vendor.img 709328896 + GSI 3625308160
Total = 5523120128

7) Making formular for creating super_new.img

Code:
sudo ./otatools/bin/lpmake --metadata-size 65536 \
 --super-name super \
 --metadata-slots 2 \
 --device super:6023020544 \
 --group main:5523120128\
 --partition odm:readonly:4349952:main \
 --image odm=./odm.img \
 --partition system:readonly:3625308160:main \
 --image system=./system.img \
 --partition vendor:readonly:709328896:main \
 --image vendor=./vendor.img \
 --partition product:readonly:1184133120:main \
 --image product=./product.img \
 --sparse \
 --output ./super_new.img

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

9)
Code:
stat -c '%n %s' super_new.img.lz4
output
super_new.img.lz4 3258953929

10)
create CustomAP with tar-md5-script

Final
---> Magisk 24.3 patch
---->uses to flashing at the same time( together with CustomAP) at UserData Slot

or patch after finished fashing already at AP Slot

Download here https://mega.nz/file/kaYWyBJR#RYIk4ysQ1w4HqpLkYm7eLW1maol-ZyopIMpMxD9kaZo

Download CustomAP for Multi CSC OXM
View attachment 5747027
extract with winRAR befor flashing.

Please refer my Step by Step CustomAP if you lost creating way.

( Report back )
thank you very much it works with your CustomAP I must have missed a step for mine lol thanks again
 

nirogu325

Senior Member
Oct 15, 2010
3,760
1,959
hello after following your tutorial step by step I managed to create a customAP of CherishOS_v415-arm64-bgS-slim-lite_20220919 everything seems to have gone well even odin did not indicate any error to me after the flash but when my tab restarted I have bootloop I tried a factory reset from recovery and the same bootloop again and again
is there an error somewhere I have a T220 with android 12 BVGB CSC EUX stock installed and the bootloader unlocked here
The September 19th build isn't compatible. I tried back in September and it looks like something changed in that build. That's why you were given an August build which does boot.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2

    Part 1​
    :Step by Step:

    Create CustomAP framework file For

    GSI Flashing with Odin.

    by tom.android
    Modified from @abg95a
    Flash a GSI on the A7 Lite (without TWRP)

    Update for add loop device in WSL2

    ( **will slow-down Win10 )

    [ not recommend if you don't want to modified your system.img ]

    >> Check WSL version.​

    Open CMD with Administrator

    C:\Windows\System32>
    Code:
    wsl --list --verbose
    NAME STATE VERSION
    Ubuntu-20.04 Stopped 1

    ----> you are on wsl1


    >>> Howto update it to WSL2 if you have installed Ubuntu ?


    C:\Windows\System32>
    Code:
    wsl --set-version Ubuntu-20.04 2

    Conversion in progress, this may take a few minutes...
    For information on key differences with WSL 2 please visit https://aka.ms/wsl2
    Conversion complete.

    test after converted .

    C:\Windows\System32>
    Code:
    wsl --list --verbose
    NAME STATE VERSION
    Ubuntu-20.04 Stopped 2

    ----> Now you are on wsl2

    ====End Update WSL1 with WSL2 ====



    ✓ LINUX Installation

    Ubuntu Subsystem 20.04.5 LTS


    OPEN microsoft store , Select Ubuntu version and click install.

    After
    Find Where to Stored installation Files.
    here: (open windows show hidden file)

    FOR WSL1
    \Users\username\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04LTS_\LocalState

    For WSL2 >>>you can access to home directory from windows (Windows 10 build 18342) like this :

    \\wsl$

    ## make a shotcut to desktop (for easy copy and paste , sharing files between WIN and LINUX)

    Resources: https://askubuntu.com/questions/759...t-directory-in-windows-subsystem-for-linux-an

    ====================================

    New fresh install with WSL2 >

    Ubuntu 20.04.5 LTS

    >> How?

    Before:
    Check win10 with WSL1 or not

    C:\Windows\System32>wsl --list --verbose

    NAME STATE VERSION
    Ubuntu-20.04 Stopped 1

    ----> you are on wsl1

    Howto update to be "WSL2"

    1.open windows10 update
    setting--windows update---Advanced option = open receive update

    After Download Update from Microsoft.
    2. open windows system---command promp--Administrator mode
    cmd> wsl --update
    output

    Checking for updates...
    No updates are available.
    Kernel version: 5.10.102.1 <----wsl2

    3. RUN in CMD

    Code:
    wsl --set-default-version 2

    Then install Ubuntu.

    new20.04-2.PNG


    Test: loop device.
    Open Ubnutu terminal

    Code:
    cd /dev
    Code:
    ls -l | grep -v tty

    [email protected]:~$ cd /dev
    [email protected]:/dev$ ls -l | grep -v tty
    total 0
    crw-r--r-- 1 root root 10, 235 Oct 14 15:49 autofs
    drwxr-xr-x 2 root root 40 Oct 14 15:49 block
    drwxr-xr-x 2 root root 80 Oct 14 15:49 bsg
    crw------- 1 root root 10, 234 Oct 14 15:49 btrfs-control
    drwxr-xr-x 3 root root 60 Oct 14 15:49 bus
    crw------- 1 root root 5, 1 Oct 14 15:49 console
    crw------- 1 root root 10, 62 Oct 14 15:49 cpu_dma_latency
    crw------- 1 root root 10, 203 Oct 14 15:49 cuse
    lrwxrwxrwx 1 root root 13 Oct 14 15:49 fd -> /proc/self/fd
    crw-rw-rw- 1 root root 1, 7 Oct 14 15:49 full
    crw-rw-rw- 1 root root 10, 229 Oct 14 15:49 fuse
    crw-r--r-- 1 root root 1, 11 Oct 14 15:49 kmsg
    crw------- 1 root root 10, 237 Oct 14 15:49 loop-control
    brw------- 1 root root 7, 0 Oct 14 15:49 loop0
    brw------- 1 root root 7, 1 Oct 14 15:49 loop1
    brw------- 1 root root 7, 2 Oct 14 15:49 loop2
    brw------- 1 root root 7, 3 Oct 14 15:49 loop3
    brw------- 1 root root 7, 4 Oct 14 15:49 loop4
    brw------- 1 root root 7, 5 Oct 14 15:49 loop5
    brw------- 1 root root 7, 6 Oct 14 15:49 loop6
    brw------- 1 root root 7, 7 Oct 14 15:49 loop7
    drwxr-xr-x 2 root root 60 Oct 14 15:49 mapper
    crw------- 1 root root 1, 1 Oct 14 15:49 mem
    drwxr-xr-x 2 root root 60 Oct 14 15:49 net
    crw-rw-rw- 1 root root 1, 3 Oct 14 15:49 null
    crw------- 1 root root 10, 144 Oct 14 15:49 nvram
    crw------- 1 root root 108, 0 Oct 14 15:49 ppp
    crw-rw-rw- 1 root root 5, 2 Oct 14 16:56 ptmx
    drwxr-xr-x 2 root root 0 Oct 14 15:49 pts
    brw------- 1 root root 1, 0 Oct 14 15:49 ram0
    brw------- 1 root root 1, 1 Oct 14 15:49 ram1
    brw------- 1 root root 1, 10 Oct 14 15:49 ram10
    brw------- 1 root root 1, 11 Oct 14 15:49 ram11
    brw------- 1 root root 1, 12 Oct 14 15:49 ram12
    brw------- 1 root root 1, 13 Oct 14 15:49 ram13
    brw------- 1 root root 1, 14 Oct 14 15:49 ram14
    brw------- 1 root root 1, 15 Oct 14 15:49 ram15
    brw------- 1 root root 1, 2 Oct 14 15:49 ram2
    brw------- 1 root root 1, 3 Oct 14 15:49 ram3
    brw------- 1 root root 1, 4 Oct 14 15:49 ram4
    brw------- 1 root root 1, 5 Oct 14 15:49 ram5
    brw------- 1 root root 1, 6 Oct 14 15:49 ram6
    brw------- 1 root root 1, 7 Oct 14 15:49 ram7
    brw------- 1 root root 1, 8 Oct 14 15:49 ram8
    brw------- 1 root root 1, 9 Oct 14 15:49 ram9
    crw-rw-rw- 1 root root 1, 8 Oct 14 15:49 random
    crw------- 1 root root 251, 0 Oct 14 15:49 rtc0
    brw------- 1 root root 8, 0 Oct 14 15:49 sda
    brw------- 1 root root 8, 16 Oct 14 15:49 sdb
    crw------- 1 root root 21, 0 Oct 14 15:49 sg0
    crw------- 1 root root 21, 1 Oct 14 15:49 sg1
    lrwxrwxrwx 1 root root 8 Oct 14 15:49 shm -> /run/shm
    lrwxrwxrwx 1 root root 15 Oct 14 15:49 stderr -> /proc/self/fd/2
    lrwxrwxrwx 1 root root 15 Oct 14 15:49 stdin -> /proc/self/fd/0
    lrwxrwxrwx 1 root root 15 Oct 14 15:49 stdout -> /proc/self/fd/1
    crw-rw-rw- 1 root root 1, 9 Oct 14 15:49 urandom
    crw------- 1 root root 7, 0 Oct 14 15:49 vcs
    crw------- 1 root root 7, 1 Oct 14 15:49 vcs1
    crw------- 1 root root 7, 128 Oct 14 15:49 vcsa
    crw------- 1 root root 7, 129 Oct 14 15:49 vcsa1
    crw------- 1 root root 7, 64 Oct 14 15:49 vcsu
    crw------- 1 root root 7, 65 Oct 14 15:49 vcsu1
    drwxr-xr-x 2 root root 60 Oct 14 15:49 vfio
    crw------- 1 root root 10, 238 Oct 14 15:49 vhost-net
    crw------- 1 root root 10, 63 Oct 14 15:49 vsock
    crw-rw-rw- 1 root root 1, 5 Oct 14 15:49 zero
    [email protected]:/dev$
    (you will saw loop command.)
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>​

    GET START

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    Get " super.img" from inside Stock AP File

    by Extract (super.img.lz4) file by Windows or Linux.

    For Windows

    Download lz4 for win and extract into C:\AnyName
    from https://github.com/lz4/lz4/releases

    1) extract "super.img.lz4" from Stock AP Firmware file with 7zip, into lz4 folder.<AnyName>

    Screenshot_20220917_233408_Gallery.jpg


    2) go into folder lz4_win64_v1_9_4 and run CMD

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

    copy output " super.img" to uses with Ubuntu at /home/username/


    >>>>>>>>>>>>≥>>>>>>>>>>>>>>>>>>>>>>

    For Linux:​

    launch Ubuntu terminal( console) from Start menu

    2.1) Option We can uses LZ4 from linux, process same as (Step 1-2 for wins)

    Ubuntu
    you can install LZ4 from Ubuntu Console with

    Code:
    sudo apt update
    
    sudo apt-get -y install lz4
    
    or
    
    sudo  apt install liblz4-tool

    note
    lz4 [option] input output
    lz4 -d (d= decompress)
    lz4 -dc ( c=concatenate )

    2.2) Option Extract "super.img.lz4" from Stock AP framework file.
    and paste it to /home/username/

    2.3)
    Code:
    sudo lz4 -d super.img.lz4  super.img

    Screenshot_20220917_234111_Gallery.jpg
    2.4)COMPARE with using "lz4" between Ubuntu and Windows

    Screenshot_20220917_235214_Gallery.jpg

    CONCLUSION of Beginning step.​

    WE CAN GETS " SUPER.IMG" FROM TWO WAYS , WINDOWS OR LINUX.
    ( windows from step 1-2 ) or. ( Linux from step 2.1 -2.3)


    ***We will use 'super.img' to begin our modification.

    ✓ unpacking super.img

    3.) Turn sparse format To RAW​

    Ubuntu

    **First of all the super.img file might be in sparse format so we need to make it raw image. By Using "SIMG2IMG"


    Code:
    sudo apt-get update
    sudo apt-get install simg2img

    I'm
    ok
    Code:
    sudo  apt-get install img2simg

    After install execute this command.

    Code:
    sudo  simg2img super.img  super.raw

    Screenshot_20220917_235842_Gallery.jpg


    ✓Extract subpartition out from "SUPER.RAW"

    4) Tool for extract partition. ( very important tool for show "group schema" which used to specific parameter option for lpmake.)

    4.1) Download imjtool
    http://newandroidbook.com/tools/imjtool.tgz

    or download from attach file belows this tutorial (imjtool.zip)

    4.2) extract "imjtool" from archive imjtool.tgz to /home/username/

    *note for short i renamed it to 'imjtool'

    4.3) then give it permission with command

    Code:
    chmod +x imjtool

    imjtool.PNG


    5) Extract sub partition within our "SUPER.RAW"

    By execute this command
    Code:
    ./imjtool super.raw extract

    It will extract sub-partitions (4 img files ) in the folder "/home/user/extracted"
    - system.img
    - vendor.img
    - product.img
    - odm.img


    Screenshot_20220918_002304_Gallery.jpg

    ✓ Modify Stock "system.img" by Changes with GSI-"system.img"

    6) Choose your favorite GSI. ( Recommend PHH Treble- GSI )
    Download from :-
    https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list

    6.1) Extract Downloaded archive & Replace "system.img" with your GSI img
    (rename it to system.img over-written the old file.)


    Screenshot_20220918_002502_Gallery.jpg

    6.2 )
    Move all img files (6.1)
    from /home/username/extracted folder into /home/username/


    7.) Get each partitions file size.

    we can do it by:

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

    :- do it for all partitions files.

    7.1
    Code:
    stat -c '%n %s' system.img
    Exam output---system.img 308 951 4496

    7.2
    Code:
    stat -c '%n %s' vendor.img
    Exam ouputt----vendor.img 718 503 936

    7.3
    Code:
    stat -c '%n %s' product.img
    Exam output----product.img 118 811 8528

    7.4
    Code:
    stat -c '%n %s' odm.img
    Exam output----odm.img 434 9952

    7.5 ***size of the "original super.raw"
    Code:
    stat -c '%n %s' super.raw
    Exam output----super.raw 609 432 3712

    Screenshot_20220918_002752_Gallery.jpg

    ✓ Repacked modified sub-partition back​

    8) Repacked new super.img.

    8.1 fill in "img partition size" formular (parameter) to your prepared command below

    explanation:
    Screenshot_20220918_074316_Gallery.jpg

    explanation:
    Prepared command "LPMAKE" parameter
    sudo ./otatools/bin/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

    Note:
    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.
    ====================

    8.2
    Download & extract : OTATOOLS to /home/username/
    here: **We only want to use "lpmake" from its.


    *** If you have a problem when used command " sudo ./otatools/bin/lpmake --metadata-size 65536 \ bra bra bra
    Error message: Command not found.

    Do this...
    Code:
     chmod +x otatools/bin/lpmake
    or
    Code:
    chmod -R +x otatools

    > exit terminal and Login Back again

    home-fortuner6898.PNG
    8.3) execute prepared formular (8.1) with this command

    Note: Numeric are my Example only.
    1. Fix partition size ( odm + product + vendor )
    434 9952 + 118 811 8528 + 718 503 936 = 1,910,972,416 + (new system.img )= Sum of all 4 partition.

    2. Fix All partition ( super.raw) = 609 432 3712

    ***DO NOT COPY!!***
    explanation:


    Code:
     sudo ./otatools/bin/lpmake --metadata-size 65536 \
     --super-name super \
     --metadata-slots 2 \
     --device super:6094323712 \
     --group main:5000486912\
     --partition odm:readonly:4349952:main \
     --image odm=./odm.img \
     --partition product:readonly:1188118528:main \
     --image product=./product.img \
     --partition system:readonly:3864137728:main \
     --image system=./system.img \
     --partition vendor:readonly:718503936:main \
     --image vendor=./vendor.img \
     --sparse \
     --output ./super_new.img

    OUTPUT SHOW:-
    lpmake I 09-11 03:32:54 36 36 builder.cpp:1012] [liblp]Partition odm will resize from 0 bytes to 4349952 bytes
    lpmake I 09-11 03:32:54 36 36 builder.cpp:1012] [liblp]Partition product will resize from 0 bytes to 1188118528 bytes
    lpmake I 09-11 03:32:54 36 36 builder.cpp:1012] [liblp]Partition system will resize from 0 bytes to 3864137728 bytes
    lpmake I 09-11 03:32:54 36 36 builder.cpp:1012] [liblp]Partition vendor will resize from 0 bytes to 718503936 bytes
    Invalid sparse file format at header magic
    Invalid sparse file format at header magic
    Invalid sparse file format at header magic
    Invalid sparse file format at header magic

    **lpmake expand partition success. Resize from 0 bytes to 9999999 bytes
    **ignored Invalid sparse file format at header magic

    ✓Compress repacked modified new super.img​


    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

    Download Clean vbmeta.img from Google
    https://dl.google.com/developers/android/qt/images/gsi/vbmeta.img

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


    Win10
    (From Attachment download.)

    11). Down& Extract "tar-md5-script-tool.zip" to C;\

    11.1 extract all *.img.lz4 files (from AP Stock) to. C:/ tar-md5-script-tool folder


    12) 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)--->output from step 9

    and the clean compressed
    vbmeta.img.lz4. ------> output from step 10

    Screenshot_20220918_073427_Gallery.jpg


    13) Run Win Batch File For Packing Custom AP file (tar.md5) for Odin

    Run batch.bat in tar-md5-script-tool folder
    [You will find the " AP_TAR_MD5_CUSTOM_FILE_ODIN.tar.md5"
    in the temp-folder subdir]

    ***Don't Rename


    11.PNG



    14) Final Flashing with ODin
    ...14.1) Device must installed Stock Firmware. (No root)
    * No bad critical conditions happened when you are on STOCK ROM.

    ... 14.2) OEM Unlock [Developer options] must gray out but
    . enable on position.

    ... 14.3) KG State Must be "Checking state" status.
    ( if kg state = Broken ) = you must have goto flash Pure stock firmware
    again and this time uses ONLY "CSC" factory reset
    . *NO used Home_CSC
    After finished odin fashing must connected internet, check "kg status"
    again )

    ...14.4) Flashing all files at once, don't ignored any slot.( AP+BL+CP+CSC)
    except USERDATA
    (Odin will shrink non-slot data size automatically)

    ...14.5) After Device reboot
    (1st) show android robot - remove old system
    (2nd) Due to new vbmeta.img has changed from stock , tab will reboot to
    Recovery menu , you must select its factory reset menu manually.


    ...14.6) Click Magisk icon app to update
    " Upgrade to full Magisk to finish the setup. Download and install"OK
    - Magisk app will not reboot but update itself. But if you open app
    again it will asked to reboot for addition upgrade.

    odin-all-sametime.PNG

    >AP SLOT : AP_TAR_MD5_CUSTOM_FILE_ODIN.tar.md5
    >BL Slot : BL Stock.md5
    >CP SLOT: CP Stock.md5
    >CSC Slot: CSC Stock.md5 ------> (Don't uses HOME_CSC)
    >USERDATA Slot: magisk_boot_vbmeta_patch.tar

    ✓ How to create Magisk patch for boot.img + vbmeta.img
    1. extract (vbmeta.img.lz4 + boot.img.lz4) from your AP Stock
    2. create compress one file xxx .tar with 7zip
    3. move (vbmeta.img.lz4 + boot.img.lz4).tar (xxx.tar) to tab a7 lite
    4. install magisk.apk on you tab a7 lite
    5. patch the tar file. (with magisk manager)
    6. result magisk-patch file at Tab a7 :-Download folder.

    Recommend: Default R/W GSI " by Nazim"

    My Examples
    https://forum.xda-developers.com/t/...-lite-gsi-installation.4503647/#post-87550627

    If you can't booted "VNDK Lite" variant but want to uses mount Read/Write .
    Part3 -Create CustomAP Tutorial.
    2
    after flashing patched Magisk file can I just stop here without putting the TWRP and use tablet as its with root? what are the advantages of having the twrp since there is no ROM and encryption still going to be there?
    1. Root ( by patch boot.img with magisk ) is not depended on TWRP.

    2. We can uses Fastboot of TWRP for flashing GSI (system) because Sam devices have not using Fastboot mode.

    3. if you don't uses fastboot or twrp for flashing tools , the only thing left is odin.

    Go to customize your sam device with odin if you want. :coffee:
    1
    You misunderstood my post. I am talking about the headphone jack, not Bluetooth but wired headphones.
    I never used Bluetooth with Sony. Used only wired.
    Try to setup GSI here
    -Samsung features
    Enable stereo audio mode
    Enable extra sensor
    s

    -Misc features
    Use alternate way to detect headsets
    Disable audio effects

    and reboot
    1
    So yours doesn't output sound along with the speakers? Anything specific I need to setup at the phh settings? I only know how to fully fix Bluetooth but never managed to do the same for wired audio.
    Try it ..will work . I only uses Bluetooth with Samsung buds 2 only. Sony with wired.
    1

    <<<< Note PE v.415 BUG NOT BOOT FROM MEDIATEK>>>>​

    Easy & Quick RESTORE FROM (Any GSI) BACK TO (STOCK with TWRP)

    !!! If you are already on the A11 (Pure Stock)
    !!! Bootloader unlocked.
    !!! IF CAME FROM "SOFT BRICKED"

    (Forced Restart to Download mode.)--from system failure

    Press key combo ( Power + vol up + vol down ) until blank screen then release power button but still press and hold ( Vol up + Vol down ) + connect USB cable to Computer. ( Download mode)

    0. Download the actual FW A11 with Frija or samfirm or Bifrost, and extract
    it and you will get 5 files (AP, BL, CP, CSC and HOME_CSC). All files are in tar format and can be opened by 7-Zip, WinRAR or other software.

    1. Flash the FW A11
    - BL + AP + CP + CSC ( clean data)
    - put (TWRP + vbmeta_disabler)dot tar in USERDATA slot.
    and click "Start"

    NOTE.
    • Default Odin Auto reboot to system.

    But Your device will reboot but it will not boot into system as "vbmeta signature" has changed.

    2. When Auto Boot into TWRP mode from step 1. TAB screen may be black , you must activates it by press power then volumn.

    Insert USB OTG attach mouse. wait for mouse detecting.

    In your TWRP Recovery menu.

    • Go to Advanced > Terminal, type: multidisabler. Click Enter.

    • Go back to Main menu , Wipe > Format Data > type yes.

    Option<<<Install the Magisk.apk with TWRP >>>

    3. Boot---->System
    Done

    >>>>>>>>>>>>>>>>>>

    From your Computer

    1. INSTALL "Android Bootloader interface" Driver. (Download from First page OP)

    Note: very important bootloader driver for used fastboot of the twrp.
    Android Bootloader Interface Drivers are needed for your PC to identify the device connected in Fastboot Mode and hence execute the desired Fastboot Commands.

    2. Copy & paste "Platform tools" to C:/ and copy &paste GSI.img into this folder. ( "vbmeta.img" IF NOT FOUNDED , PLEASE EXTRACTED FROM YOUR AP FILE)

    3. Run Cmd or Open cmd.bat from inside folder platform tools ,

    Code:
    adb reboot fastboot
    >>>tab will auto reboot to "TWRP fastoot mode" (ignored black screen)

    fastboot devices
    .>>>Output screen will show your tab S/n

    Code:
    fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

    Code:
    fastboot erase system

    Code:
    fastboot flash system yourGSI.img
    >>> ignored invalid spare 'system'...at header magic
    >>> divided PE system image file into parts suitable for write to dynamic tab
    > system partition.

    Code:
    fastboot -w
    >>>This will also erase your internal storage.

    Code:
    fastboot reboot recovery
    >>>>>>Booting to TWRP

    from TWRP menu
    wipe --->format data --->yes
    reboot System

    Now meet PE.

    ain1.PNG

    Detail: download OP: !!! Want more detail , please download Ain1.jpg https://forum.xda-developers.com/attachments/ain1-jpg.5691897/
    Update
    Pixel Experience 12.1 v415.1 ( not boot on mediatek )


    >>>>>>>Tools Resources.<<<<<

    Download: (TWRP225 + vbmeta_disabler).tar https://mega.nz/file/QTIWmTJb#jIneu-vSC-tOSzN-mFhOurCtShGuZTkyoRrQ791R24s

    PE+ PixelExperience_Plus_arm64-ab-vndklite-12.1-20220613-UNOFFICIAL.img.xz

    PE PixelExperience_arm64-ab-vndklite-12.1-20220612-UNOFFICIAL.img.xz

    A Magisk module to:
    • Hide tablet taskbar pill (Long press to hide, for Android 12.1+)
    • Fix tablet taskbar height (for PixelExperience 12.1)

    SamsungAppsPatcher:

    >>>>>>>>>>>>>>>>
    can you upload the vbmeta file that you used?
    I am doing all the steps, but it stays stuck on the TWRP (it is booting again and again to TWRP).

    Is there any other step to do?

    I am trying to install GSI PE for sm-t225n, which pixel experience version should I use?

    thx!