January 2009 Archives

Playing around with android

| No Comments | No TrackBacks
For testing out space suits and whatnot.

Image via Wikipedia

I have been androiding since last 2 days. I started from scratch, understood the documentation, went through tutorials, read sample code here and there, and did some exercises. Finally, after a whole day, i was able to build something productive on top of it. Blame my creativity, whatever i wished to build for it, was coincidently turning out to be enhancement of already present feature. Contacts, Calls, messaging etc. All this lead to some more efforts towards building the android operatng system from scratch. Following were the steps
  1. Get repo scripts from google
  2. Get checkout of the trunk
  3. Copy buildspec.mk to root. It ususally resides in one of the internal folders.
After this, i decided to compile the simulator. I launched make, and after 15-20 odd minutes, make returned some errors. These errors were due to INT_MAX being used in some of the cpp files. I am on Ubuntu interpid (8.10). This has gcc version 4.3.x. For optimization purposes, headers have been cleaned out. Thus, android folks forgot to put #include into one of the files where they were using INT_MAX. I fired make again.

 After some time, it compained giving double definition of template swap. This came in one of the stl files. I had to comment to move further.

All was built peacefully, and finally the simulator started building. At this point linker errors related to wxheaders-2.6 appeared. Somehow, the program was unable to link to gtk headers properly.I spent good 1 hour trying to fix it by installing different versions. After pondering upon variouos options, i thought it would be best to drop the simulator and instead compile an arm image for the emulator. I did changes in buildspec.mk by specifying correct target, and fired make again.

This time it complained not finding the definition of swap (the same template that i had commented earlier due to double definition). I uncommented it, and put make again.

After around 45 mins of screen scrolls, it had put system, ramdisk, kernel, and userdata images in proper folders.

I ran following command  

ashish@zeus:~ out/host/linux-x86/bin/emulator -system out/target/product/generic/ -kernel prebuilt/android-arm/kernel/kernel-qemu -data out/target/product/generic/userdata.img

This brought up the emulator on screen running the bundled apps. I changed a couple of strings in Contacts application, and build the images again by make. This time it was very fast and after firing up the emulator again, i could see the change s being reflected there.

Next few days would be building some core features and perhaps building some more apis.



android_screen.jpg.



Reblog this post [with Zemanta]

About this Archive

This page is an archive of entries from January 2009 listed from newest to oldest.

December 2008 is the previous archive.

February 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.23-en