On the Samsung phone, go to Settings > Accounts > Samsung Account > Find My Mobile > Turn off Reactivation Lock . (This prevents the phone from resetting during the process).
The process generally looks like this:
(Best if this is software for reading codes, unlocking devices, or file management)