Sunday, January 10, 2010

Android code finally coming together

Got the code up and running reasonably well, going collect my HTC Hero phone later. I'll load the apk in the device to give it a go.


Sunday, January 3, 2010

Back from Genting

Chilling out with friends, waking up neighbors with Rock Band and coding in the cool weather. Fun times.
Back to reality for now.

Saturday, January 2, 2010

Android app development on Netbooks

I like the size of netbooks, their small size means that you can bring them around easily. What I didn't anticipate was how underpowered the processor really was.

I've been doing development work on the Android platform and I wanted to use the netbook so that I can bring my code around and work on it when time permits.

Problem
Eclipse runs fine on the netbook but the emulator that comes with ADT is another matter. I was totally unable to launch my program from Eclipse using the emulator. It takes ages to get past the Android splash screen and I get a lot of error messages .

Speeding it up

Since android code runs on a Dalvik virtual machine, I could simply grab a x86 android machine and test my code on it. The x86 version should run pretty well on the netbook. I got a copy of Live-Android and a copy of VirtualBox x86 VM and tried the image.

Be sure to boot it using VESA in VirtualBox. Normal boot will produce strange flickering and blank screens.

It works!

How to install app onto Live Android

Live Android is a live cd, which means all data is transient. Once you reboot, all data will be wiped. That includes installed programs.

How do you get around it?

In Virtualbox, configure the Android vm, set your OS to Linux and Version to Linux 2.6
Create a hard disk (I used 100mb which is sufficient for my needs), attach it to the VM

Boot into Android Debug Mode.

You should see a Linux prompt, use fdisk(or cfdisk) to create 2 partitions.

Run "mdev -s" to create the device nodes for your new partitions.

Create file system for both partition
mke2fs -j -L /DATA /dev/sda1
mke2fs -j -L /SDCARD /dev/sda2
Reboot box

reboot -f

At the Android bootloader menu, select VESA and hit TAB, edit DATA=/dev/sda1 and SDCARD=/dev/sda2
Hit enter to resume boot.

To verify that you have mounted both partitions - hit ALT + F1 and issue "mount"

You should see /dev/sda1 and /dev/sda2 mounted.
That's it for the VM configuration. Remember to issue the boot options every time you reboot. I save the machine state when I need to shut it down so I don't have to go through that step every time.

Development Host

What you need:
  • Eclipse with ADT installed
  • Mongooose HTTP server (or any web server of your choice)


  1. In Eclipse, right click on your project, select Android Tools->Export Signed Application
  2. Follow through the dialogs, if you don't have a new keystore and key, create it now.
  3. Export it to a directory( say e:\projects\Exports)
  4. Copy mongoose.exe into e:\projects\Exports
  5. Run mongoose.exe

In Android VM

Configure the Application Settings to allow Unknown Sources

Launch browser, open HTTP://192.168.56.1:8080

You should be able to browse your directory. Download your apk and launch it.

That's it!






Resources

Mongoose HTTP server (http://code.google.com/p/mongoose/)









Saturday, December 26, 2009

Busy weeks


So much for the Neoteny updates, last two weeks has been a case of Murphy's Law unleashed. Barely had time for anything else besides the events unfolding at work.

Catching up on Android development now. Getting the hang of it. Eclipse integration makes it a wonderful and painless experience.

Sunday, December 13, 2009

Neoteny Singapore Camp 1

Attended Neoteny at SMU on Saturday, primarily to meet up with James and to get a feel of what the VCs and entrepreneurs are doing here.

I'll do a writeup later. Plenty of work keeping me busy later part of that Saturday till today.

Tuesday, December 8, 2009

Renting stuff off the Cloud

While chatting with the owner of BuUuk.com(Jon), he briefly mentioned that he was using Amazon EC to serve static content at a cheap rate. This got me thinking - perhaps I can host my lab machine on the cloud and rent it at a far cheaper rate than what I would pay for a physical machine. I'll have to do my calculations( or best impression of it ) and then dive in and hope for the best :)