开发者

Android application's exposed API or hooks

What is the best way to discover an Android application's API or hooks into/from the application?

Specifically, I am looking to pass a parameter or data to an application, utilize the application's specific functions, and return data or a parameter to the calling application.

A few ideas come to mind, but I am unfamiliar with what is available, specifically to Android.

  1. Contact an application's developer directly
  2. Somehow decompile the 开发者_开发问答APK to browse the source
  3. Read any available documentation


Some ways to check out what is available for :

Tool to re-engineer closed APK files http://code.google.com/p/android-apktool/

Review intent filters for actions

  1. Lookup the app in some sort of application manager on your phone. Android System Info. If you go to the details of the app it will tell you where the apk is and the name of it. For instance, under the Email app you can see "Source: /system/app/Email.apk".
  2. To pull that off just do "adb pull /system/app/Email.apk Email.apk", to pull it to your current directory.
  3. Look at the Manifest.xml. Rename the apk to zip and unpack.
  4. Follow the instructions here: http://android.amberfog.com/?p=582
  5. Then you can read the decompiled Manifest.xml and look at the intent filters they are registering.


Android applications are all in their own sandbox, so you can not just arbitrarily call some other Android applications' functions, they would need to be made public to you somehow.

If you are looking to execute some function that is provided by another Android application, you would most likely need to hear about it from the developer, most likely from their public documentation if they have any.


The correct way to do this is to use "intents". With an intent, you can launch another application (such as a barcode scanner) and the user interacts with it. Then, the application exits returning some data (such as the barcode). Try googling or see: http://www.vogella.com/articles/AndroidIntent/article.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