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.


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


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:


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:


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.