How-To: Hack Your Android G1 Phone


Remember when T-Mobile’s G1 was being billed as a potential iPhone killer? Powered by Google’s Android platform, the open-source mobile OS was supposed to usher in the end of the iPhone OS era, and who knows, maybe someday it still will. But it won’t be on the G1 (otherwise known as the HTC Dream), the chunky alternative that misses the mark of mobile greatness.

But while the G1 might leave a lot to be desired out of the box, power users who aren’t afraid to take matters into their own hands have the ability to significantly enhance the handset’s capabilities. On the following pages, we’re going to show you how to hack your G1 the easy way so you can do things with your phone that other G1 owners only wish they could, like install apps to an SD card. And for you old school traditionalists who like to get your hands dirty, we’ll also show how you to root your G1 the old fashioned way and wade through all the necessary code step-by-painstaking-step. After it’s all said and done, we’ll cover some of the most popular third-party ROMs and tell you which one we’re rolling with.

Reasons to Root

First, you have to understand what it means to ‘root’ your phone. Google’s open-source Android platform is based around a Linux kernel. In the Linux world, root access is similar to having administrative rights on a Windows install, and by rooting your phone, you’re giving yourself permission to poke around Linux (in this case, Android) willy nilly.

There are several reasons to root your G1, not the least of which is the same sort of satisfaction you’ll get that comes from building your own PC versus buying a pre-built rig. But there are more than just bragging rights and a self-acknowledged ‘Job well done’ at stake.

Image Credit: SanDisk

One of the biggest benefits of hacking your G1 is so you can bypass the handset’s meager memory limits and install applications directly onto your SD card. This isn’t something that’s possible on a G1’s stock firmware, which forces you to make do with a paltry 70MB or so of leftover internal flash memory. With roughly 10,000 apps available through the Android Market, it doesn’t take long to fill up your phone, especially if you’re into gaming. Many had hoped the much anticipated ‘Cupcake’ (version 1.5) firmware update would address this shortcoming, but it didn’t. Even worse, HTC’s shortsightedness could potentially leave G1 owners stranded at Android 1.5, as there’s chatter of future updates being too large to fit on the internal flash memory. But with a rooted phone, you needn’t worry about such nonsense and can point and laugh at the chumps who have used up all of their phone’s internal storage and must uninstall an application before trying out a new one.

In addition to what you’ll find on the Android Market, there are a bunch of apps that have been developed specifically with root users in mind. WiFi tethering is probably the most common, which allows you to connect your laptop to your G1 and access the internet through your phone. This comes in handy should you find yourself in a WiFi deadzone.

Other reasons to root include being able to test drive new Android updates before they’ve officially been made available to the public, the ability to customize your own boot image, you can create a full backup of your phone, install a full-blown Linux distro, and rock out with other root-specific applications, among other uses.

Reasons not to Root

As with any kind of unofficial modification, if something goes wrong, you’re on your own. Nobody’s going to replace your phone should you manage to turn it into a pricey paperweight, though the risk of something like this actually happening is pretty slim if you take your time and do things right. You’re also putting yourself in a position to rely on third-party ROM developers for future updates. Instability and quirky behavior might also rear their ugly mugs, and depending on which ROM you install, certain functions might be disabled

Still ready to root? Let’s get started!


Prep Your G1

We’re not going to muck with your SD card during the rooting process, but it’s still a good idea to back up any data you’d rather not lose. Later on, we’ll be formatting your SD card anyway, so you might as well transfer any music, photos, and other files you want to keep safe to your PC. Also be prepared to re-enter your contacts if they’re not synced with Gmail.

If your PC is equipped with a memory card reader, you can simply slide in your SD card and transfer files that way. Otherwise, use the G1’s included USB cable and attach the phone to your PC, select ‘Mount,’ and proceed with your manual backup.

Now that you’ve backed up your SD card, it’s time to make room for the ROM installation that comes included with the one-click root application. You’ll need about 9-10MB of free space on your G1’s internal memory, so start uninstalling applications if necessary. Once you flash your G1, all your apps will be wiped clean, so now would be a good time to make a note of any software you’ll want to re-download and install once you’re up and running again.

The So Called ‘One-Click’ Root Method

Rooting your G1 has never been easier, but it’s certainly been harder. If you’ve been scared off in the past, you’re in luck – a relatively new app, called "Recovery Flasher," has turned what used to be a complicated process into a painless task so easy even your cell-phone toting grandmother would have little trouble getting the job done. And it works even if you’ve already installed Google’s Cupcake firmware, officially known as Android 1.5 (using the old method, you would first need to downgrade to a previous firmware).

