0

I have built a script, a part of an automation tool I've developed, that needs to open an apk and find the activity so it can launch it. To do so I have used:

aapt dump badging x.apk

Which 'should' dump out the activity(s) of the application. Some times it has, others it has not. Is there a more reliable method to dump the activities of an application so my script can pick up the activity and launch the package via adb instrumentation?

sbrichards
  • 2,169
  • 2
  • 19
  • 32

1 Answers1

2

You can use

$ aapt dump --values xmltree <name>.apk AndroidManifest.xml

and then you have to parse the output to find the Activities.

Remember that you also have to find the instrumentation in the manifest if your intention is to run instrumentation automatically.

Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134