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.)

  • Why don't you just have GV prompt you if you want to use it when you make a call? – Matthew Read Feb 2 '12 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. – Wayne Werner Feb 2 '12 at 4:34
3

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>
  • Is there a way to launch them from the command line, or more particularly, sl4a? – Wayne Werner Feb 2 '12 at 4:23
  • @WayneWerner See my update. – Matthew Read Feb 2 '12 at 8:29
  • Thanks, that looks like enough information to get me started! – Wayne Werner Feb 2 '12 at 19:12

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.