[Samsung Galaxy Tab A series Guides, News, & Discus] System23:
I have Test it But its not Working on my SM-T510, the Recovery must be the Original from Firmware AP and a view Lines in the Script2.sh must be corrected

~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery e10313aaf40300aa6ecc009420010034 e10313aaf40300aa6ecc0094 # 20 01 00 35

~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery eec3009420010034 eec3009420010035

~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 3ad3009420010034 3ad3009420010035

~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 50c0009420010034 50c0009420010035

~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 080109aae80000b4 080109aae80000b5

~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 20f0a6ef38b1681c 20f0a6ef38b9681c

~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 23f03aed38b1681c 23f03aed38b9681c

~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 20f09eef38b1681c 20f09eef38b9681c

~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 26f0ceec30b1681c 26f0ceec30b9681c

~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 24f0fcee30b1681c 24f0fcee30b9681c

~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 27f02eeb30b1681c 27f02eeb30b9681c

~runner/work/Patch-Recovery/Patch-Recovery/magiskboot cpio ramdisk.cpio 'add 0755 system/bin/recovery system/bin/recovery'

~runner/work/Patch-Recovery/Patch-Recovery/magiskboot repack ../r.img new-boot.img

to the following

../magiskboot hexpatch system/bin/recovery e10313aaf40300aa6ecc009420010034 e10313aaf40300aa6ecc0094 # 20 01 00 35

../magiskboot hexpatch system/bin/recovery eec3009420010034 eec3009420010035

../magiskboot hexpatch system/bin/recovery 3ad3009420010034 3ad3009420010035

../magiskboot hexpatch system/bin/recovery 50c0009420010034 50c0009420010035

../magiskboot hexpatch system/bin/recovery 080109aae80000b4 080109aae80000b5

../magiskboot hexpatch system/bin/recovery 20f0a6ef38b1681c 20f0a6ef38b9681c

../magiskboot hexpatch system/bin/recovery 23f03aed38b1681c 23f03aed38b9681c

../magiskboot hexpatch system/bin/recovery 20f09eef38b1681c 20f09eef38b9681c

../magiskboot hexpatch system/bin/recovery 26f0ceec30b1681c 26f0ceec30b9681c

../magiskboot hexpatch system/bin/recovery 24f0fcee30b1681c 24f0fcee30b9681c

../magiskboot hexpatch system/bin/recovery 27f02eeb30b1681c 27f02eeb30b9681c

../magiskboot cpio ramdisk.cpio 'add 0755 system/bin/recovery system/bin/recovery'

../magiskboot repack ../r.img new-boot.img

than it works fine and create the Files

Flashing via Odin works

Patched Recovery starts and works too

but the Fastboot Function isnt availible

and the ADB is Unauthorisiert

so it is a Normal Stock Recovery

4 All they would Test it self here the Files

Firmware i used is T510XXU5CWA1

Patched_Recovery_FixeD_with_STOCK

Download the Files and Copy recovery.img.lz4 in working Dir and run in Linux Console

sudo apt install git wget lz4 tar openssl python3 -y

chmod 777 *

./script1.sh || true

./script2.sh || true

python3 avbtool extract_public_key --key phh.pem --output phh.pub.bin

python3 avbtool add_hash_footer --partition_name recovery --partition_size $(wc -c recovery.img |cut -f 1 -d ' ') --image recovery-patched.img --key phh.pem --algorithm SHA256_RSA4096

mkdir output

cd output

mv ../recovery-patched.img recovery.img

lz4 -B6 --content-size recovery.img

tar cvf fastbootd-recovery.tar recovery.img.lz4

md5sum fastbootd-recovery.tar >> fastbootd-recovery.tar

mv fastbootd-recovery.tar fastbootd-recovery.tar.md5

tar cvf fastbootd-recovery.tar recovery.img

Than ya have the Created Files in OUTPUT Folder!!!

a tar.md5, a tar, a img File so ya can Flash it via Odin or TWRP!!!

I Affraid when you Test it too and give me Feedback what happend on your Devices!!!

Original_Github_Source

THX to

Phhusson Without his script nothing would be possible at the first place

James Nguyen Helping me in simplifying the scripts and tweaking it