Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ubuntu 14.04 command line install android sdk
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
./android update sdk --no-ui
# set path
vi ~/.zshrc << EOT
export PATH=${PATH}:$HOME/sdk/android-sdk-linux/platform-tools:$HOME/sdk/android-sdk-linux/tools:$HOME/sdk/android-sdk-linux/build-tools/22.0.1/
EOT
source ~/.zshrc
# adb
sudo apt-get install libc6:i386 libstdc++6:i386
# aapt
sudo apt-get install zlib1g:i386
@ashishg656
Copy link

ashishg656 commented Mar 11, 2017

Thanks a lot for this

@jonatansouza
Copy link

jonatansouza commented Mar 15, 2017

many thanks! o/

@boutchekkoucht
Copy link

boutchekkoucht commented Mar 21, 2017

Merci beaucoup ^^

@valentinancy
Copy link

valentinancy commented Mar 21, 2017

terima kasih hehe

@anoobbava
Copy link

anoobbava commented Apr 4, 2017

Hi,
Below error pops up when executing this command.

./android update sdk --no-ui

Exception in thread "main" java.lang.NullPointerException
at java.io.File.(File.java:277)
at com.android.sdklib.internal.avd.AvdManager.parseAvdInfo(AvdManager.java:1616)
at com.android.sdklib.internal.avd.AvdManager.buildAvdList(AvdManager.java:1577)
at com.android.sdklib.internal.avd.AvdManager.(AvdManager.java:350)
at com.android.sdklib.internal.avd.AvdManager.getInstance(AvdManager.java:373)
at com.android.sdklib.internal.repository.updater.UpdaterData.initSdk(UpdaterData.java:254)
at com.android.sdklib.internal.repository.updater.UpdaterData.(UpdaterData.java:122)
at com.android.sdklib.internal.repository.updater.SdkUpdaterNoWindow.(SdkUpdaterNoWindow.java:76)
at com.android.sdkmanager.Main.updateSdkNoUI(Main.java:497)
at com.android.sdkmanager.Main.doAction(Main.java:366)
at com.android.sdkmanager.Main.run(Main.java:150)
at com.android.sdkmanager.Main.main(Main.java:116)

@rmichaluszek
Copy link

rmichaluszek commented Apr 15, 2017

thanks

@samratBasra
Copy link

samratBasra commented Apr 28, 2017

it works, thanks a lot.

@LeandroTorresCoutinho
Copy link

LeandroTorresCoutinho commented May 26, 2017

very usefull, thanks!!!

@SirmaXX
Copy link

SirmaXX commented Jun 17, 2017

you are man of the material

@Luro02
Copy link

Luro02 commented Jun 22, 2017

would be awesome if you could merge my Fork :)
https://gist.github.com/Gnarmagon/1364394a9e4a88420a28b4db528392f3

(it copies the tar from everywhere into $HOME)

@boga01
Copy link

boga01 commented Jun 29, 2017

so helpful

@mukana-lahtelat
Copy link

mukana-lahtelat commented Jul 21, 2017

Do notice that this script assumes you're using ZSH, not bash. Replace .zshrc with .bashrc to fix

@vshantam
Copy link

vshantam commented Jul 28, 2017

amazing.saved my day.thanks a lot

@Jullies
Copy link

Jullies commented Oct 3, 2017

Thank You

@canhphong
Copy link

canhphong commented Dec 9, 2017

thanks

@alejandrohn
Copy link

alejandrohn commented Jan 4, 2018

Thanks

@welcomepkw
Copy link

welcomepkw commented Apr 27, 2018

thanks bro!

@M97Chahboun
Copy link

M97Chahboun commented Jan 30, 2021

Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment