Install Android Studio
Download the latest version at:
https://developer.android.com/sdk/installing/studio.html
Then type:
unzip *.zip
mv android-studio /data/Applications/android-studio
Change startup settings:
vi /data/Applications/android-studio/bin/studio64.vmoptions
To start the application, type:
sh /data/Applications/android-studio/bin/studio.sh
Do not forget to change Android SDK and Java JVM paths on first startup with the "Project structure" menu.
Once installed, an external library might be necessary:
sudo apt-get install libgl1-mesa-dev
Close Android studio.
Then move the home folder
mv /home/guenmat/.android /data/Applications/.android
ln -s /data/Applications/.android /home/guenmat/.android
And move android studio folder
mv /home/guenmat/.AndroidStudio1.2 /data/Applications/AndroidStudio
ln -s /data/Applications/AndroidStudio /home/guenmat/.AndroidStudio1.2
And finally the Android SDK
mv /home/guenmat/Android /data/Applications/Android
ln -s /data/Applications/Android /home/guenmat/Android
The environment variable ANDROID_HOME must be set by editing:
sudo vi ~/.bashrc
in order to add the following lines at the end of the file:
ANDROID_HOME="/home/guenmat/Android/Sdk"
export ANDROID_HOME
Reload with:
source ~/.bashrc
To install the SDK completely, type:
/home/guenmat/Android/Sdk/tools/android update sdk --no-ui --force
Type the following commands to configure the main phones recognition for the computer:
echo SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666" | sudo tee /etc/udev/rules.d/51-android.rules
echo SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666" | sudo tee /etc/udev/rules.d/52-android.rules
echo SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666" | sudo tee /etc/udev/rules.d/53-android.rules
echo SUBSYSTEM=="usb", SYSFS{idVendor}=="04E8", MODE="0666" | sudo tee /etc/udev/rules.d/54-android.rules
echo SUBSYSTEM=="usb", SYSFS{idVendor}=="0B05", MODE="0666" | sudo tee /etc/udev/rules.d/55-android.rules
Finally reload the settings with:
sudo service udev reload
Check your devices after connecting them with the usb port with the command:
adb devices
The phones must appears (accept the certificate first, and activate USB debugging).