You cannot factory reset a BB10 device via hardware buttons. If you’ve forgotten your device password or bought a used Q5 that is locked to a previous owner’s BlackBerry ID, the is to flash new firmware. This wipes the secure partition, including the BlackBerry Protect lock.
: You cannot sign in to a BBID on a fresh wipe, which can lead to the device being stuck at the "Setup" screen. blackberry q5 sqr1002 firmware
Connect the device directly to your computer’s motherboard USB port, avoiding external USB hubs. You cannot factory reset a BB10 device via hardware buttons