Difference between revisions of "Android"

From ArchWiki
Jump to: navigation, search
(Android SDK Installation: Added information for installation and usage of Android SDK and Eclipse)
m (categorized under Category:General (English))
Line 1: Line 1:
[[Category:General (English)]]
= Symbols =
= Symbols =
See [http://img825.imageshack.us/img825/5596/symbols.png symbols] ''( if an admin comes here, thanks to upload the file and edit that please... )''
See [http://img825.imageshack.us/img825/5596/symbols.png symbols] ''( if an admin comes here, thanks to upload the file and edit that please... )''

Revision as of 04:37, 4 January 2011


See symbols ( if an admin comes here, thanks to upload the file and edit that please... )


See Android_Tethering

Android Development on Arch

Android SDK Installation

To install the android-sdk, simply install it from the AUR android-sdk. When using Eclipse as an IDE. you need to install the ADT plugin and related packages.

Install the following first:

packman -S eclipse-emf eclipse-gef

All packages are available for installation through AUR:

  1. AUR eclipse-wtp-wst
  2. AUR eclipse-android
  3. AUR android-sdk

Enter the path to the Android SDK Location in Eclipse -> Windows -> Preferences -> Android


Android Debug Bridge (ADB) - Connecting to a real device

To get the ADB connecting to a real device or phone under Arch, you must install the udev rules to connect the device to the proper /dev/ entries. Each Android device has a usb vendor id and a usb product id. for example, my HTC EVO has:

vendor id: 0bb4
product id: 0c8d

Figure Out Your Device Ids

Plug in your device and execute

# lsusb

It should come up something like this:

Bus 002 Device 006: ID 0bb4:0c8d High Tech Computer Corp.

Adding udev Rules

Use the following udev rules as a template, and fill in your unique ids in the proper spots. Copy these rules into /etc/udev/rules.d/90-android.rules

SUBSYSTEM=="usb", SYSFS{idVendor}=="[VENDOR ID]", MODE="0666"
SUBSYSTEM=="usb",ATTR{idVendor}=="[VENDOR ID]",ATTR{idProduct}=="[PRODUCT ID]",SYMLINK+="android_adb"
SUBSYSTEM=="usb",ATTR{idVendor}=="[VENDOR ID]",ATTR{idProduct}=="[PRODUCT ID]",SYMLINK+="android_fastboot"

Then, to reload your new udev rules, execute:

# udevadm control --reload-rules

Does It Work?

After this, unplug your device and replug it. You should see something like:

List of devices attached 
HT07VHL00676    device

after executing:

$ adb devices

Eclipse ADT plugin

Note: Currently, the ADT plugin does not work in Eclipse 3.6 (Helios). It is advised that you stay with Eclipse 3.5 (Galileo) and below until further notice.

You can get eclipse-classic (Galileo) from the AUR, together with the eclipse-wtp-wst package.

Installation details can be found here: ADT Plugin for Eclipse

Android platforms

Before developing android applications, you need to install at least one android platform, which can be done either automatically or manually.

Automatic installation is done via the Android SDK and device manager, which is accessible by invoking (assuming that the $PATH variable contains the path to the android sdk tools directory)


or alternatively,

Note: the default installation directory in Arch is /opt/android-sdk/

For step by step automatic installation, see Installing SDK Components.

For manual installation:

  1. Download the platform you want to develop on. This site provides online links to several Android SDK components.
  2. Extract the tarball to /<path_to_android-sdk>/platforms.

Now, you should see the platform of your choice installed in the Installed Packages window of the Android SDK and device manager.

root tricks

Linux distro on the sdcard

You can install Debian like in this thread, or you can adapt it to install archlinux. You should replace all debootstrap stuff by

mkdir -p /data/local/mnt/var/{cache/pacman/pkg,lib/pacman}
pacman --root /data/local/mnt --cachedir /data/local/mnt/var/cache/pacman/pkg -Sy base