Development [RECOVERY][UNOFFICIAL] TWRP for Galaxy A22 SM-a225F/a225M Android 11+12

Search This thread

physwizz

Senior Member
Sep 16, 2013
4,126
933
Sydney
Installing Custom Recoveries

A. Preparation.

1. Download firmware for your device
2. Extract ap file using Zarchiver and extract recovery.img from recovery.img.lz4 and compress it to recovery.tar

3. Patch the ap file with a magisk which will patch both boot.img and vbmeta.img (from magisk, choose install then select file to patch)

Alternatively you can extract boot.img.lz4 and vbmeta.img.lz4 from the ap file and compress them into a new tar file and then patch that file.

note: if you don't want root then just extract the vbmeta.img and use zarchiver to add it to my twrp.tar file.
You can flash this new file from odin at step 5

For Exynos 850 android 11 use a21s patched magisk.

For Exynos 850 android 12 and most other devices use delta magisk

4. Unlock OEM in developer options
5. Attach phone to pc and reboot to download mode
6. flash patched ap file.
Or..
Extract boot.img and vbmeta.img and add them to the TWRP zip.

7. Download recovery.img or download twrp.tar and extract recovery.img using Zarchiver.

B.Installation
Note: some phones may need to be connected a pc or other device to boot to recovery

Method 1.
1. Connect to pc and boot into stock recovery
2. Factory reset
3. Reboot into download mode.
4. flash twrp tar file into the ap slot
5. reboot to recovery
6. Advanced, terminal. Type multidisabler (twice).
7.
Or flash samsung multidisabler zip
Or, for older phones flash dmverity zip
8. Reboot to recovery from main menu (not just reboot)
Backup boot, data, super and dtbo
9. Reboot to system

Method 2.
If you have already installed recovery and decrypted.
Extract recovery.img
1. Boot to recovery.
2. Install recovery.img
3. Choose recovery partition
4. Reboot to system then reboot to recovery
Backup boot, data, super and dtbo
(For Pitch-black just install the zip)

