[Samsung Galaxy A3, A5, A7 (2017) ROMs, Kernels, Re] obifur:
For everyone, who is interested in having the stock rom with all the advantages (stable rom, working AOD, ..) but like to debloat it and want to use microG instead of Google, here is how I achive this.

Tested on Device: Galaxy SM-A320FL (A3 2017)

Remark:

This is a step by step guidance of what I did, but it's most likely not the only way to achive this.

Result:

- Stock ROM with all features but without google

- rooted device

- signature spoofing enabled

- microG completely working (geo location services, fake playstore)

Not working:

- SafetyNet (There might be a solution but I didn't try)

Detailed Steps:

- download ROM from: https://www.sammobile.com/ (you need to register). I used A320FLXXS7CTB2_A320FLTIM7CTB1_TIM because it was the newest.. from Italy, but that is no problem, language can be easily changed on first startup.

- Enter Download Mode (press vol.down + home + power on) and use Odin3: (https://xdaforums.com/showthread.php?t=2711451) to flash ROM

flash stock ROM (BL, AP, CP, CSC)

boot system (might not be neseccary.. but I did it)

- Enter Download Mode

flash custom recovery TWRP (https://dl.twrp.me/a3y17lte/):

Use .img.tar file and flash via Odin3 in the AP-slot ..and be ready when device reboots after finishing flashing.. see next step

- boot directly (!) into TWRP (press vol.up + home + power on, until Display shows "Galaxy..")

to be able to mount /data choose "format Data"

reboot directly into TWRP (might not be neseccary.. but I did it)

remark: At windows you might want to use "[TOOL]Minimal ADB and Fastboot" portable (https://xdaforums.com/showthread.php?t=2317790) for being able to "adb push" files to your device or to use sideload.

check that /data is able to mount

install Magisk-v20.4.zip

(https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445)

install "Disable_Dm-Verity_ForceEncrypt_Quota_03.04.2020.zip"

(https://xdaforums.com/android/software/universal-dm-verity-forceencrypt-t3817389)

(add "quota" in the filename to disable it - otherwise it won't work!! This step is required for TWRP being able to mount /data after reboot because TWRP doesn't seem to support Quota)

- boot ROM

install busybox via Magisk Manager (might not be neseccary.. )

- boot into TWRP

check that /data is able to mount

NanoDroid:

(https://xdaforums.com/apps/magisk/module-nanomod-5-0-20170405-microg-t3584928)

mount /system read-write and remove the following folders

GApps GmsCore (which can have multiple paths, depending on the ROM):

/system/priv-app/GmsCore

/system/priv-app/GmsCore_update

/system/priv-app/PrebuiltGmsCore

/system/priv-app/PrebuiltGmsCorePi

/system/priv-app/PrebuiltGmsCorePix

/system/priv-app/GoogleServicesFramework

/system/priv-app/Phonesky

- boot ROM (ignore all those complaints that Play Services are missing) this is step is required!

To enable Signature Spoofing:

At Windows use SmaliPatcher.exe to create your installable zip-file with de-odexed services.jar etc. and copy to your device (https://xdaforums.com/apps/magisk/module-smali-patcher-0-7-t3680053). Then:

install your SmaliPatch zip-file via Magisk Manager

reboot (might not be neseccary.. )

- boot into TWRP to install NanoDroid. I did't install the full package, just:

install NanoDroid-microG-22.6.20200208.zip

install NanoDroid-fdroid-22.6.20200208.zip

- reboot into ROM

- ..and remove the folders from /system/priv-app of every app which you don't need anymore.. there are a lot of Samsung apps which can be removed!

enjoy :)