Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save handersonbf/612d2f65a8d119ce11940e0748835c8b to your computer and use it in GitHub Desktop.
Save handersonbf/612d2f65a8d119ce11940e0748835c8b to your computer and use it in GitHub Desktop.
Installing Android Studio on Ubuntu 14.04-LTS via PPA
#!/bin/bash
set -e
# Update Ubuntu package index
sudo apt-get update -y
sudo apt-get install -y software-properties-common debconf-utils
###
# installs java 8 - oracle
# https://gist.github.com/nicostouch/71c8c5bcffc96bad5dfb
###
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
sudo apt-get install -y oracle-java8-installer
# sets java8 as default jre
sudo apt-get install -y oracle-java8-set-default
###
# installs android studio
###
# install dependencies
sudo apt-get install -y lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
# configures KVM - https://www.howtoforge.com/tutorial/kvm-on-ubuntu-14.04/
sudo apt-get install -y qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
# more info https://paolorotolo.github.io/android-studio/
sudo apt-add-repository -y ppa:paolorotolo/android-studio
sudo apt-get update
sudo apt-get install -y android-studio
# fixes issue related to ibus
# https://youtrack.jetbrains.com/issue/IDEA-78860
# http://stackoverflow.com/questions/33651898/resolving-ibus-issue-ibus-prior-to-1-5-11-may-cause-input-problems
echo "export IBUS_ENABLE_SYNC_MODE=1" >> ~/.profile
###
# installs genymotion
###
# installs virtualbox
sudo apt-get install -y virtualbox
# installs dependencies
sudo apt-get install -y libdouble-conversion1 libxcb-render-util0 libxcb-image0 libxcb-icccm4 libxcb-randr0 libxcb-keysyms1 libxcb-xkb1 libxkbcommon-x11-0
# copies genymotion binary to /opt
#sudo cp /media/triadworks/TRIADWORKS/genymotion-2.6.0-linux_x64.bin /opt
sudo wget -O /opt/genymotion-2.6.0-linux_x64.bin https://www.dropbox.com/s/k5vg55zxx3gwrhe/genymotion-2.6.0-linux_x64.bin?dl=0
# installs it for all users
sudo chmod +x /opt/genymotion-2.6.0-linux_x64.bin
sudo /opt/genymotion-2.6.0-linux_x64.bin
# adds user to group "libvirtd"
sudo adduser `id -un` libvirtd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment