[Samsung Galaxy M12] physwizz:
Did you follow my instructions?

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.

For Exynos 850 android 11 use a21s patched magisk.

For android 12 and most other devices use delta magisk or canary magisk

(26.4 will not work)

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

Note1: Many phones will bootloop if you format data

Note 2: 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 from Odin into the ap slot

5. reboot to recovery

6. Advanced, terminal. Type multidisabler. Type multidisabler.

7.

Or flash samsung multidisabler zip

Or, for older phones flash dmverity zip

Note : Multidisabler will not work on some phones so you should start from step 5 in method 3 or decrypt manually

8. Reboot to recovery from main menu (not just reboot)

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

(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. change data partition to ext4

(Wipe, advanced wipe, select data, change file 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 and change data back to f2fs

12. Flash Magisk for root(only for old phones)

Method 4

Using a second phone

With Thor or Heimdall

Method 5

If you have already installed recovery and decrypted.

install from system

1. extract recovery.img from tar file

2. open terminal app

3. navigate to folder containing recovery.img

4. type the following

dd if=/sdcard/recovery.img of=/dev/block/by-name/recovery

read t -5;reboot recovery

Method 6

Try bugjaeger mobile adb-usb otg app

Method 7

Flash with flashify

C. Backup

Backup boot, data, super (and dtbo if there)

If your GSI doesn't boot flash stock recovery and reboot

D. Recovery Problems?

1. Did you root using the full ap file patched Magisk .

(This contains the patched boot.img and vbmeta.img)

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

3. Did you download the recovery to match your baseband?

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.

6. Did you type multidisabler twice?

If it doesn't work try the manual unencrypt method or use method 3 starting from step 5

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

10. If you can't see all the partitions use Dynapatch

E. 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