1

OK, this might sound a little crazy but here goes:

I have a few hundred Android APK files sitting on a remote (dedicated) server running CentOS 5. I need to grab some meta data off these apk files - specifically: the package name and the permission matrix.

I planned on hacking together a script that would iterate through each .apk file and feeding them to the aapt utility

aapt dump badging app.apk

.. and grabbing the output and parsing it for what I need. Works fine on Windows (I have the SDK installed)

I downloaded the platform SDK for Linux and extracted it but I could not find the aapt utility - does this need to be downloaded separately? I'm not sure if I have to actually download the platform files like I did when I installed it on Windows - this is a headless remote server I'm accessing via SSH.

Is what I'm trying to do even possible? If not, what else could I do to grab the meta data I need?

Jay Sidri
  • 6,271
  • 3
  • 43
  • 62

2 Answers2

1

Try looking under $ANDROID_HOME/platforms/$SDK/tools/ (i.e. android-sdk-linux_86/platforms/android-3/tools).

Mark Allison
  • 21,839
  • 8
  • 47
  • 46
  • Did that already - that directory is empty. I guess I have to download the platform - the question is how? As I said, I have only SSH connectivity to this server. – Jay Sidri Jun 22 '11 at 12:29
  • Have you actually downloaded the relevant SDK Platform under AVD? You'll need to do this in order to access platform specific tools such as aapt. – Mark Allison Jun 22 '11 at 12:31
  • No.. I'm trying to.. `android` keeps failing to start – Jay Sidri Jun 22 '11 at 13:15
  • http://stackoverflow.com/questions/2157089/android-update-sdk-on-headless-linux/2509760#2509760 - might have to download the platform manually by the looks of it to get the tools – Jay Sidri Jun 22 '11 at 13:15
0

you need to run

./android update sdk -u

granted that's the lazy/long way but you'll end up with aapt in the platform-tools directory. The -u option is for disabling the gui so it runs in command line.

Daniel Skinner
  • 210
  • 4
  • 10