Open Magisk, tap , choose Select and Patch a File , and select the AP file.
In the slot, select the magisk_patched.tar file you created earlier. samsung-a305f-u1-android-9-root-file
Power off the device. Connect it to a PC while holding to enter Download Mode. Open Magisk, tap , choose Select and Patch
Once finished, transfer the new magisk_patched.tar file from your phone's Download folder back to your PC. Put your phone back into Download Mode . Open Odin on your PC. choose Select and Patch a File