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?
Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.
This works really well for and is really simple
adb -s $PHONESERIAL shell "svc wifi enable"
WiFi can be enabled by altering the settings.db like so:
adb shell sqlite3 /data/data/com.android.providers.settings/databases/settings.db update secure set value=1 where name='wifi_on';
You may need to reboot after altering this to get it to actually turn WiFi on.
This solution comes from a blog post that remarks it works for Android 4.0. I don't know if the earlier versions are the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With