Rooting a Vodacom HTC Magic and upgrading the firmware in South Africa to get Android Market and more.

If you’re in South Africa and you own an HTC Magic Android phone you’ll soon realise that it’s missing Android Market, which to be honest, is pretty much what makes Android so damn amazing in the first place. In its place is the Leaf Open Market. Leaf are the South African HTC importers. Open Market is about as awesome as getting stabbed in the eye with a pencil, repeatedly. The application works okay, but the selection of applications is incredibly dismal.

Update 30/06/09: There are rumblings that Leaf is going to “release” Market in “two weeks”. Supposedly they’re going to be sending out instructions on how to ROM your phone or allowing you to take it into a vodacom store and getting it ROM’d there (most likely they’ll need to send it away). I have no idea how true these claims are. Maybe someone wants to phone Leaf and ask them?

Anyway, the primary reason I love Android is because it’s hackable. Commence hacking. Warning: Yes, this probably will void your warranty. Yes, it’s possible that the real Android Market will eventually be released in SA, but I’m not holding my breath.

Basically what we’re doing here is updating the phone’s firmware to the version HTC originally intended the Magic to ship with… There are stacks of other firmwares (called ROM’s in the ‘community’) floating around, I’m just pointing to one that definitely works. Using the wrong ROM can put your phone in a state where it refuses to boot… Never fear, see below ‘Recovering from a bricked Magic‘.

General Steps

I’m going to explain the general steps you go through first… This will help you understand what it is you’re about to do so that you aren’t just blindly following instructions.

  1. We get the Android SDK and Fastboot applications installed on our computer
  2. We copy the ROM we want to install onto the SD Card and rename it ‘update.zip’
  3. We boot the phone into FASTBOOT mode.
  4. Using the FASTBOOT program we temporarily upload and ‘install’ the daldroid-recovery.img ROM over USB. (This is a special boot loader app that lets us do cool stuff like made Nandroid backups and install that update.zip ROM from the SD Card.)
  5. The phone boots into the daldroid-recovery mode.
  6. We backup our original ROM to the SD Card using Nandoid, clear some settings and then install the new ROM.
  7. Congratulations, you have a rooted, real android phone ;)

Step by Step Instructions

Okay, now that you know the basic steps, here are the details.

  1. Enable USB debugging on the device in Settings->Applications->Development->”USB Debugging”
  2. Ensure you have the Android SDK downloaded, and the included USB driver installed correctly on your desktop.
  3. Download Fastboot. Since I use linux I just copied the ‘fastboot’ binary to the Android SDK’s tools directory and made it executable.
  4. Open up a terminal/dos prompt and “cd” to the tools directory in your Android SDK folder.
  5. Plug in your USB Cable.
  6. Run the following command:
    adb devices

    Linux users will need to run:

    sudo ./adb devices
  7. You should see your Android phone’s serial in the list. If you get an empty list, you need to sort out your USB driver.
  8. Download Daldroid’s Rooted (adb shell) Original HTC ROM for Magic and Daldroid’s Recovery Image
  9. Unzip the daldroid-recovery.zip file and put it in the Android SDK’s tools directory.
  10. Connect the phone with the USB cable and from the notifications bar, mount the SD card. Rename daldroid-htcmagic1-signed.zip to update.zip and copy it to the phone’s SD card.
  11. On your device, enter the bootloader FASTBOOT mode by turning off the phone and then, while it is off, pressing the volume down button while pressing the power button.
  12. You should get a screen with some androids on skateboards at the bottom…Give it a second to run whatever tests it runs.
  13. Pressing the back button will get you into FASTBOOT MODE and you should see the screen change to say ‘FASTBOOT USB’
  14. Type the following commands on your computer (not on the device):
    fastboot boot daldroid-recovery.img

    Again, Linux users will need to run:

    sudo ./fastboot boot daldroid-recovery.img
  15. This will upload (over usb) a mini recovery image and reboot your phone… It’ll take a few seconds and you’ll be prompted with the recovery interface.
  16. Select ‘Nandroid Backup 2.1′ from the menu. This will write a backup of your existing system to the SD card… useful in case something goes wrong.
  17. Select ‘Wipe Data/factory reset’. This erases settings etc that might not be compatible with the new firmware
  18. Select ‘Apply sdcard:update.zip’. This essentially installs the system image from the update.zip file.
  19. Select ‘reboot system now’.
  20. Wait a long time for the first initialization. Congratulations, you have a real, rooted, Android phone with Android Market and thousands of quality apps to install.

