Difference between revisions of "Android"
(Created page with "== Setting up a development environment for Android devices == First you'll need to download the android SDK. It can be found [http://developer.android.com/sdk/ here]. Extract t...") |
|||
| Line 9: | Line 9: | ||
Use Ctrl-X to exit nano. In order to use the tools in the sdk you will need to add it to your path. Substitute ''/path/to'' with your path. | Use Ctrl-X to exit nano. In order to use the tools in the sdk you will need to add it to your path. Substitute ''/path/to'' with your path. | ||
'''$''' export PATH="''/path/to/''android-sdk-linux_x86/tools/:$PATH" | '''$''' export PATH="''/path/to/''android-sdk-linux_x86/tools/:$PATH" | ||
| + | On your device, make sure you turn ON USB debugging. Go to Settings -> Applications -> Development -> USB debugging and make sure you have ticked the box. The adb tool is no longer installed by default, so in order to install it, you need to add it via the android sdk interface. | ||
| + | '''$''' android | ||
| + | In the interface, choose available packages, then "Android SDK Platform-tools". Allow the components to download. Check where the adb binary has been installed. You'll then need to add the new path as well. | ||
| + | '''$''' export PATH="''/path/to/''android-sdk-linux_x86/platform-tools/:$PATH" | ||
| + | Once the proper path has been added, you should be able to execute the adb command. Plug in your device via usb, then run the command to see if it has connected properly. | ||
| + | '''$''' adb devices | ||
| + | You should see something along the lines of | ||
| + | List of devices attached | ||
| + | <serial number here> device | ||
Revision as of 11:55, 23 April 2011
Setting up a development environment for Android devices
First you'll need to download the android SDK. It can be found here. Extract the contents of the archive to your desired location.
Next you'll need to configure the usb driver via udev. To do this we'll need to create the file /etc/udev/rules.d/51-android.rules.
$ sudo nano -w /etc/udev/rules.d/51-android.rules
Add the following directive:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
Use Ctrl-X to exit nano. In order to use the tools in the sdk you will need to add it to your path. Substitute /path/to with your path.
$ export PATH="/path/to/android-sdk-linux_x86/tools/:$PATH"
On your device, make sure you turn ON USB debugging. Go to Settings -> Applications -> Development -> USB debugging and make sure you have ticked the box. The adb tool is no longer installed by default, so in order to install it, you need to add it via the android sdk interface.
$ android
In the interface, choose available packages, then "Android SDK Platform-tools". Allow the components to download. Check where the adb binary has been installed. You'll then need to add the new path as well.
$ export PATH="/path/to/android-sdk-linux_x86/platform-tools/:$PATH"
Once the proper path has been added, you should be able to execute the adb command. Plug in your device via usb, then run the command to see if it has connected properly.
$ adb devices
You should see something along the lines of
List of devices attached <serial number here> device