Method 3.
1. Install TWRP app
Extract recovery.img
2. Install TWRP
3. Choose file to flash.(don't select device)
4. Select recovery.img.
5. Reboot to recovery.
6. (You may need to change data partition to ext4 first if format ruins your system)
7. Reboot to recovery.
8. Wipe, format data, type YES.
9. Advanced, terminal.
10.Type multidisabler (twice).
Or flash samsung multidisabler zip
Or, for older phones flash dmverity zip
11.Reboot to recovery
12. Flash Magisk for root(only for method 3)
13. Backup boot, data, super and dtbo

Method 4
Using a second phone

C. Recovery Problems

Most recovery issues can be solved by attending to the following issues.

1. Did you root using the full ap file patched Magisk .
(This contains the patched boot.img and vbmeta.img)
Exynos 850 users must use the special a217 magisk?

2. Did you then go all the way through the setup process?

3. Did you download the recovery to match your baseband?
See https://t.me/a127f_res/54 for Exynos 850 recoveries

4. Did you hold down power and volume up after Odin says pass?

5. Did you format data from stock recovery?
If you forgot to do this, just install stock recovery.img from TWRP and reboot.

6. Did you type multidisabler twice?
If it doesn't work try this

7. Did you reboot to recovery by choosing reboot from the menu and then choosing recovery?

8. To avoid touch issues go to settings and untick "allow time out"

9.For touch issues use a usb mouse

D.To restore Stock Recovery

1. Attach phone to pc and reboot to download mode
2. flash patched ap file or stock recovery.tar
3. reboot

Or just flash stock recovery.img from twrp and reboot.

@physwizz
 

dtlucillek20

Member
May 23, 2020
15
0
hello good evening, is there a twrp compatible with android 13 one ui 5.1 binary 5? since even if I install by odin the download mode throws me the error, but I don't remember well, it says something about by lock: boot for example or what throws an error when flashing says it in that mode, and I don't know what to do anymore, I even tried patch the ap of my stock rom in magisk and flash it by odin and the same thing reaches a file and throws the error, some way to install it or another way to install a gsi.
From already thank you very much
 

physwizz

Senior Member
Sep 16, 2013
4,126
933
Sydney
hello good evening, is there a twrp compatible with android 13 one ui 5.1 binary 5? since even if I install by odin the download mode throws me the error, but I don't remember well, it says something about by lock: boot for example or what throws an error when flashing says it in that mode, and I don't know what to do anymore, I even tried patch the ap of my stock rom in magisk and flash it by odin and the same thing reaches a file and throws the error, some way to install it or another way to install a gsi.
From already thank you very much
You need to unlock bootloader.



To Unlock Bootloader
1. On phone developer options in settings allow OEM unlocking and enable usb debugging by moving both
sliders RIGHT

If you don't see the OEM unlock
-Disable Auto System Update
-Then disable Automatic date and time (Found in General Management) > then set the time back 14 days
- Connect to the internet
-Go to software update then check for update and wait a long time till it registers the device on server
-Once it's registered the OEM Unlock should be visible in the Developer Options

then connect phone to PC or to another phone
2. Reboot into download mode by holding down both Vol up and Vol down
(You might need to long press vol up to unlock bootloader)

then press vol up to continue
 

dtlucillek20

Member
May 23, 2020
15
0
You need to unlock bootloader.



To Unlock Bootloader
1. On phone developer options in settings allow OEM unlocking and enable usb debugging by moving both
sliders RIGHT

If you don't see the OEM unlock
-Disable Auto System Update
-Then disable Automatic date and time (Found in General Management) > then set the time back 14 days
- Connect to the internet
-Go to software update then check for update and wait a long time till it registers the device on server
-Once it's registered the OEM Unlock should be visible in the Developer Options

then connect phone to PC or to another phone
2. Reboot into download mode by holding down both Vol up and Vol down
(You might need to long press vol up to unlock bootloader)

then press vol up to continue
I already have the bootloader unlocked and in OEM activated and with A13 one ui 5.1 binary 5 the most recent is, what I don't think I have activated is usb debugging but the rest did and it gave me errors in anything I flashed
 

dtlucillek20

Member
May 23, 2020
15
0
You need to unlock bootloader.



To Unlock Bootloader
1. On phone developer options in settings allow OEM unlocking and enable usb debugging by moving both
sliders RIGHT

If you don't see the OEM unlock
-Disable Auto System Update
-Then disable Automatic date and time (Found in General Management) > then set the time back 14 days
- Connect to the internet
-Go to software update then check for update and wait a long time till it registers the device on server
-Once it's registered the OEM Unlock should be visible in the Developer Options

then connect phone to PC or to another phone
2. Reboot into download mode by holding down both Vol up and Vol down
(You might need to long press vol up to unlock bootloader)

then press vol up to continue
In the end you were right, I had it blocked to the bootloader, I already installed recovery and others but I want to install gsi and I can't find the system partition to choose to install it there, I get a lot of partitions but I don't know which one to choose, these are:
vendor, product, odm, prism, optics, mnt/vendor/efs, misc, recovery, boot, vbmeta_vendor, vbmeta_system, seccfg, tee1, tzar, scp1, sspm_1, md1img, gz1, dtbo, vbmeta, uh, bootloader, md_udc, efs, omr, optics image, param, prism image, reserved, sec1, steady, super, up_param, super (system vendor product odm)
 

physwizz

Senior Member
Sep 16, 2013
4,126
933
Sydney
In the end you were right, I had it blocked to the bootloader, I already installed recovery and others but I want to install gsi and I can't find the system partition to choose to install it there, I get a lot of partitions but I don't know which one to choose, these are:
vendor, product, odm, prism, optics, mnt/vendor/efs, misc, recovery, boot, vbmeta_vendor, vbmeta_system, seccfg, tee1, tzar, scp1, sspm_1, md1img, gz1, dtbo, vbmeta, uh, bootloader, md_udc, efs, omr, optics image, param, prism image, reserved, sec1, steady, super, up_param, super (system vendor product odm)
Install Dynapatch to get system_image

 

physwizz

Senior Member
Sep 16, 2013
4,126
933
Sydney
Thanks I was able to install gsi, now I wanted to know 2 things if you can help me, a gcam for the gsi and how to correctly install magisk on the phone.
From already thank you very much
Root

Method 1
(Method 2 is easier)

A. Prepare boot image

1. Download magisk manager apk
2. Download the exact firmware (including upgrade date) for your device from https://samfrew.com or https://www.samfirmware.net/ or https://www.full-repair-firmware.com/search?q=A20 or
3. Use zarchiver to copy AP_xxxxxxx.md5 to download directory. It will extract it from the zip.
4. Extract boot.img.lz4
5. Copy boot.img.Iz4 to download directory and extract (resulting in boot.img)
6. Use magisk manager to patch boot.img (use top install)
result magisk_patched.img
7. Rename magisk_patched.img to boot.img
9. Use zarchiver to compress boot.img to boot.tar.
10. Copy boot.tar to Windows pc or Windows Virtualbox.
11. On phone developer options in settings unlock OEM and enable usb debugging
12. Backup any important files from internal storage onto SD card.

B. Unlock bootloader

1. Turn phone off
2. Hold vol- and vol+ and plug in power cable attached to pc then release vol up to enter unlock screen.
3. Follow the instructions to unlock
(You might need to long press vol up to unlock bootloader)
vol + to select yes to confirm.
4. Press power key to unlock bootloader.

C. Flash boot image.

1. Use Odin in Windows to add boot.tar to phone. (Select AP). Some people recommend adding the other firmware parts to their slots at the same time.
2.Restart phone
3. select bootloader
4. Select factory reset (this will wipe data)
5. Restart phone and setup fully
6. install magisk manager
7. If green phone is rooted
8. If red select install/direct install
9. Advanced tick both.
10. Install root checker and verify root


Method 2

Use the above process but patch the ap......md5 file and flash that from Odin
 

davidvaner

Senior Member
Jan 2, 2017
83
9
NOT WORKING ON A13 FOR ME

hello everyone, follow the steps as is for version 12 but I have android 13 I am from Peru, it does not work for me, when I install magisk.patcher everything is fine without error, then the twrp recovery everything is fine without error, but when I reboot the system It appears in red letters that the system is not official from Samsung and it constantly reboots into bootloop

Any help for this? I have to reflash AP to use it again
 

david7xw

Senior Member
NOT WORKING ON A13 FOR ME

hello everyone, follow the steps as is for version 12 but I have android 13 I am from Peru, it does not work for me, when I install magisk.patcher everything is fine without error, then the twrp recovery everything is fine without error, but when I reboot the system It appears in red letters that the system is not official from Samsung and it constantly reboots into bootloop

Any help for this? I have to reflash AP to use it again
I think you forgot to do 1 step, did you write multidisabler in terminal? I also forgot to do it and it bootlooped for me too.
 

davidvaner

Senior Member
Jan 2, 2017
83
9
I think you forgot to do 1 step, did you write multidisabler in terminal? I also forgot to do it and it bootlooped for me too.
All the steps were done, as I am indicating, the issue is that as I indicated again, I get a warning in red letters that I am using unofficial software and the phone restarts.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    UPDATE



    Flash at your own Risk !!!

    Tested Working:

    Backup
    Flash zip
    Fastbootd support
    Flash gsi roms


    Not Working:

    Usb Otg
    You tell me


    How to Flash on Android 11

    1. Reboot Device to Downloadmode
    2. Unlock Bootloader
    3. Install adb and Fastboot driver and Device Drivers ( Google will Help )
    4. Download the VBMeta-disabled.tar and the twrpa22v3.tar from Attachments
    5. Download Odin3 from Attachments and start Odin on PC
    6. In Odin Press on Options and untick Auto Reboot
    7. Flash VBMeta-disabled.tar with Odin ( In Odin click on AP - select the vbmeta-disabled.tar and press start )
    8. After flash vbmeta without errors press on AP and select twrpa22v3.tar and press on start
    9. If all is Flashed without errors longpress power and vol- on device
    10. instantly after device goes Blackscreen press and hold power and vol+ for 5-8 seconds to boot to TWRP
    11. In TWRP press on Advanced - than on Terminal - and write " multidisabler " and press on the blue button
    12. repeat step 11
    13. press on reboot - than on recovery


    How to Flash on Android 12

    1. Reboot Device to Downloadmode
    2. Unlock Bootloader
    3. Install adb and Fastboot driver and Device Drivers ( Google will Help )
    4. Download the magisk patched.tar and the twrp12.1_a225f-A12.tar from Attachments
    5. Download Odin3 from Attachments and start Odin on PC
    6. In Odin Press on Options and untick Auto Reboot
    7. Flash magisk patched.tar with Odin ( In Odin click on AP - select the magisk patched.tar and press start )
    8. After flash magisk patched.tar without errors press on try to reboot download -device reboots to dl mode
    9. Flash twrp12.1_a225f-A12.tar with Odin ( In Odin click on AP - select the twrp12.1_a225f-A12.tar and press start )
    10. If all is Flashed without errors longpress power and vol- on device
    11. instantly after device goes Blackscreen press and hold power and vol+ for 5-8 seconds to boot to TWRP
    12. In TWRP press on Advanced - than on Terminal - and write " multidisabler " and press on the blue button
    13. repeat step 12
    14. press on reboot - than on recovery




    How to flash gsi:

    Use the google platform tools adb/fastboot Download from Attachments

    Boot to TWRP

    1. In TWRP press Wipe-Advanced Wipe- select Dalvik, data, cache, metadata and swipe to wipe
    2. After wipe go back to main screen and press Reboot- than press Fastboot
    3. Device reboots to TWRP with Fastboot Interface
    4. now plugin Device to PC open platform tools and execute cmd-here.exe
    5. Type : fastboot devices - if no output check your Drivers/Usb connection
    6. If device is Found by "fastboot devices" command enter " fastboot flash system PATHTOYOURGSI.img"
    maybe it writes :Invalid sparse file format at header magic - but this can be ignored
    After flash completed without errors type : fastboot reboot and press enter

    GSI Download (Tested and bootable ) :
    Only Arm64-BGZ Variants are bootable
    ( BTW gsi imgs with .xz File Format must be extracted ! Don't simple rename it to .img )

    CrDroid 11 (Face-unlock and Fingerprint works)
    android 12
    Bliss 11
    caos11

    Credits:

    afaneh92 For the a32x Devicetree​


    Screenshot_2021-09-14-00-27-42.png
    Screenshot_2021-09-14-00-28-21.png
    Screenshot_2021-09-14-00-28-50.png
    KI
    Device Tree base used : https://github.com/mohammad92/android_device_samsung_a32x

    A22 4g A11 Tree :https://github.com/deader89/galaxy-A22-4g-twrp-Tree
    A22 4g A12 Tree :https://github.com/deader89/a22_TWRP12.1_tree.git
    2
    Thank you for following your tutorial, successfully rooting, and flashing the system
    Screenshot_20211206-063119376.jpg
    1
    Hi there, I'm a noob regarding to this, but I was able to follow this guide successfully for my A225m.

    But I'd like to understand what's going on here, can you give an explanation about each step and what does it do?

    Also, can the vbmeta flashing be done _without_ Odin? For example using only fastboot (which works on Linux unlike Odin).
    https://android.googlesource.com/platform/external/avb/+/master/README.md this is documentation about vbmeta

    i think it cant be flashed without odin before twrp is installed
    1
    Otg work in twrp


    (tested with usb keyboard)
    1
    View attachment 5598531

    Caos Worked fast here but some stuffs did not, like Digital Fingerprint, USB file sharing (just on recovery mode) and the cameras do not count, due to a problem on them, so I can't say if it worked or not.

    Wireless worked on 2.4 and 5.8 GHz

    Dual Sim+SD card worked fine, all at the same time.

    Now I am goint to try another rom... this time will be the "lineage-19.1-20220410-UNOFFICIAL-arm64_bvS.img".... Let's see what will happen...
    a melhor GSI é a Pixel Experience...funciona super fluida ..mas tem os mesmos bugs
    wifi hotspot
    usb file