android adb turn on wifi via adb

pleerock picture pleerock · Apr 23, 2012 · Viewed 108k times · Source

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?

Answer

devin picture devin · Nov 30, 2012

This works really well for and is really simple

adb -s $PHONESERIAL shell "svc wifi enable"