Thursday, June 3, 2010

Much Ado About Android – part II

Before we start talking about hacking your Android phone and doing neat little things to it, we need to go over all of the bits and pieces that are needed. Now this series of posts is not designed to be a complete step by step for every Android device out there. It is however, designed to be a complete walk through of what I did to hack my HTC Magic. My hope is that this will give you the foundation from which you can gather the right information for your device. As we all know, trying to piece this information together from Internet forums can be painful. NOTE: You need to be really careful when modifying embedded devices like a phone. If you do things wrong, in the wrong order, or if you do not have enough patience you can brick your device. Bricking your device means that you have turned it in to a very expensive paper weight and that it is dead and unusable as an electronic device. Make sure you spend some time doing your research into issues that people are having with your specific phone and do not assume that just because it is an HTC Magic like mine that it is exactly the same as mine. Internal motherboards, chips, radios, etc can be different and you need to gather all of that information. Further, you do this at your own risk and your millage may very. I am not responsible in anyway for anything that you do or do not do with the information found in these posts. If you brick your phone, I am sorry, but it is not my fault.

Step 1 - The first thing that you are going to need to do is download and install the Android SDK (Software Developer Kit) for your OS. I will be doing all of my examples from Linux, but tutorials are out there for Windows and MAC. You can download the SDK from Follow the install guide to get this setup. I installed mine at /local/android-sdk/

Step 2 - If you have an HTC device you will need to download the fastboot tool from the HTC developer site. This download can be found at: Unzip this file to the /local/android-sdk/tools/ directory. You will need to “chmod 755 fastboot” to make it executable too. If HTC did not make your device, then you will need to find something similar from the vendor that made your phone.

Step 3 - Enable the “USB Debugging” feature on your device. You can do this by pressing: The MENU key -> Settings -> Applications -> Development and then enabling USB debugging. This is important as we want to tell the phone that we are going to be doing development on it and to expect commands to be delivered to the phone over the USB connection.

Step 4 - We need to tell our Linux USB stack how to deal with the HTC phone so that we can talk to it via the Android SDK and HTC fastboot tools. You can see documentation for this at: For Ubuntu 9.04 and 9.10 you can do this by creating the following file: /etc/udev/rules.d/51-android.rules and adding the following to it:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
chmod a+r /etc/udev/rules.d/51-android.rules

Step 5 – Gather build information about your phone. You can get this information by pressing: The MENU key -> Settings -> About phone. This information will help you when you need to go look for specific details about your device. My HTC Magic had the following from the factory.
HTC Magic
Firmware version: 1.5
Baseband version: 62.52S.20.18U_3.22.20.17
Kernel version: 2.6.27-357975db herbert@and18-2 #1069
Build number: 2.16.707.3 146733 CL#32934 release-keys

In my next post I will talk about ROMs, the various boot loaders and how to get more details about your phone, the type of motherboard it has, what kind of radio firmware is loaded, what kind of bootloader it has, etc. We will also get a recovery ROM loaded and installed.

No comments:

Post a Comment