0

I just recently rooted my phone so I could install SL4A. I want to execute some commands via a Python script, specifically turn Google voice off for all calls, make the call and then turn it back on. I'm just guessing that I need access to whatever the binary is, but there doesn't seem to be a /bin/ folder, so where are my apps installed to? (p.s. Searching from my mobile browser doesn't work on SE so if this a duplicate, please link me and I'll go ahead and delete the question.)

2
  • Why don't you just have GV prompt you if you want to use it when you make a call? Commented Feb 2, 2012 at 2:52
  • I don't want it to be on for a certain call. And since I can set the script to launch with one click from the desktop that would be less clicks than I currently have to make. Commented Feb 2, 2012 at 4:34

1 Answer 1

4

Android apps aren't binaries. They're .apk's, similar to Java .jar files, and .dex or .odex files when in bytecode form. They're run in the Dalvik virtual machine, again very similar to a Java VM.

You can launch an app from a shell as follows:

am start -a android.intent.action.MAIN -n <package name>/<activity name>

For example, Angry Birds:

am start -a android.intent.action.MAIN -n com.rovio.angrybirds/com.rovio.ka3d.app

The name of the activity is found in the AndroidManifest.xml file inside the .apk under //manifest/application/activity/@name. For Google Voice there are quite a few activities, and you may need to use other intents. I don't have SL4A.

You can also disable apps temporarily with this:

pm disable <package name>

And re-enable:

pm enable <package name>
3
  • Is there a way to launch them from the command line, or more particularly, sl4a? Commented Feb 2, 2012 at 4:23
  • @WayneWerner See my update. Commented Feb 2, 2012 at 8:29
  • Thanks, that looks like enough information to get me started! Commented Feb 2, 2012 at 19:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .