views:

308

answers:

3

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 ?

+1  A: 

Been discussed previously.

BrennaSoft
Just to add some more notes beyond what is at the link above: the folder name produced when you unpack one of the ZIP files is not quite right - it needs to be renamed and put in the correct place (naming depends on what component and version).For example, I needed Android 1.6, so I downloaded android-1.6_r02-linux.zip (current as of today). Unzipping that produced an android-1.6_r02-linux folder. I moved this folder into $SDK_HOME/platforms/ and then renamed it android-4 to match what I saw on another machine I was comparing against. Everything worked just fine after that.
Eno
A: 

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

Cheers,

Aleks

cheetah
A: 

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

Fred Concklin