Samsung Galaxy S Vibrant Recovery / Download mode

Recently I continued to feed my phone habit by buying a used Samsung Galaxy S Vibrant (i9000m). This phone was originally intended for use on the Bell Mobility network but can be unlocked to work on other GSM based carriers. In my case I’m using the phone on Fido. If you are patient, you’ll find good condition used phones below the $200 price point locally.

Of course I have no interest in running the stock firmware and will be installing CyanogenMod on it as soon as possible. The very first step is to learn a little about how the process of updating the firmware works so I don’t break anything. This post will focus on entering recovery and download mode, two different update states but both important.

The image at the top of this post is the stock recovery image. The phone I got had a 2.2 version of Android installed on it. There are various ways to get into this mode, some depend on the version of the firmware you have installed (which bootloader specifically).

  1. From powered off state. Home + vol up + vol down + power.
  2. From powered off state. Home + vol up + power.
  3. From booted and running. Using adb issue “reboot recovery”.

For the button version (#1, #2) release all buttons once you see the i9000 boot screen. For my phone, it was #2, I have seen a phone that used #1, and the adb method should work with both.

The stock recovery doesn’t offer many features. You can format the internal SD card, wipe the phone, and install an update that is on the internal SD card partition. If you look carefully you’ll see the version 3e at the top, this version does a signature check on the update.zip file and will not let you install unsigned binaries (the 2e version didn’t do a signature check).

The second mode you need to be able to get into is download mode. Download mode is used by Kies and Heimdall for doing installations. It is a more primitive mode than recovery which is running a software updatable portion of the firmware which is of course something you could relatively easily get wrong. If you’ve read a bit you’ll have come across references to a download jig that can be built (or bought) that can get you into download mode, some bootloaders apparently don’t have download mode buttons and if you break things badly you can’t get into adb.

To enter download mode.

  1. From powered off state, Home + vol down + power.
  2. From booted and running. Using adb issue “reboot download”.

You should get the an image simlar to the one above. The “Do not turn off Target!!!” message is only valid when you’re actually installing some firmware changes, if you accidentally enter download mode don’t panic.

The other thing many people have problems with is getting reliable USB connectivity to the device. I’m running Linux as my desktop which seems to have no problems in general. Windows seems to have all sorts of problems, some of which appear to be triggered by the Kies drivers. As a general rule of thumb I do suggest you try to verify that you can reliable communicate with the device before shoving some new firmware down the wire.

One other observation about this type of activity: many people out there that are posting in the forums have little to no idea how this stuff actually works. I won’t claim to be an expert in all things here, but I like to think I have a firm grasp on the basics. If you’re really lost, stop – maybe this isn’t something you should be doing. Read a lot, filter out the bad information and take steps you understand. Ideally you want to have a consistent and logical mental model of what is happening. There was apparently also some bad firmware revisions early on from Samsung that caused a lot of internet chatter which needs to be ignored at this point.

Now that we’re somewhat comfortable with the two modes, have some confidence that we can reliable talk to the device and have a couple of the tools installed – we can start thinking about what firmware and changes we’ll be doing to the device.

A $200 tablet

Let me start by saying that the Apple iPad2 is an amazing device, and while it exceeds the price point that I want to talk about it is still a very good value if you treat it like a portable computing device. The lowest price I’ve seen is $299 for the 1st generation iPad, the iPod Touch sneaks under the $200 price point but only has a 3.5″ screen.

Some will point to the HP TouchPad starting this but the race to the bottom has been on for a while in the android tablet market. Of course at the very bottom are tablets like the Aakash, with a retail price in the $60 range. There is admitedly a big difference between the two; the TouchPad is high capability hardware at a fire sale price and the Aakash is a series of price/performance trade-offs.

If you simply want a cheap tablet, there are plenty in the sub $100 price point. It will have wifi, a 7″ screen, resistive screen input (non-multitouch), and a lower end processor. You’ll likely be stuck with the software that is installed on it, if you’re lucky it might have access to the Android Market or have ‘hacks’ available to expand it’s software capabilities. A fun device if you can live inside of its limits.

I’ve been looking at tablets for a while, and while the iPad is very nice I personally prefer an Android based device. As for price point, I had mentally set my price at $200 – in part influenced by the Nook sale that happened earlier this year.

What I liked about the nook is it has reasonable community support, including CyanogenMod. I had the chance to play with a Nook running CyanogenMod, it felt fine but I had missed the sale price and at the retail price of $250 it felt like there wasn’t enough to it. Recently the Nook Color has dropped to $199 and while it is still tricky to get in Canada, eBay has refurbished ones under $200 with shipping to Canada.

After looking around at various 7″ tablets I kept coming back to the Galaxy Tab. It had all the features I wanted and more, and as it turns out every once in a while they appear on kijiji for around $200. It does take a bit of waiting around, and I used the RSS feed [RSS] to watch the search term to keep me alerted when one was posted.

I suppose I should also drop in a reference to the very recently released Kindle Fire. This is a bold move by Amazon, but one that is an obvious evolution of their storefront if you think about it. There is currently problems getting them in Canada, but it is a very interesting device and price point. Certainly a direct threat to Apple due to the ecosystem Amazon is providing with the devices.

Let’s take a look at the three and compare a few features I think are key:

Nook Color Kindle Fire Galaxy Tab
Screen 7″ 1024×600 7″ 1024×600 7″ 1024×600
CPU 800MHz 1GHz(dual core) 1GHz
RAM 512MB 512MB 512MB
Storage 8Gb + MicroSD 8Gb 16Gb + MicroSD
Weight 450g 413g 380g
Camera none none 3.2MP + 1.3MP front
Wireless Wifi b/g/n + bluetooth Wifi b/g/n 3G GSM + Wifi b/g/n + bluetooth
GPS none none yes
Community Yes Not yet Yes

The Galaxy Tab beats the Nook on all fronts, but if 3G data, GPS and camera are not important features to you, the Nook looks very nice. The Nook probably has the strongest community support right now, but the Galaxy Tab is not far behind. The Kindle is very new, so there isn’t much of a hacking community yet (I’m sure there will be) and if you live in the US then the Amazon ecosystem looks very compelling.

I’ve actually purchased two Galaxy Tabs so far. The first I ended up passing along to my father in law who had been on the hunt for a tablet for some time. He had actually tried the iPad2 and Playbook out before settling on the Galaxy Tab. I think price point and functionality combined to meet his criteria. The second one appeared the other day for $150 including a leather case, how could I say no? Yes, that’s my $150 tablet pictured at the top of the post.

I haven’t had any time to play with it so we’ll see if it finds a niche in my gadget use, I’m encouraged by folks like Tim Bray who seems to prefer the 7″ tab vs. other more powerful and newer devices. It is a little tempting to turn it into a phone as it’d make the Galaxy Note seem a bit undersized, but I’d never live down the sidetalking comments at work.

Parting words:  WOW!  If this is the price point we’re at now the future looks amazing for gadgets with mind blowing technology.

HTC Desire S-OFF

HTC phones have a security flag, this flag is normally “ON” and is indicated on the bootloader screen as S-ON. The purpose of the security flag is to prevent unsigned firmwares from being installed. Clearly if you want to modify your phone with custom firmware you need to be in the S-OFF state.

To access the bootloader screen: start with the phone in a powered off state; hold the volume down button; then press the power button. This should result in you entering the bootloader screen. Menu navigation is via volume up/down and the power button for select.

My HTC Desire was in S-ON, yet still running custom firmware. This was done by Unrevoked3. It switched the phone to S-OFF, installed a custom recovery image, then switched back to S-ON. I believe since the recovery image has the ability to install firmware you can dodge the firmware signature check (effectively bypassing hboot). Really the only reason to have S-ON is to make the phone look more like stock.

There are multiple ways to achieve S-OFF (including Unrevoked3), but what I primarily wanted to do was change the partition table to allow for more application storage on the phone. The partition table is part of the hboot, so changing this is a bit scary since if you mess up hboot you have no easy path to recovery. The good (and bad) news is that S-OFF is also achieved by flashing a new hboot.

Custom partition table hboots are hosted on the AlphaRev site. It is a information dense site. If you plan to do this, read all of it carefully. If you really don’t understand what it’s talking about, read some more or consider asking someone for help. This is not something you want to get wrong.

As with anything like this – do a backup of your stuff. Download the iso from AlphaRev and burn a CD, you’ll be booting your PC into the custom linux based image to do the changes. The tool is well scripted and pretty clear. Do not panic, and read what is on the screen carefully. Once the AlphaRev tool is done, you’re phone will be in S-OFF state and should have a bootloader screen similar to what is at the top of this post

Now we’re in S-OFF mode, we can flash an hboot with a custom partition table. If you had already achieved S-OFF you could skip the above steps and just start here to customize your partition table. Here are the steps I took:

  1. Boot into your recovery image (ClockworkMod Recovery) and do a backup
  2. Verify the MD5SUM of the hboot file you downloaded
  3. Place the phone in fastboot mode (bootloader)
    $ sudo ./fastboot flash hboot bravo_alphaspl.img (filename may differ)
  4. Reboot the phone
    $ sudo ./fastboot reboot-bootloader
  5. Erase the cache
    $ sudo ./fastboot erase cache
  6. Boot into your recovery recover image
  7. Wipe everything using recovery
  8. Restore the backup you made

If your phone is stuck in S-ON, then fastboot isn’t an option.

The benefits of the custom partitions is significant. The NexusOne had 196MB of internal storage, the stock HTC Desire only 148MB. With the custom partition table hboot, I now have 288MB. The trade-off is the partition table I’m using now won’t fit the stock ROM, but reverting to a different hboot is easy enough by repeating the steps above.

You’ll notice that the AlphaRev process customizes your splash screen. If you’re not happy with this they provide a link to the stock splash screen. Enter the bootloader again, and issue:

$ sudo ./fastboot flash splash1 desire_stock_splash1.img

And you’ll be back to looking like stock. Creating your own custom splash screen is also quite easy to do. If I get inspired to change mine, I’ll write up details on how – but a bit of searching will get you the answer too.