The really nice thing about the Daldroid image is that it comes with all the APN settings etc required for Vodacom so your HSDPA will work straight away.

Recovering from a ‘Bricked’ Magic

I promised earlier I would tell you how to recover from a ‘Bricked’ Android phone… I’ve put ‘bricked’ in quotes because a lot of people seem to be thinking they’ve bricked their phones when in reality it’s quite easy to recover.

  1. Check if you can get to into Fastboot Mode:
    1. Remove the battery.
    2. Wait 10 seconds (or more)
    3. While pressing the volume down button, pop the battery back in.
    4. If it doesn’t turn on by itself, keep pressing the volume down button and press the power button.
    5. You should get the Fastboot menu.
    6. If you don’t get into Fastboot mode, try a few more times and then panic. I don’t know how to help you. Try Google.
  2. You now need to copy the right update.zip (see step 8 above) onto your SD Card. There are two ways:
    1. Get a usb card reader or use another cell phone that will allow you to mount the SD Card over USB and just copy it.
    2. or, the slightly fancier way, while your phone is in Fastboot mode run the following command on your computer (first put the new update.zip in your Android SDK tools directory):
      adb push update.zip /sdcard/update.zip

      Again, Linux users will need to run:

      sudo ./adb push update.zip /sdcard/update.zip

      This uploads the file directly onto the SD Card via USB. It takes a minute or two so do be patient.

  3. Now you just need to follow steps 11 though 20 from the instructions above and you should be golden.

Updated (21 June 2009) – Putting the original Vodacom ROM back

If for some or other reason you want to go back to the old version of the Vodacom ROM, you can do so quite easily.

Nandroid writes a selection of files to the SD Card:

2.5M  boot.img
339K  cache.img
60M   data.img
256K  misc.img
265    nandroid.md5
5.0M  recovery.img
78M   system.img

You should really make a copy of them on your local machine just in case. Once you’ve got those files on your local machine you can restore your phone using fastboot like so:

  1. Copy the nandroid files (*.img) from your backup into your SDK Tools Directory.
  2. Boot your phone into Fastboot mode (Steps 11, 12, 13) from the Step by Step guide above.
  3. Run the following commands from your computer:
    fastboot erase system -w
    fastboot erase boot
    fastboot flash system system.img
    fastboot flash userdata data.img
    fastboot flash boot boot.img
    fastboot reboot
  4. Congratulations, you now have your old Vodacom phone back. :/

Hope this helps, feel free to ask questions.

22 Comments

Let The Police Eat Cake

A few months ago we had some hassles in Obs with criminals stealing car wheels. Eventually it was happening almost nightly. The Neighbourhood Watch (I’m a member, how responsible of me!) started ramping up their patrolling and putting pressure on the police to catch the guys. Within a few days a sharp eyed policeman spotted something trying to hide next to a car with a wheel spanner in his hand. Within minutes they had 4 guys in custody… I was out on a patrol at the time, ironically one road up from where the guys were eventually caught. That night at the Woodstock police station I promised to organise some cake for the police to say thanks.

