STEP 1:Download Sidesync and Install sidesync in your computer
STEP 2:At the the google account screen. connect your device on computer
STEP 3:Plug the OTG cable to your phone and plug the flash drive to the other end of the cable.
STEP 4:The Samsung will automatically launch the file explorer showing the root directory of the flash drive you just plugged in.
STEP 5:Touch the APK file.
STEP 6:A system dialog box will pop up warning you that sideloading of apps is blocked by default. Touch Settings to continue.
STEP 7:Tap Unknown Sources, then OK. You can proceed to the installation of the APK file.
STEP 8:After the installation, tap Open. You can now access the Settings menu.
STEP 9: Unplug the OTG cable from your phone.
STEP 10:Scroll down to Backup and reset and proceed with the Factory Reset.
So, basically, all you need to do after following all those steps is the Factory Reset so you can have full access to your phone. It’s easy, right? The most difficult part is accessing Settings when you’re locked out.