18

Please can someone assist me with this, I have an Ubuntu server (terminal only), I have downloaded the android SDK, I have java installed, when in /tools I try to run ./android and I get an error Missing platform-tools. So how do I from terminal install the platform tools, for some reason I cant find this information anywhere.

Every resource I find assumes I have a GUI and not terminal, even ubuntu's page - https://help.ubuntu.com/community/AndroidSDK

asked Jul 7, 2013 at 10:41
3
  • 2
    Why in the name of all that's holy would you subject yourself to this? I predict that this will be the first problem in a long chain of misery. Commented Jul 7, 2013 at 10:43
  • Actually, its perfect now. Now my company has a nice front end to design and build their own android apps. Commented Jul 8, 2013 at 10:23
  • 3
    @Simon Would setting up a build server fit your need of 'in the name of all that's holy'? Commented Aug 28, 2013 at 22:18

1 Answer 1

37

Android manager has a graphical interface. But it can also be used via command line for some cases.

Run with -u (no UI) option:

android update sdk -u

Accept licenses (y) and this will install/update everything required automatically.

To update/install selective packages only, first list packages available for install/update:

android list sdk -u

This will list available packages with a number index, for Example:

Packages available for installation or update: 11
 1- Android SDK Platform-tools, revision 24
 2- Android SDK Build-tools, revision 24
 3- Documentation for Android SDK, API 23, revision 1
 4- SDK Platform Android N, API 24, revision 1
 5- GPU Debugging tools, revision 3.1
 6- GPU Debugging tools, revision 1.0.3
 7- Android Support Repository, revision 33
 8- Android Auto Desktop Head Unit emulator, revision 1.1
 9- Google Play services, revision 30
 10- Google Play APK Expansion library, revision 1
 11- Google Play Licensing Library, revision 1

Now you can install packages, filtering (-t) by number index to install only those:

android update sdk -u -t 1,2

On Linux: You can add android tools to $PATH:

Lets say sdk directory is /home/user/sdk then:

edit user's bash profile:

nano ~/.bashrc

Add following to it:

export ANDROID_HOME=/home/user/sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/build-tools

and save (CTRL+O and then CTRL+X)

Logout and login again, run from terminal:

echo $PATH

to verify.

answered Jul 7, 2013 at 11:18
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, your a lifesaver

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.