Up until recently, Recovery Flasher was available through the Android Market, but Google has since pulled the app. Moreover, Google patched up the security exploit the app was using to root your phone, but there’s a newer version that works as of this writing. To install it, you’ll first need to configure your G1 to allow applications to run from outside the Android Market. Click the Menu button, then go to Settings, Applications, and check/enable Unknown Sources.

Next, open up your G1’s browser and type in http://zenthought.org/system/files/asset/2/flashrec-1.1.1-20090908.apk, which should automatically download the Recovery Flasher package. If not,, navigate to http://zenthought.org/content/project/flashrec and manually click on the download link.

Once you’ve downloaded Recovery Flasher, install the app and open it up. You should now see the above screenshot. Tap on ‘Backup Recovery Image,’ then tap ‘Download Recovery Image.’ Once it’s finished downloading, tap ‘Flash Recovery Image.’

Congratulations, you’ve just rooted your phone!

The Complicated Root Method

Should Google find a way to block the above method from working, you can still root your G1, it’s just going to take a few more steps and a lot more patience. And if you already have Cupcake (firmware 1.5) installed, you’ll first need to downgrade to a previous build. Here’s how to do that.

Downgrade Your Firmware

  1. Connect your G1 to your PC, mount the SD card, then right-click the removable drive under My Computer. Format the card using FAT32 as the file system. Alternately, you can plug your SD card into your PC’s media card reader and format it that way.
  2. Download the HTC Dream RC29 image file from here. Unzip the file you just downloaded and copy the DREAMING.nbh file over to your SD card. Note that this is for G1 phones purchased in the U.S.; if you live in the U.K., follow the same steps, but use this RC7 image file instead.

  3. Turn your phone off and make sure the SD card is inserted into the G1. Turn the G1 back on, but do so by holding down the Camera button found on the unit’s side and press the Power button.
  4. You should now be entering the G1’s bootloader mode. At first you’ll see a rainbow of colors. Keep holding the Camera button down until the screen turns a grayish-white. Now just follow the on-screen instructions to flash your G1.
  5. Reboot by pressing Talk+Menu+Power.

Root Your Phone

  1. Now that you’ve gone back to a pre-Cupcake state, you’re ready to root your G1 and shed the shackles of the stock firmware, but first we need to install a special boot menu with advanced options. Start by again connecting your G1 to your PC and mounting the SD card, then download CyanongenMod’s Recovery Image found here and copy it over.
  2. Fire up the Android Market app, search for Terminal Emulator, then download and install.
  3. Next, search for Telnet, then download and install.
  4. This next step is pretty tricky, so make sure you follow along closely. Power down your phone, then turn it back on. Once it finishes loading, slide out the keyboard and tap anywhere on the main screen. Make sure no icons or menus are highlighted, then hit the return key. Wait for a second, then hit return again. Nothing should happen, which is a good thing. Next, type telnetd and hit return. As you do this, it will bring up your Contacts menu, but don’t be alarmed, this is normal. Finally, hit the home key, then fire up the Telnet application you downloaded in step 5.
  5. In the Telnet application, tap Connect to Server. This should bring up a black screen with a bunch of symbols. Now type the following bolded entries, making note of spaces:
    • mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system (makes the system folder writable)
    • cd sdcard (changes the directory to your SD card)
    • flash_image recovery cm-recovery- 1.4.img (flashes and replaces the G1’s stock recovery image with one that contains more end-user options)
    • cat cm- recovery-1.4.img > /system/recovery.img (copies the cm-recovery image file to the system directory)

Congratulations, you’ve just rooted your phone! You’re almost ready to install third-party ROMs, but first, we need to update the G1’s Second Program Loader (SPL) and Radio. The SPL works as part of the G1’s bootloader and performs a variety of tasks, including manipulating data in the handset’s internal memory. But most importantly, the SPL makes it possible to flash certain third-party ROMs and apply other hacks. And the Radio controls the G1’s WiFi, 3G, Bluetooth, and other communication protocols.

WARNING! – Follow these steps in order. You could potentially brick your phone by updating the SPL before the Radio.


Update the Radio

  1. Download the latest Radio from here (62.50S.20.17H_2.22.19.26I), then copy the ZIP file over to your SD card and rename it update.zip.

  2. Power down your phone and wait for it to turn completely off.
  3. Hold the Home key and press the Power button to boot into the Recovery Mode you installed earlier.
  4. Use the scroll wheel to select [Alt+S] apply sdcard:update.zip, or slide out the keyboard and press Alt+S.
  5. When prompted, press Home+Back to complete the process.
  6. Press Home+Back again to reboot your phone.
  7. You can verify that the Radio installed correctly by pressing the Menu button, select Settings, and tap About Phone. Scroll down to Baseband version and note the numbers being displayed. If you followed these steps correctly, the second half should read 2.22.19.26I.

