appium/appium-android-driver

enable/disable data fix

scottdixon-zz opened this issue · 6 comments

appium-android-driver is failing to set mobile data on API23.

adb -s emulator-5554 shell am start -n io.appium.settings/.Settings -e data off
adb -s emulator-5554 shell settings get global mobile_data // --> 1 (should be 0)

More info: http://stackoverflow.com/questions/26539445/the-setmobiledataenabled-method-is-no-longer-callable-as-of-android-l-and-later

I've tested the following commands on API23 with success:

shell svc data enable
shell settings get global mobile_data // --> 1
shell svc data disable
shell settings get global mobile_data // --> 0

This will require testing against all supported API levels.

Ugh. Thanks!

shell svc data enable
shell svc data disable

works on an emulatorx86 with API 19

Good to know. Thanks @vrunoa

shell svc data enable
shell svc data disable

isn't working on a Moto E with Android 5.1 API 22

svc needs a root access on real devices.Fix is in here,

appium/appium-adb#158
#148

Issue moved to appium/appium #7399 via ZenHub