Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

[Q] Initiate tether automatically ?

$
0
0
Hello,

I am using an Alcatel 991D mobile (Android 2.3.6).

Basically I want my phone to automatically set up tethering as soon as the mobile is beeing connected by USB to my linux server.

Everything needed is worked out by myself (setting up USB0, Portforwarding,NAT).

Unfortunately the mobile is not beeing recognized as an rndis device. Usually this is solved, by ticking "USB-Tethering" on the mobile.
I want to achieve this by a command executed on the mobile.

I found out the following command starts the "USB-Tethering" dialogue:
adb shell am start -a android.intent.action.MAIN -n com.android.settings/.TetherSettings

But it is not activated. Just the dialogue comes up and I have to activate it manually.

Further investigation reveals there is a function called "enableUsbRndis" but I am not sure how to take an advantage of this fact.
I am not willing to install any 3rd party apk's; if I have to reach the "enableUsbRndis" function only by programming, then I am open for this way.

I appreciate any help.

Regards,
Peter

Viewing all articles
Browse latest Browse all 3614

Trending Articles