Google introduced a feature called Factory Reset Protection with Android 5.0 Lollipop that secures your device from unauthenticated use after a factory reset by requiring your Google account verification during device setup.

This makes it hard for a thief to use your device by simply doing a factory reset or OS reflash. However, what if you’re not a thief but someone who bought a previously owned device and now stuck at the setup wizard because you don’t know the Google account credentials of the first user.

Also, if you changed your Google account password in the past 72 hours, you won’t be able to use that account while setting up an Android device. And this coupled with a factory reset protection situation means you’re stuck for 72 hours from using your device even when you’ve the right Google account credentials.

Luckily for you, user joyrida12 over at xda has found a workaround to bypass Google account verification on setup. But there’s a big catch to his trick — you need a persistent ADB enabled ROM.

Finding an ADB enabled ROM can’t be easier, but deep looking into the XDA forums for your device will definitely help. As far as we know, pre-rooted ROMs do come with persistent ADB enabled.

By now it must already be clear to you that joyrida12’s workaround to bypass factory reset protection has something to with ADB. Well, yes. Let’s find about it in detail in the step-by-step guide below:

How to Bypass Google Account Verification
  1. Make sure you’ve a custom ROM installed with persistent ADB enabled.
  2. Setup ADB and Fastboot on your PC.
  3. Turn on your device, let it sit at the setup screen.
  4. Connect device to PC via USB and select “Yes” when asked authorize USB debugging on the device.
  5. Open a command prompt window on your PC and type the following commands:
    adb shell
    am start -S com.android.settings -c android.intent.category.LAUNCHER 1

    └ This will open the Settings app on your device.

  6. From device Settings, select “Backup & Reset” and then select “Factory data reset” to perform a complete wipe of the device.
    └ Note that this will erase everything on your internal storage. Make sure you’ve a backup of important files before doing a factory reset.
  7. Once factory reset is done, boot back into recovery mode/fastboot mode and re-flash your desired ROM.

The device will no longer ask for verification of Google account during setup.

Happy Androiding!

via xda