[Samsung Galaxy A52 4G] Viktor P:
Hi Simon 1511,

I just went through all steps and smoothly installed everything. As your brief points were not detailed enough and I had to search a lot around and I made myself some notes. Here are the notes:

Secondhand Samsung A52 (SM-A525F/DS)

Android 12 (One UI v4.1)

Baseband version A525FXXU4BVG2

Android security patch level October 1, 2022

= Backup Samsung stock ROM =​

== Backup using fastboot (spoiler: does not work)​

Power off by pressing vol_down + side_key

when screen goes off keep holding vol_up + side_key

release all buttons when Samsung logo appears

select Reboot to bootloader

on PC run: fastboot reboot twrp-3.7.0_12-0-a52q.img

ends with error: fastboot FAILED (remote: 'unknown command')

this method cannot be used with Samsung devices as Samsung does not support fastboot

== Backup using flash TWRP (spoiler: does not work)​

Factory reset your phone, boot and skip what is possible (mainly any security patterns, fingerprints etc.). Just connect to Internet.

Open Development Options (7 taps on Build number)

OEM Unlocking (Allow the bootloader to be unlocked) ON (if you don't see the item in menu, connect to internet via WiFi and restart phone)

Switch off the phone (side_key + vol_down)

With disconnected PC cable hold vol_up and vol_down (download mode) and connect PC cable

Unlock bootloader (long vol_up and vol_up on the next screen)

Wait for deleting all data and reboot to stock ROM.

Skip through first run wizard again (just connect to Internet) and check that OEM Unlocking is ON and grayed out. (Necessary step!)

Reboot to Unlock bootloader screen again, but this time press vol_up shortly to continue to download screen. By the way, if you select Lock Bootloader, you still can get original phone with warranty.

Now, if you use vbmeta_disabler.tar in the next step you will break stock rom. But without using it you cannot boot into TWRP recovery. From this fact I conclude, that it is not possible to backup stock ROM.

Start Odin and put vbmeta_dislabed.tar in AP field. Disable Auto reboot options and flash by pressing Start. Without this step you will get "Invalid verifying vbmeta image." in the next step.

Put twrp-3.7.0_12-0-a52q.img.tar in AP field. Disable Auto reboot options and flash by pressing Start.

Reboot (Down+side) and immediately after display gets black boot to recovery (Up+side)

In TWRP Backup all excluding Data (it is erased anyway) and in options enable compression. Backup.

Unfortunatelly, as the vbmeta_disabled.tar modified stock rom and Samsung firmware immediately finds this out the backup is probably useless.

Fortunatelly, I was able to download the stock rom at sammobile.com .

= Installing Lineage with Google Apps and Magisk root (optional) (spoiler: works like a charm) =​

Go through previous chapter "Backup using flash TWRP" up to the point where you boot into TWRP recovery (just before making backup)

Click Mount and uncheck all partitions leaving just Micro SD card

on PC: go to https://topjohnwu.github.io/Magisk/install.html

download last version of Magisk app and rename .apk extension to .zip.

Upload lineage, GApps and Magisk to the phone SD card using adb and USB cable:

adb push Magisk-v25.2.apk /external_sd
adb push lineage-19.1-20221125-nightly-a52q-signed.zip /external_sd
adb push MindTheGapps-12.1.0-arm64-20220605_112439.zip /external_sd

in TWRP Install lineage, return home

in TWRP Install MindTheGapps, return home

in TWRP Install Magisk, return home

Wipe->Format Data->yes

Wipe->Advance Wipe->Select Cache and Metadata->Wipe, reboot system

Boot in Lineage and go properly through welcome wizard.

Go to files, navigate to SD card, rename Magisk .zip file to .apk file and install it

Start Magisk and let it reboot your phone and finish the installation.

And now many days of restoring all custom settings of my UI.