2

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

Jennifer P.
  • 377
  • 1
  • 3
  • 17

1 Answers1

3
  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.

petey
  • 16,914
  • 6
  • 65
  • 97
  • 1
    Thanks. Little bit less clutter: `[~/Library/Android/sdk/tools/bin] $ ./sdkmanager --list | grep tool` – Jennifer P. Jun 30 '17 at 20:35
  • So which tells me the actual version of fastboot and adb that will run when I execute them? Can I assume its the latest version of platform-tools from the list printed by `sdkmanager --list`? – Jennifer P. Jun 30 '17 at 20:38
  • You would have to see if there is an entry in the available update section for that information – petey Jun 30 '17 at 20:46