I pinged a few of the more active neighbourhood watchers and a few agreed to help out financially… Then I though about Charly’s! If you want awesome cake you have to go to Charly’s, but it’s not cheap. I mailed Charly’s and asked if they’d be willing to give us a discount for a good cause. To my surprise they said they’d give us cake for free!  This was brilliant. We used the additional funds to buy other stuff like samoosas and coke etc. To our absolute surprise, when we went to go and collect the cake they had even decorated each one with a police theme!

All in all a nice little party (we actually had two parties to cover both shifts). A big thank you to Charly’s and the other ONW members who helped out.

cake_burglerP4160050cake_detail

No Comments

4 years later, I’ve changed…

My little blog had been churning along for four years with the same old boring green theme and I finally put some time aside to upgrade and change the theme.

Also be sure to notice my twitter feed on the right hand side there.

over and out.

3 Comments

More Before and Afters

Since we moved in we’d been wanting to buy one of those pine workbenches they sell at places like builders warehouse and do it up for the kitchen. We decided on painting the base in white enamel and staining and varnishing the top.

As you can see, before:
Before

After:
After

I’m quite happy with the difference, it’s made the kitchen feel far more structured.

1 Comment

Visualising the Interest Rate

I though it might be interesting to try and graph the Reserve Bank’s prime rate data… It goes back a long way. I used Python to scrape and collate the data and PyCha to generate the graph.

UPDATE: I’ve replaced my graphs with new versions made by Russell who corrected my original code by interpolating the data correctly over the y axis.

This is the narrow version.

And this is the wide version (click to download the actual 10000px wide png)

Interestingly enough, todays rate cut *was* on that page earlier today, but now I see it’s gone… so I inserted it manually ;)

No Comments

Odd murmurings about diet.

I’ve been on a pretty strict diet since last Monday and although the goal of the diet is simply to lose some weight I’ve noticed a few very interesting things during the week.

  • Mindset is King. I don’t know what flipped the switch in my head, but I feel ready to diet now. I think this is very much to the “can’t quit until you really want to quit” argument for drug addicts etc.
  • It’s not that hard. I’m not hungry. When I notice myself getting hungry it’s usually less than an hour away from lunch time etc so I just push through till then.
  • I feel better. It’s not that I used to feel bad, but I just generally feel better, less lethargic. I didn’t expect this.
  • Eating smaller portions is a habit you can get addicted to. I used to eat really big meals, now I’m trying to see how little I can eat while staying healthy.
  • It doesn’t take long for your body to adjust… by Thursday I was already feeling stuffed after eating a relatively small dinner.
  • It can be hard to make healthy food interesting but it also gives you the freedom to experiment a lot since you’re going to be having a chicken breast 3 times a week etc. My chef is doing a really good job of trying to keep dinners interesting.
  • I get cravings for massively unhealthy food (think deepfried everything). This is probably the result of my body not knowing what the hell is going on and trying to get me to eat some “normal” food. This will obviously pass.
  • At this point I’m very aware of the diet still, I’m sure that as I carry on it will become “normal” and I’ll stop thinking about it.
  • Saturdays are dietary “off days” and I had a chicken mushroom pie. My lord did it taste good ;)
  • Fruit is pretty good stuff.
  • I’m aiming at a loss of 1kg per week. I lost 2.5kg in the first week. I don’t expect that trend to necessarily carry on into the subsequent weeks, but who knows? I’ll keep you posted.
5 Comments

A photo post.

We’ve been very busy with all sorts of things… Here are a few pictures to prove it!

As usual, all my photos can be viewed here.

4 Comments

GeekDinner Stellenbosch

Last night was the first Stellenbosch GeekDinner and I thoroughly enjoyed it, mostly because of the venue.

Lovane Boutique Wine Estate was gorgeous and perfect. It’s on the Cape Town side of Stellenbosch so you can get out of the city after work and be sipping wine on the balcony overlooking the vineyards while the sun is still out.

