Paul - The Programmer

simple & stupid

Setup Android dev environment on Debian X86_64

The android kenerl compile script require the x86_64 system. So I install the Debian X86_64 port on my dev desktop.

Follow the below steps to setup environment for Android sdk.

1) Install Sun Java SDK 64bit and ia32 JRE.

The 64bit Java is requried by the eclipse and the ia32 JRE is needed for running android sdk tools like android, ddms.

Since the Sun Java SDK is not free software, the contrib, non-free Debian repository are needed in the /etc/apt/source.list

For instance, my source.list is


deb squeeze main contrib non-free
deb-src squeeze main contrib non-free

Install the Java SDK and ia32 JRE with command:


# apt-get update
# apt-get install sun-java6-jdk 
# apt-get install ia32-sun-java6-bin

2) For the convenience of running android sdk tools, the default jre should be ia32 JRE. Update the default JRE setting with Debian fashion:


# sudo update-alternatives --config java

Select the ia32 JRE for your default java.

3) Setup JAVA_HOME in .bashrc with the path to Java 64bit SDK for running ANT. 


export JAVA_HOME=/usr/lib/jvm/java-6-sun

4) Update eclipse.ini to run eclipse with Java 64bit JDK. And the below lines in eclipse.ini





Fix unknown virtual device error for launching android emulator

The problem is after the avd be created successfully, the emulator.exe launching ends up by error 'unknown virtual device name: your-avd-name'. 

I think this error is caused by I moved my Documents folder to "D:\paul\My Docuements". The android.bat tool created the avd files under "D:\paul\.android". But, by default, the emulator tries to load the avd files from "%USERPROFILE%\.android". In my system, it is "C:\Documents and Settings\paul".  

The emulator.exe and android.bat have different logic to caculate the avd files path. One explanation is the emulator is a C app and the android.bat tool is actually a Java based app. 

To solve this problem, the best solution is to define the global environment variable "ANDROID_SDK_HOME".

The value of the "ANDROID_SDK_HOME" is the parent directory path where you want the .android to be created.

e.g.  set ANDROID_SDK_HOME="d:\"

Then the path to .android is d:\.android.

The emulator now can load the virtual device setting properly from d:\.android


Android-x86 on EEEPC 701

Finally got some fancy thing to update. I have the android running on my netbook!

I am amazed how easy the installation is. I followed the instructures precisely. No suprising thing happend during the procedures.

Thanks to the team  They have done a great job.

Only one thing needs to be clearified.  Since I am using the XP, the apk installation instructures is a little different than they are described on the official site. To install the apk, we need to ..

On android:

  • Settings -> Unknown sources.   Allow the android to install non-market applications
  •  Settings->Wireless controls->Wi-Fi settings.  Click  the Wi-Fi network (below the Text Label Wi-Fi networks) you connected to check the ip address of your android device.

On you host: 

  • set ADBHOST=<android-x86 ip address>
  • adb kill-server
  • adb install <your apk file name>

Enjoy the Android! Thanks to the team android-x86 again.