How do I find the android SDK tools version from shell

Jennifer P. picture Jennifer P. · Jun 30, 2017 · Viewed 7.3k times · Source

I would like to get the version of the installed SDK on the computer from a shell command.

Some tools like adb and fastboot have an option to print their version, like adb version, fastboot --version, so I was expecting android version or similar, but there is none.

I don't want to launch any user interface, shell only.

Thanks

Answer

petey picture petey · Jun 30, 2017
  1. Open a command-prompt/terminal/console
  2. Change directory to where you installed the the android sdk + tools + bin folder
  3. then execute, sdkmanager with the --list command

Then you will get a a few lists (Installed packages, Available Packages, and Available Updates).

An osx command example :

[~/Library/Android/sdk/tools/bin] $ ./sdkmanager --list

As for fastboot --version and adb --version, both of these commands tell you what version of the executable you are running on your machine and have nothing to do with what sdks are on the machine. This is helpful in case you find a bug and wish to report an issue you find with those tools.