[SCRIPT] [Ubuntu] ADB, AAPT, APKTool, Android SDK/NDK, and udev rules auto-installer

Tahl

Member
Aug 15, 2011
22
62
0
Birmingham
ANDADB 2.0

This is the sequel to my other installer that adds a few more features automatically. The goal of this program is to automate the installation process as much as possible for those of you that are not as familiar with Linux command-line or those that are just lazy and do not want to go through the process of installing everything again.

Installation Instructions

Download the script from Dropbox or Github using the following command in terminal:
git clone git://gist.github.com/1658401.git gist-1658401


From terminal type the following commands once the script is downloaded:


Code:
chmod +x andadb.sh
./andadb.sh

NOTE: DO NOT USE SUDO TO RUN THE SCRIPT, IT WILL BREAK THE PATHING OF THE CODE.



Once you execute the script you will be presented withthe following menu:



There are a series of automated options to choose from; depending on the option and internet speed it could take some time to complete. Also, a bug that is caused by the long wait times is that you may have to enter your password multiple times during the download process depending on the speed of your internet connection and the sudo timeout period.

CURRENT UDEV RULES:

Code:
#Acer
SUBSYSTEM==usb, SYSFS{idVendor}==0502, MODE=0666
#ASUS
SUBSYSTEM==usb, SYSFS{idVendor}==0b05, MODE=0666
#Dell
SUBSYSTEM==usb, SYSFS{idVendor}==413c, MODE=0666
#Foxconn
SUBSYSTEM==usb, SYSFS{idVendor}==0489, MODE=0666
#Garmin-Asus
SUBSYSTEM==usb, SYSFS{idVendor}==091E, MODE=0666
#Google
SUBSYSTEM==usb, SYSFS{idVendor}==18d1, MODE=0666
#HTC
SUBSYSTEM==usb, SYSFS{idVendor}==0bb4, MODE=0666
#Huawei
SUBSYSTEM==usb, SYSFS{idVendor}==12d1, MODE=0666
#K-Touch
SUBSYSTEM==usb, SYSFS{idVendor}==24e3, MODE=0666
#KT Tech
SUBSYSTEM==usb, SYSFS{idVendor}==2116, MODE=0666
#Kyocera
SUBSYSTEM==usb, SYSFS{idVendor}==0482, MODE=0666
#Lenevo
SUBSYSTEM==usb, SYSFS{idVendor}==17EF, MODE=0666
#LG
SUBSYSTEM==usb, SYSFS{idVendor}==1004, MODE=0666
#Motorola
SUBSYSTEM==usb, SYSFS{idVendor}==22b8, MODE=0666
#NEC
SUBSYSTEM==usb, SYSFS{idVendor}==0409, MODE=0666
#Nook
SUBSYSTEM==usb, SYSFS{idVendor}==2080, MODE=0666
#Nvidia
SUBSYSTEM==usb, SYSFS{idVendor}==0955, MODE=0666
#OTGV
SUBSYSTEM==usb, SYSFS{idVendor}==2257, MODE=0666
#Pantech
SUBSYSTEM==usb, SYSFS{idVendor}==10A9, MODE=0666
#Philips
SUBSYSTEM==usb, SYSFS{idVendor}==0471, MODE=0666
#PMC-Sierra
SUBSYSTEM==usb, SYSFS{idVendor}==04da, MODE=0666
#Qualcomm
SUBSYSTEM==usb, SYSFS{idVendor}==05c6, MODE=0666
#SK Telesys
SUBSYSTEM==usb, SYSFS{idVendor}==1f53, MODE=0666
#Samsung
SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666
#Sharp
SUBSYSTEM==usb, SYSFS{idVendor}==04dd, MODE=0666
#Sony Ericsson
SUBSYSTEM==usb, SYSFS{idVendor}==0fce, MODE=0666
#Toshiba
SUBSYSTEM==usb, SYSFS{idVendor}==0930, MODE=0666
#ZTE
SUBSYSTEM==usb, SYSFS{idVendor}==19D2, MODE=0666
MAJOR SYSTEM CHANGES

  • Android ADB will function with the command "adb" from anywhere
  • Android Asset Packaging Tool (AAPT) will function with the command "aapt" from anywhere
  • APKTool will function with the command "apktool" from anywhere
  • ~/bin set to be in the users path so anything can be accessed that is placed in that folder (/user/NAME/bin)
  • Android SDK installed to /usr/local/android-sdk
  • Android NDK installed to /usr/loca/android-ndk
  • Eclipse installed
  • Python installed
  • OpenJDK installed, both java and javac are available for compiling and running java applications
  • repo (http://code.google.com/p/git-repo/) installed to /usr/local/bin/repo, accessible anywhere
  • ia32-libs installed for 64-bit systems
 

JKILO

Senior Member
Feb 7, 2011
658
160
0
Columbus
you wrote this script in windows?


/bin/bash^M: bad interpreter: No such file or directory


edit: FYI anyone after me using this with that error...

$ sudo apt-get install dos2unix

$ dos2unix andadb.sh
 
Last edited:

Tahl

Member
Aug 15, 2011
22
62
0
Birmingham
Nope, I wrote it in various distros, both Arch and Ubuntu.. though I did copy the file to dropbox in Windows while I was using virtualbox (since I no longer use Linux Mint). I'll try recopying the dropbox link though

edit: I went ahead and reuploaded it from the virtualbox, so there should no longer be an issue.
 
Last edited:

hacktrix2006

Senior Member
Jan 15, 2011
1,681
566
0
Life saver mate, was able to run this script hit the good old number 8 for 12.04 Ubuntu go off have a brew, dinner, tea (ya slow internet connection). then continue where it left off, like git and repo.

Nice script!