*Please note for 64 bit users you may need to install 32 bit libs.
- Code: Select all
sudo apt-get install ia32-libs
Download sdk from here http://developer.android.com/sdk/index.html
After download is complete run this code from terminal one line at a time.
- Code: Select all
cd ~
mkdir android
tar -zxvf ~/Downloads/android-sdk_r09-linux_x86.tgz
mv android-sdk-linux_x86 ~/android/sdk
After the files have been moved it is time to update sdk so you'll have adb. This should open up the android sdk and avd manager. If you get some complaints about java you will need to install some packages for that. At the bottom of the guide I will post what packages you will need. If adb and avd manager started correctly go to the Available packages tab on the left hand side of that window. Select the boxes for Android repository and Third party Add-ons, when you have selected both boxes click on install selected. On the window that comes up after select accept all and apply for the license agreements and let it download and install all of the updates.
- Code: Select all
cd ~
android/sdk/tools/android
After the sdk has been updated it is now time to set your path to include adb.
- Code: Select all
cd ~
gedit .bashrc
Once the text editor is open you need to paste the following line into the file and then save and exit.
- Code: Select all
export PATH=${PATH}:~/android/sdk/platform-tools
Next we will make sure .bashrc is executable.
- Code: Select all
cd ~
chmod a+x .bashrc
Now it is time to setup our devices rules. I prefer to use all of these in case I have another android phone around to work on.
- Code: Select all
cd ~
sudo gedit /etc/udev/rules.d/51-android.rules
In the text editor that opens up paste in the following rules. I prefer to use all of these in case I have another android phone around to work on. You can just use one specific to your phone if you choose. After you are finished save the file and exit.
- Code: Select all
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
Next we are going to make sure the rules are executable.
- Code: Select all
cd ~
sudo chmod a+x /etc/udev/rules.d/*
Now for me after these steps were completed adb server was not starting with sufficient permissions. What I needed to do was add the full path to adb start-server in rc.local to fix this.
- Code: Select all
cd ~
sudo gedit /etc/rc.local
Once that file is open add the following line above exit 0, then save and exit the file. Please note "sample" needs to be replaced with your user name.
- Code: Select all
/home/sample/android/sdk/platform-tools/adb start-server
After this reboot your computer. ADB should now be working and available to you from the terminal when your phone is plugged in.
*If when trying to start sdk and avd manager you get complaints about java install these packages. When installing these packages you might get a box that opens up asking you to accept a license agreement. To accept the agreement hit the "tab" key to highlight <OK> and then hit enter.
- Code: Select all
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin



