After the erasing process, set up your device and restore your backed-up data. If your device is frozen, enter recovery mode. Power it down, then hold Volume Down+Power. This article explains how to ...
Few things are more infuriating than needing to get into a locked device, like a tablet or phone, when you don't remember the PIN or passcode.