The objective is to enable USB tethering programmatically. For this I'm relying on reflection and ConnectivityManager
.
getTetheredIfaces
returns the interfacerndis0
when tethering is enabled via the phone menu and nothing when disabled.getTetherableUsbRegexs
returns two regexes—rndis\d
andusb\d
.getTetherableIfaces
returnswlan0
if WiFi is enabled, nothing otherwise.
I would expect getTetherableIfaces
to return rndis0
or usb0
which I could use to enable USB tethering using the tether
method. Any idea why this is not happening or on how to enable USB tethering in these conditions?
If I try forcing either interface into the tether
method I get a Tried to Tether an unknown iface :rndis0, ignoring
error.