Ok so what you always do when you get phone for saving data,checking adb,right ?
Ohh **** adb is not enabled,now what return phone to customer ?
No no no i'm here for this to tell you how to do this even adb off
Android sdk installed or download adbfastboot from here.
Odin flashable custom recovery (Google it plz).
Odin 1.85 from here (You can use latest too).
And samsung android with pattern or password locked
You must have idea how to use adb or first learn adb then come here.
1) Connect your phone into download mode (Vol down + home + power).
2) Open odin and in pda select custom recovery and uncheck auto reboot,and do start.
3) Once recovery flashing complete,reboot your phone to recovery (Vol up + home + power).
4) Once your in recovery connect phone to pc,now you have adb and root too
5) Navigate adb fastboot folder in cmd,and type this command one by one.
"adb devices" this for make sure phone is connected.
"adb shell" to make connection between pc and android.
"cd data/system" to change dir in android phone.
"rm *.key" to remove pattern and password.
Now pattern and password removed,in case phone ask for password or pattern enter anything and it will unlock.
Some info :-
All the commands are without quote.
Some time flashing wrong recovery may brick the phone,do at your risk.
Do not try this in nexus device,as you will unlock bootloader to flash recovery,phone will be wipe.