1. Power on the phone.
2. Type *#0808# and select "DM+MODEM+ADB".
3. Type *#9090# and select "DM/DUN over HSIC".
4. Connect phone to PC with USB cable, install drivers if needed.
5. Select diagnostic port in port settings.
6. Press "Unlock" button for direct unlock or "Read codes" to read security codes.

 To reset Google account activation or Samsung reactivation lock:
1. Power on phone in download mode (turn off phone, press vol.down + home + power).
2. Connect phone to PC with USB cable, install drivers if needed.
3. Press "Reset FRP/React/EE" to deactivate Google/Samsung/EE account activation lock.
  (Sometimes needs to perform "wipe data/factory reset" once more, to complete this locks removal.)