Tuesday, May 25, 2010

Android 2.2 on Rooted Nexus With Stock ROM

I have a Nexus One and I rooted it to get Arabic to work, which it did but only for SMS. The letters were broken for other things.

To get an official ROM to work, it has to verify that your current system is indeed an official release and it is the exact previous update/release.

I had to restore back the original ERE27 files that I replaced to get Arabic to work:
  • DroidSansFallback.ttf: 4caeadd734f4be9973163bdf02ea6cf5 (md5sum)
  • libskiagl.so: 1b5cedd01b14838320956bea94b0fe97
  • libskia.so: cc692fb57efb199045c720de491cc3cf
  • libwebcore.so: c8b9931ec8771a720497d5197cd1a108
But that wasn't enough, because rooting the phone modifies the boot partition of the phone which is also checked by updates.

Guides on the Internet were all about using a custom recovery image, wiping user data and doing some other unnecessary things. All what is needed is to flash the original boot image again:
  • boot.img: 36a29d765387dd69cde89367def51dda
  • ERE27 stock ROM (2.1-update1): 90700607c04279716b505aa203e9c684
To flash the boot image, you need the Android SDK  to get the USB drivers for the phone working, but you should already know that since you already rooted the phone. Painfully long steps can be found here (Windows).

Files you'll need from Android ERE27 (2.1-update1):
  • Original / stock font & libs
  • Original / stock boot.img
  • Fastboot utility
  • The new Froyo update (Android 2.2) named as update.zip (put it on your sdcard) 
You can download the stock ERE27 font, libs, boot.img and fastboot from me here.

  1. Enable USB debugging on the phone: Menu -> Settings -> Applications -> Development -> USB debugging
  2. Turn off the phone and connect the USB cable
  3. Hold the trackball, press the power button
  4. Using fastboot, open a shell/command line and type: fastboot flash boot boot.img
    You should see something like this:
    sending 'boot' (2560 KB)... OKAY
    writing 'boot'... OKAY
  5. Then type: fastboot reboot-bootloader to reboot the phone into the bootloader screen
  6. To navigate use the volume up/down buttons & to select press the power button once
  7. Select BootLoader then Recovery
  8. The screen will go black for a while then you'll see a Droid with an exclamation mark. Press volume up & power at the same time
  9. In the new menu, use volume up/down to navigate then Trackball to select
  10. Select apply sdcard:update.zip
  11. Now it'll verify your system files and partitions then start patching then deploying new files
  12. The phone will reboot 3 times to unpack multiple updates
  13. Enjoy your new toy
The files that I've linked are hosted on my Google account. I've taken them from official releases. Feel free to compare the md5 hashes.

Enhancements that I noticed in Android 2.2:
  • Exchange calendars now sync
  • Trackball was flashing blue for Facebook updates & white for emails
  • The phone now can tether using USB or act as a wireless access point
  • Notifications have new funny icons
  • Flash 10.1 from Adobe (go to adobe's website then click on Get Flash Player)
  • Call log groups calls from a single contact (like in SMS)
  • In the market, you can enable application auto-update
  • In the market, there's a button to Update All apps
  • The on-screen menu button now has 2 more brothers: browser & phone, so you can delete the icons from the desk/screen
  • In GTalk, clicking menu gives you the signout option (no need to click more)
  • I noticed a Twitter app
  • Faster camera response on the display
  • More camera options: Focus, Exposure, Zoom, ...etc.
  • Arabic font builtin but it looks weird and the letters are broken (unconnected)
  • 170-250 MB free RAM rather than the previous 40-60MB free RAM!!!


MBH said...

Updated post with free RAM enhancements.

JiMMaR said...

am not sure about this , but as I remember, for sms you could get an app named "mirsal" from the market and it'd work as an sms program
shows arabic letters [connected] with no need for rooting [not sure about the rooting part]

MBH said...

It's not worth the trouble. The only thing I get in Arabic is ads.

If it's not built-in, I won't bother.

Anonymous said...

I follow your blog quite regularly and i wish to see more regular updates from you. I am demanding lol...

MBH said...

Hahaha! It's good to know that someone other than myself reads this blog :p

There are interesting things to write about, unfortunately most are products (rather than ideas or technologies), and I'm wanting to turn this blog into a product review board.

Anyway, here's something to chew on till the next post :>

Anonymous said...

Be it products..i think your reviews will be honest...please keep them coming...

firas1886 said...

Hello MBH

I met you recently at barcamp, so anyways after i spoke with you about nexus one, modded or unmodded roms, you suggested that the stock is always best which I kinda agree with. So here i am doin lots of research and I just wondered if maybe you posted something about it on ur blog and heavens be praised you did!

So here is my scenario: I had Cyanogen, I used the rom manager to download a stock image and now i get the updates, but when i try to apply them, its giving errors.
a lot or research later tells me that i have clockworkmod recovery at boot. Which somehow denies the new updates from applying bcoz its a threat to its existence (it takes out its root priviliges) yea who knew programs had survival instincts!

Anyways if i follow your guide over here, does it include the changing of the boot and all ?

MBH said...

Hello Firas,

What I had to do was restore the original files & re-flash the original boot partition. I didn't wipe the phone or any of that nonsense.

I have no idea how Cyanogen's ROM would be able to incorporate Google's official updates; it shouldn't be able to since the updates verify the partitions before deploying & they fail if they found inconsistencies.
Inconsistencies = the current build & system files have to match that of the previous build to the update.

firas1886 said...

No not through cyanogen, but in their application (rom manager) they give you the option to download a stock image rom, but the boot thingy (when you press Vol Down + Power, then go recovery, it says: Clockwork mod.

so the rom i have is stock 2.2 and i get the google updates, but i cant install them since the recovery menu is not the original one

MBH said...

Oh, that's because the boot partition is not the original. Once you flash the original boot partition, you'll lose the rooting.

firas1886 said...

yea i know i will be losing the root privliges and all

but for now, i just wanna go back to stock
I want it as stockable as stockingly possible

so how do i go back to the original boot ?

MBH said...

Firas, read the post again. You'll find the steps you need.

firas1886 said...

yea I know, its in there, I didnt make myself clear bcoz i was kinda busy. What am wondering is, I have a stock 2.2 Build:FRF91

I believe the only modified thing now is only the boot image.

is the boot image still the same between different roms ?

Can i just keep my rom and only update the boot image?

MBH said...

Oh yeah, I had the FRF51 or something newer and I used the original boot image.

The thing is, only the original rom has a boot image. All other updates contain system files only.

MBH said...

Well, system files & sometimes radio images, but not boot images.

firas1886 said...

ok i'll let you know how it goes tonight when I do the whole thingy with the boot image, if you see lightning and seconds later u hear someone shouting "ITS ALIIIIVE ALLLIIIIIIIIIVEEEE"

that wouldn't be me

firas1886 said...

I flashed the boot and it worked, but it was very buggy and the system was fc-ing. I did another boot and then i did the install update.zip, as i pressed it remembered that: its still the cyanogen and i didnt get the stock rom on it!.

Anyways, I am now downloading the stock rom, and gonna couple it with ur stuff and hopefully it should work out :D

my poor nexus did nothing to deserve this :'(