I\'m setting up some tests and it will require a decent number of phones to be usb tethered and configured. I\'ve been successful in configuring them the way I want to once
Must have root to change values with setprop
, and I am on a Mac OS without a rndis driver so I could not test your method of USB tethering. Another way, if you have the connectivity service (adb shell service list
):
The following commands call ConnectivityManager.setUsbTethering(boolean enable)
in Android 4.3:
adb shell su -c service call connectivity 34 i32 1
turns on USB tethering.
adb shell su -c service call connectivity 34 i32 0
turns off USB tethering.
For other Android versions replace 34
with the following setUsbTethering
calling codes per Android version:
4.4.4: 34
5.1.0: 30
6.0.1: 30
7.0.0: 33