Best of all was the food. A sirloin steak buffet with a mushroom sauce and tons of veggies and a green salad. Dessert was homemade ice cream with chocolate sauce. It was delectable in its simplicity. Something that the GeekDinners have been missing out on since we were at Mell’s Kitchen. The meal was perfectly paired with the bottle of wine had been generously placed on our table by Perdeberg.

Which brings me to a point about food. My partner is a chef. Her life is food and she’s incredibly fussy about getting food perfect… As a result I have eaten some pretty amazing meals ranging from the utterly sublime to french toast.

Perfection turns out to be very hard, even for the simple things. How do you fry a perfect egg? How is the perfect roast chicken prepared?

What any chef who truly knows their craft will tell you, if they’re being honest, is something that any good drummer will also tell you. To really impress, perfect the basics, keep it simple and introduce your own subtle flare to hook the person eating (or listening).

Complicated rhythms that mix 3 time signatures and require super human levels of coordination only impress drumming nerds. Also, making food too complicated before you’ve perfect the basics is like taking part in the 100m sprint before you’ve learnt to walk and too much complexity will just taste like noise to most people, even the “experts”.

Lovane got it right. They got the basics right and they had their own subtle touches which finished it all off nicely. The price was perfect, the venue was perfect. I just need to return to see if their wines are perfect!

If you’ve got a function and need a venue for around 55 people I can thouroughly reccommend Lovane.

1 Comment

There is no cure for stupidity.

A while ago I blogged about a weird comment I had received on one of my blog posts.

In summary, there is an SEO company called SEO Results (aka BizSearch, aka NetAge) that gets its staff to trawl blogs and write comments with the Author URL set to the url of one of their SEO clients.

Author : PMM (IP: 165.146.34.239 , dsl-146-34-239.telkomadsl.co.za)
E-mail : kim@bizsearch.co.za
URL : http://www.pmmproperties.co.za
Comment:
Wow what a difference it looks fantastic, great job done

One would think that after the first run in I had with these spammers they would have avoided my blog?

Anyway, to make sure it’s clear: SEO Results are spammers and black hat SEO idiots… Using them is likely to get you bad mouthed on the internet (like this) and perhaps worse, blacklisted on google.

5 Comments

An online hiatus

For a little over a month now I’ve been compulsively avoiding the time sapping parts of the internets. This isn’t the result of a new years resolution but rather the collective result of being incredibly busy. Admittedly I’ve been on the internet the whole time, but mostly for work or some form of hacking.

My google reader is overflowing, Digg.com could have been down for months, the only blogs I have read are things that someone has specifically asked me to read or randoms that I hit upon while plumbing the depths of python knowledge. Boing Boing, Engadget, DamnInteresting, FailBlog, Icanhas*, XKCD and all-those-things-my-friends-thought-were-mindblowingly-interesting have been ignored… and suprisingly, not missed.

Sure I yearn to know what the fastest SSD in the world is *right now*, or how big the Panasonic engineers have managed to push high contrast LCDs… and about that video of the cop hitting the kid (this happens every few months and causes a flap)… BUT, I’ve realised that it just doesn’t matter… or maybe it does, but not to me… not at this stage of my life.

Perhaps I’m just getting old, but the thing is, this month has passed and I feel better for it. I didn’t plan it this way, but now that it’s happened I get the impression that my little (or perhaps big) addiction to all-things-intertubes was wasting a crap load of my time. I feel good about not knowing. I feel good about the stuff I’ve learnt rather than the drivel I could have absorbed.

In the old days it was still possible to follow the internet… I had more time and the inernet was producing new stuff as a slower rate… but we’ve reached the point where every tom dick and sally has a blog and a phone cam… and is meticulously documenting their lives for the rest of us to pretend to care about. I don’t.

So I urge you. Stop reading my blog. If it’s ever relevant to something you care about you’ll no doubt find it via google… in the mean time I’m just going to upload pictures of my garden and rants about bad web developers.

Over and Out.

Have you seen this video of my cat?

No Comments