I want to write a script to update the Android SDK platform tools and I need the command if available to run in order to achieve this. What I have found is that I can use the Android command under the /tools directory to update the software (images, sources, etc.), but nothing to update the tools themselves.

The guide on Factory Images for Nexus Devices says that I must be sure I have the latest tools

Be sure that you have the latest version of the Android SDK Platform-tools from the SDK Manager.

So, is it possible? If it is, how to do that?


After further research, I came across this article from Stack Overflow that explains it and states that the Android command that can be used to update the platform-tools in the SDK directory.

You follow these instructions as shown on the above link

$ android list sdk
$ android update sdk --no-ui --filter 1,platform-tools

The first command lists the available packages that are still to be installed (indexed by number), as for example:

Packages available for installation or update: 9
   1- Android SDK Tools, revision 19
   2- Android SDK Platform-tools, revision 11

According to that list, you can issue the second command to install the packages that you want to install.

The --filter option limits the update to the packages that you want to install. You specify those packages in a comma-separated format. Also, you can filter them by the index number provided in the listing resulting from the first command.

  • What does --filter 1 do here? – IgorGanapolsky Nov 14 '16 at 20:58

Use of android tool is deprecated; instead use sdkmanager:

 androidsdk/tools/bin/sdkmanager --update


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.