2

note: I'm not writing Java code, and don't need the SDK version at runtime (answers for that exist at 1882883 and 3423754).

I'm working on a command-line tool that needs to ensure aapt is on the path, and since it used to live under package-tools until SDK Tools Revision 22 when it moved to build-tools, I'm looking for a way to know which folder I should add to the path for a given SDK installation.

Looking for the absence of build-tools seems ambiguous because it might indicate a fully functional but old SDK, or it might be that the user has a fresh download and hasn't yet run android update sdk yet.

Questions:

  • I can't find anything like android --version.. is there a way to use the CLI tools to retrieve their version?
  • How can I (from the command line) generate a list of which android tools are installed and what their respective versions are?
Community
  • 1
  • 1
ellemenno
  • 421
  • 3
  • 7

1 Answers1

1

You can parse (for example using awk) the source.properties file which is located at <android-sdk>\tools.

The Pkg.Revision value indicates the version of the SDK Tools component.

matiash
  • 52,725
  • 16
  • 117
  • 149