Android Tethering - Shell To Python Code (SL4A API) I know I can convert how I call an activity from within a shell to python code. So given the correct code can someone help me in that conversion? I know I can use pyjinus so that should be another valid option. I can send keystrokes from shell and pyjinus. I'm root as well.

Shell

am start -a android.intent.action.MAIN -n com.android.settings/.TetherSettings


Python

Android.startActivity(String action, String uri[optional], String type[optional]: MIME type/subtype of the URI, JSONObject extras[optional]: a Map of extras to add to the Intent, Boolean wait[optional]: block until the user exits the started activity, String packagename[optional]: name of package. If used, requires classname to be useful, String classname[optional]: name of class. If used, requires packagename to be useful)


Here is a code to start SL4A that should serve as reference:

am start -a com.googlecode.android_scripting.action.LAUNCH_SERVER -n com.googlecode.android_scripting/.activity.ScriptingLayerServiceLauncher --ei com.googlecode.android_scripting.extra.USE_SERVICE_PORT 45001


I've tried with no luck:

Android.startActivity('android.intent.action.MAIN',None,None,None,'False','com.android.settings','com.android.settings/.TetherSettings')
Well I guess I was a little bit impatient... I came with the solution by removing some content on the python code:

So I'm posting what I changed:

Android.startActivity('android.intent.action.MAIN',None,None,None,False,'com.android.settings','com.android.settings.TetherSettings')


I only removed de '/' character. I'll post a working code later on.