android adb turn on wifi via adb

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.


Try out the following which did work for me.

Method 1:

  1. Turn on the device
  2. Plug in the USB cable
  3. You will get the screen for turn on USB storage.
  4. Pull down the notification drawer
  5. Turn on wifi/Data

Tested on AT&T Fusion working fine.

Method 2:

Use the method given by shkschneider

adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
adb shell input keyevent 20 & adb shell input keyevent 23

This works only if you have USB debugging turned on. If you do not have USB debugging turned on under Development do the following.

  1. Turn off the device.
  2. Boot into recovery mode (Power button + Volume up)
  3. Plug the device into computer.
  4. Use the ADB tool to execute the same commands given by shkschneider

Tested on AT&T fusion working fine.


You can turn on wifi : - connect usb on pc; - will show alert dialog "connect UMS mode or KIES" - do not click, do not cancel - pull notification bar and turn on wifi.