13

So far Ive managed to download and install the SDK and its in my PATH. Problem now is that I can't run "android update sdk" since it expects to be connected to a display and Im connected to a remote headless server through ssh (its a build server so there's no desktop env). Is there a command-line option for the android tool that tells it to run without X ?

Eno
  • 10,730
  • 18
  • 53
  • 86

2 Answers2

36

There is a --no-ui flag for the update.

Typical linux setup:

cd android-sdk-linux_86/tools
./android update sdk -u

This will run it headless. To note, -u and --no-ui are the same flag

Ivan Vučica
  • 9,529
  • 9
  • 60
  • 111
  • FYI, --no-ui has *never* worked for me. – Eno Apr 23 '12 at 20:58
  • when run this command it's asking for username/password "Site Authentication Please login to the following domain: Use your MOTODEV account email and passwor d here to access the latest Motorola add-ons. Create a free MOTODEV account at d eveloper.motorola.com. Server requiring authentication: android-sdk-addons.motodevupdate.com Login: Password: " how to stop this keep prompting – Sam Sep 22 '12 at 00:18
4

I just created a small command line tool that does the update in any environment (GUI or non-GUI). Didn't have the chance to test it extensively, but as far as I can tell it does what it should.

The command line tool updates a pre-installed base Android SDK with all currently available platforms, add-ons, extras, docs, samples and tools. This should be enough for a build server (I need this for my Hudson CI installation with Maven).

Please go here for more details:

http://code.google.com/p/android-sdk-tool

sudo bangbang
  • 27,127
  • 11
  • 75
  • 77
cheetah
  • 71
  • 1