How-To: Install Google’s Android Eclipse plugin (and/or adb) on 64-bit Debian/Ubuntu

Today I had to reinstall the Android plugin on my system and I recently upgraded to a 64-bit development VM. To my surprise the installation didn’t go smoothly at all. After restarting Eclipse twice I was constantly presented with two error messages “Failed to parse the output of ‘adb version’” and “adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory”. Your system may also present another error message that reads “adb: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory”.

I could see that it was looking for libncurses.so.5 however I know that ncurses is already installed on my machine in /lib as /lib/libncurses.so.5. So where exactly was Eclipse/adb looking for it? It turns out that it wants to find its libraries in the /lib32 directory but you can’t just symlink it or you’ll get an error that reads “wrong ELF class: ELFCLASS64″. adb needs to have the 32-bit versions installed or it won’t function at all.

So to get up and running just run the following command to fix the issue:

sudo apt-get install lib32ncurses5 lib32stdc++6

After that just restart Eclipse and the issue should be fully put to bed. Let me know how it works out for you or if you run into trouble.

If you still run into trouble like an error message that reads “aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory” you need to install the ia32-libs like this:

sudo apt-get install ia32-libs

Then rebuild your project and the errors should be gone.

UPDATE 2012-02-14: Rortian reports that the following command words on Fedora 16:

yum install ncurses-libs.i686 libstdc++.i686 libgcc.i686

Listen to Skidmore Radio (WSPN) on your Android phone

In the same vein of my previous desktop app I put together an Android app that lets you listen to WSPN.  It also includes the schedule so you can see what’s on when you start it up.  Just press the menu button and then view schedule.

Enjoy and let me know if you have any comments or suggestions.

Update: There are a few changes I’ll need to make to this application.  After running in the background for an extended period of time there is a bug that causes a force close when exiting.  This will be fixed soon.

How-To: Use the Samsung Fascinate/Galaxy S to debug Android applications on Windows

I just got a Samsung Fascinate a few weeks back and it’s a great phone.  When I tried to hook it up today to do some development on it though I ran into trouble.  In the Windows device manager it just came up as a “Samsung Android” but Eclipse would not recognize it as a valid target.  In order to use this device, or any other Galaxy S product, as a debug target you need to do one more thing…

The secret is that you need to download Samsung’s USB drivers.  The standard ones that come with the Android development kit will not work even if you modify the INF file to include the USB IDs of the phone.  Samsung has drivers specifically for the Fascinate.  I didn’t find the Samsung drivers right away so I settled for Softpedia.  Normally I avoid Softpedia downloads but I scanned them and looked at them closely before installing and they seem legitimate.  There are two versions listed but I think they may both be the same since the x64 version I installed claimed to be x86.  So here they are:

Generic Galaxy S USB drivers for x64

Generic Galaxy X USB drivers for x86

Softpedia tries to trick you into clicking ads so first click “Download” to the left of the download counter for the file, then click the “Softpedia Secure Download (US) [ZIP]” link.  All of the other links are ads.

After you have installed the drivers reconnect your phone and it should install four different drivers relating to ADB.  Then you should see your device come up in the Android device manager when you try to launch your project in Eclipse.  If the manager doesn’t come up you should go to the “Run Configurations” for your project, select the “Target” tab, and then select “Manual” under “Deployment Target Selection Mode”.  This makes sure that when you launch this project it’ll try to open device manager.

Mobile Analytics by Mixpanel