Update the SPL

There are two popular SPLs you can choose from. The first is Hard SPL (available here), which will allow you to install just about any ROM out there. The second is Haykuro’s SPL (1.33.2005, available here), which you’ll need if you plan to install certain Hero-based ROMs. Haykuro’s would seem the obvious choice, then, until you realize that installing it on an incompatible mainboard will likely brick your G1.

To check your mainboard version, plug your G1 into your PC, mount the SD card, and delete DREAIMG.nbh. Detach and power down your G1. Hold down the Camera button and press Power. In just a few seconds, you should see a multi-colored screen. On the top-left corner is where you’ll find what version mainboard your G1 uses. If it says DVT, you’ll need to use Hard SPL or there’s a good chance you’ll destroy your phone. If it says PVT, you can safely install Haykuro’s SPL, but if you want to play it safe, stick with Hard SPL anyway.

Hard SPL Update

  1. Download Hard SPL from the link above. Copy the ZIP file over to your SD card and rename it update.zip (overwrite or delete the existing update.zip that’s already on there from when you installed the Radio).
  2. Disconnect the G1 from your PC and power down your phone.
  3. Hold the Home key and press the Power button to boot into Recovery Mode.
  4. Use the scroll wheel to select [Alt+W] wipe data/factory reset, or slide out the keyboard and press Alt+W.
  5. Use the scroll wheel to select [Alt+S] apply sdcard:update.zip, or slide out the keyboard and press Alt+S.
  6. When prompted, press Home+Back to complete the process.
  7. Press Home+Back again to reboot your phone.

Haykuro SPL Update

  1. Download Haykuro’s SPL from the link above and copy the ZIP file over to your SD card.
  2. Haykuro’s SPL update also requires that you flash a third-party ROM before your phone will boot. Any ROM should work, but for this example, download one of CyanogenMod’s ROMs from here (we recommend the latest stable release, update-cm-4.0.4-signed.zip). Copy the file over to your SD card and rename it update.zip (overwrite or delete the existing update.zip that’s already on there from when you installed the Radio).
  3. Disconnect the G1 from your PC and power down your phone.
  4. Hold the Home key and press the Power button to boot into Recovery Mode.
  5. Use the scroll wheel to select [Alt+W] wipe data/factory reset, or slide out the keyboard and press Alt+W.
  6. Use the scroll wheel to select [Alt+A] apply any zip from sd, or slide out the keyboard and press Alt+A. Select SDCARD:spl-signed.zip (this will install Haykuro’s SPL).
  7. When prompted, press Home+Back to complete the process. You should now be back in the Recovery Console.
  8. Use the scroll wheel to select [Alt+S] apply sdcard:update.zip, or slide out the keyboard and press Alt+S. This will install the ROM you downloaded above.
  9. When prompted, press Home+Back to reboot.

Installing a ROM

Now that you’ve rooted your G1, it’s time for the fun part. There are tons of third-party ROMs to choose from, and luckily they all install the same way.

  1. First, figure out which ROM you want to install and download it. For this example, we’re going to use CyanogenMod 4.0.4. Download the ROM file (in ZIP format) here.
  2. Connect the G1 to your PC, mount the SD card, and copy the downloaded ZIP to your SD card. Rename the file update.zip.
  3. Disconnect your G1 from your PC and power down the phone. Next, hold down the Home key and press the Power button to enter Recovery mode.
  4. Use the G1’s scroll wheel to select [Alt+W] wipe data/factory reset, or slide out the keyboard and press Alt+W.
  5. Now you’re ready to flash your new ROM. Use the scroll wheel to select [Alt+S] apply sdcard:update.zip, or slide out the keyboard and press Alt+S.
  6. Once the new ROM has been flashed, select or press Home+Back to reboot your phone and enjoy your new modified OS!

Note that it can take several minutes to boot your phone following the installation of a third-party ROM. Don’t worry, this is normal for just about every ROM out there, and subsequent boots should load normally.

Partition Your SD Card

Now that you’ve rooted your G1 and installed a ROM, the next order of business is to partition your SD card. This is necessary to install certain applications, such as WiFi tethering and other handy utilities. The process can be surprisingly overwhelming, but XDA forum member 51dusty has written a script that does most of the dirty so you don’t have to. Here’s what you need to do:

  1. Download sdparted.txt from here and transfer it over to your SD card.
  2. Power down your G1, then hold the Home key while pressing the Power button. This will put you into Recovery Mode.
  3. Use your scroll wheel to select [Alt+X] go to console, or slide out the keyboard and press Alt+X.
  4. Press enter when prompted. You should now see / #
  5. Type mount /sdcard and press enter.
  6. Type mv /sdcard/sdparted.txt /sbin/sdparted and press enter.
  7. Type chmod 755 /sbin/sdparted and press enter.
  8. Type sdparted -efs ext4 and follow the prompts. When asked if you want to continue, hold down the up arrow and press Y. This is case sensitive, so if you type a lowercase y, it will abort the script.
  9. When the script finishes running, type reboot and hit enter to reboot your phone.

