This question already has an answer here:
- How to turn off Wifi via ADB? 8 answers
My phone has been locked (too many pattern attempts). To unlock I need to enter username and password on my gmail account. This is the only way I can unlock it. I cant launch any activities, even to turn on wifi connection. Without internet connection I can't sign in to restore my phone.
Maybe there is any command in adb to turn on my wifi connection, so I can use my phone?
If you are locked out and WiFi is turned off in your Androud device then one solution is to connect your phone to a PC (connected to internet) and try to login with your google account. - it worked for me.
In my ROM, it's stored in the "global" database, rather than "secure". So D__'s answer is correct, but the sql line needs to connect to a different database:
It's so easy, man. Just press on the power button until you see the "Phone Options" screen and turn on mobile data. After that you can sign into your account or remotely unlock your device.
I was having the same problem. my phone was locked and the wi-fi was off, but I signed into my gmail account and it was unlocked.
Hope this helps someone :)
You should start the WiFi activity from
adb
then simulate inputs:Here is the list of
adb
inputs: #7789826I'm not sure if those keyevents are the right one for your case, but I think it will do. It simulated a "down" to select the first checkbox, then an "enter".
Not sure if this rather simple solution is already posted here somewhere.
The problem is locked phone w/o wifi connection, not rooted and USB debugging disable (hell, worse possible situation). ADB can not be used since "Adb devices" do not detect device with USB debugging disabled. Tried recovery mode (can not enter it). Tried emergency mode (Adb still don't detect device). When I almost gave up and was like an inch from hard reset something strange happens. When I connect a phone to USB as usual USB entry screen appeared. Nothing new. What I noticed then is that in this screen it is actually possible to lower a drop down bar and bingo....I was able to turn wifi ON. And then just entered google account and phone was unlocked.
Hope I helped someone.