Please KIS Me

"Half a hectare of land and one year of labour were required to feed one person in 1900 whereas that same half-hectare now feeds 10 persons on the basis of just one and a half days of labour. The difference lies in the scientific knowledge[...]" UNESCO Science Report 2005

Monday, September 21, 2009

Debugging in Android

The first thing I did after my first steps developing on Android was to change the SPL. The SPL is commonly known as the bootloader, that is, is intended to load the image of the Operative System to the flash memory of the device. I followed the instructions presented in my previous post and updated my HTC Magic (Saphire) with the Engineering SPL 1.33.2010. The original SPL was the one that is shipped on Vodafone Spain Magics, HBOOT-1.33.0004(SAPP10000).

After doing these change I was able even to load Boot images and thus run unsigned images of Android on my HTC. Superb!

Now, what I want to do is to start debugging applications on my HTC. First of all I had to enable App Debugging in the Android Device: On the device, go to the home screen, press MENU, select Applications > Development, then enable USB debugging.

Second, you have to make the application debuggable. To do that, you will have to add the following property to the application element of the manifest.xml:

android:debuggable="true"

Next, just connect the Device to the computer, check with adb that the device is detected, and run the application. It will immediately run the application on your device, it is indeed that easy!

Next step, is to build applications with a custom Image of Android... will come soon!

Labels: , , ,

Wednesday, September 02, 2009

Developing on Android

Well, who was going to think more than two years ago that I was going to write a post with that title... Finally the time has come and even though there are several places where you can find a how-to guide to develop on Android, I will try to present in the following posts how "I managed" to set up and start developing on Android platform.

My pre-requirements at present are: Windows XP Home SP3 AMD 64bits laptop, a Vodafone Spain HTC Magic and some microSD cards. From this start point first step is to set up the development environment. For that I will follow the following steps:
  1. Download SDK
  2. Download Eclipse
  3. Install Eclipse (unzip folder)
  4. Start Installation (Slight differences with Galileo release of Eclipse)
  5. HelloWorld Application to check that everything is OK
After this 5 steps I have been able to run in the emulator the HelloWorld Application. Now I am going to try to attach the Magic to the Dev Environment. I will follow the steps in this nice how-to for HTC Saphire (Aka Magic):
  1. Install the Drivers and HTC Sync Program
  2. Run "adb devices" command successfully
Next step has been writting a backup of my present Android. To do that I just dowloaded the corresponding recovery ROM (following this instructions): RAv1.2.1H
After downloading I did a fastboot (that is booting from the image in the PC without writing anything to the Flash of the phone) and did the backup, that is stored in the SD card. This backup will be stored for future need to recover ;-)

So, for the moment I am done, I have the possibility to fastboot ROMs in my android. Next steps will be changing the SPL and actually writing new and unsigned ROMs to the flash of the phone!

Labels: , , ,