And that’s it! Whether you took the easy route and and rooted your G1 through a few simple clicks or opted to get down and dirty with the more complicated method, you’re now ready to start experimenting with different third party ROMs. To give you a head start, we took a few of the more popular ROMs out for a spin, each one representing a different approach to Android. Here are our impressions of each.

JACxHEROSkiv v2.1

If you’re aiming for a fresh look altogether, this custom ROM seemingly transforms your G1 into an HTC Hero phone, which isn’t too surprising considering it’s based on the latest Hero build.

From a usability standpoint, JACxHEROSkiv is to Android what Flock is to web browsers. That is to say its strength lies in the heavy emphasis it puts into social networking. During setup, you’re prompted to enter login info for Twitter, Flickr, Plurk, and Facebook, and you’ll have easy access to each one.

JACxHEROSkiv comes with a boatload of widgets to choose from, and we especially like the Twitter app. The Twitter widget takes up a sizable portion of the screen, but offers up scrollable updates and a text box to update your own Twitter status.

Other notable features include a comfortably- sized on-screen keyboard and some advanced camera controls (ISO, zoom, etc.), but all this functionality comes at the expense of performance. Navigating ranges from irritatingly poky to sometimes snappy, but never 100 percent consistent. If future versions manage to iron out the bugs, this could be a real winner, but as it stands, only social networking nuts and those with Hero-envy need apply.

Download


xROM v1.5r4 by JAC/Manup456

Image Credit: XDA-Developers forum justanothercrowd

One of the snazzier-looking ROMs currently making the rounds is xROM. Sporting a metallic black theme, xROM kicks the aesthetics up several notches, but it’s not all about eye-candy. This third-party firmware addresses one of the G1’s biggest shortcomings by adding multi-touch support, which, among other things, allows you to zoom in and out of web pages by pinching the screen.

xROM also borrows some features from Google’s upcoming Android 2.0 update codenamed Donut, such as a power widget and battery usage meter. When pressing the Menu button to wake the phone out of sleep mode, you’ll see a toolbar at the bottom giving you access to a small handful of functions without fully unlocking the phone. For the most part, toolbar support is still being developed, but you can mash the battery icon so that the next time you wake the phone, you’ll be greeted by a large battery icon displaying how much power is remaining.

Some advanced options include the ability to create submenus in the All Programs list, set the number of side-scrollable home screens from 2 to 10, and create and restore configuration backups.

We also have to give props to xROM for its overall stability and speed. Many third party ROMs suffer from fairly frequent ‘Force Close’ errors, but that wasn’t the case with xROM. It also felt faster than Android 1.5 in everything from browsing on non-3G `networks to navigating menus. If we had to pick just one third-party to permanently replace Cupcake, this would be the one.

Download

CyanogenMod 4.1.8

Arguably the most popular third-party mod out there, CyanogenMod keeps it conservative when it comes to UI enhancements and instead focuses most of its attention to the underlying code. This latest version is built around Android 1.6 and is currently classified as an ‘experimental’ build, which is another way of calling it a beta release. We typically don’t recommend beta software for day-to- day use, but we didn’t encounter too many instability issues with 4.1.8 installed. And the last stable release (4.0.4) is built around ‘old’ code (Android 1.5).

CyanongenMod also gives you more Home screens to play with — five to be exact –, but you can’t change this number like you can with xROM. You also can’t use the built-in camcorder, which has been a continual thorn throughout CyanongenMod’s development.

While we prefer xROM overall, users looking for mostly a standard replacement to the stock Android install will be happy with CyanogenMod. It’s faster, stable, and actively being worked on, which isn’t always the case with many third-party ROMs. Power users, on the other hand, will want to pass this one up.

Download

Further Reading and Resources

Android Clubhouse – developer hangout
AndroidSPIN ROM Database – ROMs
CyanogenMod – ROM developer
SDParted Script - automatically partition SD card for use with certain third-party apps
SPL and Radio – latest Haykuro SPL and Radio downloads
SPLs – includes Hard SPL and other downloads
XDA Developers Forum – ROM downloads and development community
ZenThough.org – Flash Recovery software (’One-Click’ root tool)

Free Mobile Phone - Click Here!
No comments yet.