Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update Android platform-tools in a headless linux?

Tags:

android

We have some CI hosts without X-Window installed, i know how to update SDK with android update command, but how can i update platform-tools with this command?

like image 422
wangdong Avatar asked May 23 '12 02:05

wangdong


People also ask

How do I upgrade to the latest platform tools sdk?

Open the Preferences window by clicking File > Settings (on Mac, Android Studio > Preferences). In the left panel, click Appearance & Behavior > System Settings > Updates. Be sure that Automatically check for updates is checked, then select a channel from the drop-down list (see figure 1). Click Apply or OK.

Do you have Android build tools installed at?

Android SDK Build-Tools is a component of the Android SDK required for building Android apps. It's installed in the <sdk>/build-tools/ directory.


1 Answers

You can use the following commands:

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

like image 190
CRM Avatar answered Nov 14 '22 23:11

CRM