My phone fell from my pocket while on a bike. After a while it was giving me some problems so I decided to resetting it. I'm in China now and I forget that I have to do through all the processes but China is blocking Google's servers so I can't complete the connectivity check.
As seen in other answers, VPN is the best solution.
In case you don't have a VPN or it fails to connect, do as follows. This won't do any harm to your phone.
1. Unlock bootloader (if needed) and flash a custom recovery (if TWRP is available for your phone, go straight for it) and boot into it
2. Tap 'Mounts' and tick 'system'
3. Tap 'Advanced' and 'File Manager', locate
Android 4.1 & before:
Android 5.1 & after:
4. Rename it to SetupWizard.bak
Other custom recovery like CWM:
2. Navigate to 'Mounts' using volume buttons and press power button to enter
3. Again navigate to 'mount /system' and press power button
4. Get a PC (with adb available) and run
adb shell mv /system/app/SetupWizard.apk /system/app/SetupWizard.bak
Change the path to SetupWizard.apk respectively according to the information above. Then reboot.
After rebooting from recovery, you'll find that the setup screen is gone and there's no more troubles.
Edit: For most highly customized ROMs in China like MIUI and Huawei's EMUI and ZTE's, there may be other setup wizards called mi_SetupWizard.apk or hwSetupWizard.apk or ZSetupWizard.apk, respectively, which exist along side the AOSP's one (usually located in
/system/app regardless of ROM version). Remove them as well.
Assume you already have a VPN, or a Shadowsocks connection that works globally (i.e. not just for your browser - all applications on PC must be able to use it). If using Shadowsocks and don't know how to do it, look up another (paid) software called Proxifier. I will leave this part out since this is not so relevant.
Connect PC and phone to the same network / same router. Install Privoxy and start it up, the default working port is 8118. Also get the local IP of your PC, for example
Now, on the phone in setup wizard, it will initially ask you to set up wireless network. At this phase, choose something like "options" or "advanced" so that you could tweak the network's advanced settings. Choose "manual" for proxy type, fill the IP into the hostname field and port into the port field, presumably like this:
Done. Save this settings and you should be able to proceed with the rest of the setup.