DDMS on Ubuntu throws exception ?

I downloaded the latest Android SDK and connected my Nexus One. Once starting DDMS, it throws up this
[codesyntax lang=”xml” title=”DDMS error”]
user@wanaka-ubuntu:~/android-sdk-linux_x86/tools$ ./ddms

(ddms:10868): Gdk-WARNING **: gdk_window_set_icon_list: icons too large
04:37:36 E/ddms: shutting down due to uncaught exception
04:37:36 E/ddms: java.lang.UnsatisfiedLinkError: Can’t load library: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/libmawt.so
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1649)
at java.lang.Runtime.load0(Runtime.java:787)
at java.lang.System.load(System.java:1022)


If you read the log, you realize it tries to use the openjdk version, but we want to use the SUN (ahem Oracle) JRE.

Open the ddms script file and change the line (around line no.65)



javaCmd=”/usr/lib/jvm/java-6-sun-” (adapt it to your proper path to the java binary!)

There we go ! Lets snoop inside the phone

Dalvik Debug Monitor (DDMS)

and we can even create screenshots !

Android Screenshot

Debug Android Nexus One with Eclipse

Using Ubuntu and Eclipse you follow the instructions here:

  • Create  the file /etc/udev/rules.d/51-android.rules
  • Change the rights chmod a+r /etc/udev/rules.d/51-android.rules
  • and add the line  SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0666″
  • but running adb devices gets you a bunch of ???? and ‘no permission‘ and you cant connect from Eclipse.

The proper vendor id for HTC Nexus One is 18d1

SUBSYSTEM==”usb”, SYSFS{idVendor}==”18d1″, MODE=”0666″

(No clue why they never updated the docs)

Google Nexus One arrives in Singapore

Since a few weeks the new Android 2.1 (!) running phone is available in some countries (US, Germany,HKG, Singapore) solely by mailorder from US . I saw some shops in selling it in Sim Lim (not according to Google’s “law” though). I can dive straight into Eclaire hacking now.
Hint: The docking station comes optional. If you order it, you wont need the additional power adapter, it comes with one. Also the USB/power plug is different to the previous htc developer phone (aka G1) !

Some pictures from the box opening ceremony:

Google Nexus One

Google Nexus One - Whats in the box ?

Google Nexus One - Whats in the box ?

Google Nexus One

Android Phone cannot send SMS

To be honest, I haven’t been doing much with Android recently. One reason (except being perpetual busy with other projects) was the fast change of Android versions 1.5, 1.6, 2.0 and the fact the Android Developer phone would not support 2.0 anymore (which is technically not possible). After the I updated the phoneware to 1.6 a while ago, I lost the connectivity to 3G. Recently I tinker the phone settings to make it work again, basically the APN settings were somehow changes during the update process. Check 2 settings if you face this problem as well: the prefered network type under Phone Info and the username and password of your APN. Some providers need it blank or empty (Singtel expects blank/blank). Dueing this process I lost the ability to send SMS, most probably due to pressing the update button under Phone Info with an empty SMSC (Short Message Service Centre)  field.

  1. Open Phone Info by dialing *#*#4636#*#* (the Phone Info Screen will open, there is no other way to access this page, unless you install anycut)
  2. Check the SMSC value (at the bottom of the page). Press refresh, if it is still empty you need to enter the SMSC of YOUR provider. For Singtel it’s +65 96500001 or +65 96400001.


PS: Now there is a much bigger choice on Android powered phones, specifically Motorola (link) being quite active now. I still dont understand, despite Android to be so “open”, why the devices are not available everywhere or only locked-in to a service provider that force you into expensive data subscriptions. Did you have a look at the Nexus One (link) ?