2013년 9월 4일 수요일

[HOW-TO] Set up SDK/ADB on Ubuntu 11.10 | 32 & 64 bits

Tutorial [HOW-TO] Set up SDK/ADB on Ubuntu 11.10 | 32 & 64 bits

Video-Tutorial:

http://bit.ly/HzzmUn

Step 1. Install JDK

Open Terminal and enter the following command(s), then enter your ubuntu login password followed by ‘y’ when prompted for yes/no.

Code:
$ sudo apt-get update

$ sudo apt-get install openjdk-6-jdk
Step 2. Install 32 bit libraries - Only for 64 bit users

On x64 systems you are required to install some 32-bit libraries or the android toolkit will not work. In a terminal write:

Code:
$ sudo apt-get install ia32-libs
Step 3. Download and Install Android SDK

Download the Android SDK. Choose the one for linux: android-sdk_r16-linux.tgz

Extract android-sdk_r16-linux.tgz and put the folder in your desired location. I recommend to put it under home/username/ | When using the terminal the same path is described as ~/ 

Step 4. Choose packages to install

First of all go to ~/android-sdk-linux/tools/
Right clic to android >> Properties >> Permissions
Make sure "allow executing file as a program" it's checked



Once done close that window and doble click on the Android file, select Run in Terminal.
Download the tools as shown in the following picture:




Step 5. Check your device's permission

Now head over to the platform-tools directory

Code:
$ cd ~/android-sdk-linux/platform-tools
Check if you have permission for your device

Code:
$ ./adb devices
If you're getting the following, go on to Step 6.

Code:
List of devices attached

OR

List of devices attached
????????????    no permissions
If you're getting something like shown below or other random numbers with the word device next to it, congrats! You can now use ADB. Now go on to Step 7.

Code:
List of devices attached
0123456789ABCDEF    device
Step 6. Adding USB Vendor ID of your device

Open HOME folder and enable Show Hidden Files:



Open .android folder >> right click >> Create New Document >> Empty Document, name it adb_usb.ini and open it. Put the following on it:



Save & close the window

Then unplug your NT and plug it again (From the NT usb port, not PC). Now to check if it works...

Code:
$ ./adb devices
You should be getting something similar to the following line:

Code:
List of devices attached
0123456789ABCDEF    device
Congrats! Now you can use ADB in Ubuntu! Now hop on to Step 7!

Step 7. Create path for ADB 

NOTE: while using adb on Linux you'll need to type ./adb to execute adb commands unless you create a path in ~/.bashrc. In a terminal write:

Code:
$ sudo gedit ~/.bashrc
Add the following line at the very end of the file. Once you're done, save and exit.

Code:
# Android tools
export PATH=~/android-sdk-linux/platform-tools:~/android-sdk-linux/tools:$PATH
Then in a Terminal run this command to reload your .bashrc:
Code:
source ~/.bashrc
Now you can just run adb without put ./ before every command.



~ Veronica

댓글 없음:

댓글 쓰기