I'm doing this guide because when I switched to arch linux ,I found no guides to setup sdk in it.Arch is a beautiful OS, but for newcomers like me ,I took some time to get used to it.So,In this guide, we’ll take a look at how to set up a development environment for Android in Arch linux(or Arch based Linux Distros) so you can start working on your Projects.Most of the Arch Linux are pro linux users so there is really no need of this guide, but this guide is meant for those who are switching from ubuntu/mint/fedora/any other disto which are not based on Arch, to say it in short its meant for new users of Arch Linux. Anyway Let's set up.
First let's set see how to install Platform tools.
Setting up platform-tools in UBUNTU(or Ubuntu based distros/Linux Mint)
In ubuntu platform tools can be setup very easily.
1.Open terminal(Default shortcut is ctrl+alt+T)
2. Type "sudo apt-get install android-tools-adb" (this will install the adb)
3. Type "sudo apt-get install android-tools-fastboot"(this will install the fastboot)
Step 4: Check whether the above tools are working by typing an adb command. For e.g. "adb devices"
Now its time to install SDK in Ubuntu and set it up but before that let me tell you there is already a great thread by matt95.You can see the guide and thank him herehttp://forum.xda-developers.com/show....php?t=2302780
First lets install Eclipse[You can also use Android Studio if you want]
sudo yum install eclipse-jdt
For newcomers I recommend to extract it to 'home'.So the file is now extracted inside /home/user/AndroidSDK .
Now lets setup .bash_profile file so that we can access adb anywhere or else you have to type the whole location again use the adb command which is lot of work . So let's shorten it up.
Type "sudo vim .bash_profile"in terminal.
PATH=$PATH:$HOME/AndroidSDK:$HOME/AndroidSDK/tools export PATH # For SDK version r_08 and higher, also add this for adb: PATH=$PATH:$HOME/AndroidSDK/platform-tools export PATH
Open Eclipse and click on Help.Select Install New Software. Then click Add, at the top right of that window. Type in Android Plugin for the name and https://dl-ssl.google.com/android/eclipse/ for the address.
Once this is done, click on the Available Software Sites hyperlink below the Add button, then highlight the Android Plugin source and click on Reload. Now exit this window, and choose Android Plugin from the “Work with” dropdown menu. Choose the developer tools option that you see here and Proceed with the installation.
After the installation configure your Android virtual devices.
ARCH LINUX(or Arch based Distros)
Lets install android sdk
Open terminal and type
pacman -Suy && pacman -S wget
Once it fetches the tarball, lets extract it by typing
tar -xvzf android-sdk.tar.gz
Now lets make the package by using the command
sudo pacman -U *.pkg.tar.xz
Let's install platform-tools now.Just like above steps ,well get a package and install it.
tar -xvzf android-sdk-platform-tools.tar.gz
sudo pacman -U *.pkg.tar.xz
sudo ln -s /opt/android-sdk/platform-tools/adb /usr/bin/adb //this one's for adb sudo ln -s /opt/android-sdk/platform-tools/fastboot /usr/bin/fastboot //This one's for Fastboot sudo ln -s /opt/android-sdk/tools/ddms /usr/bin/ddms //This is for DDMS sudo ln -s /opt/android-sdk/tools/android /usr/bin/android //This is for Android
Simple as that. If you are yet to switch to Arch linux then I recommened you to use "BBQLinux " its an Arch linux for Android developers. It comes with most of the things needed for android development. You can download it from Here.
Thanks for reading this. Help me by giving me e-books.
PM me or post here if you have any doubts.