Post Reply

[Guide] The 100% Fool Proof Guide: STOCK N1 to ROOT to SENSE UI/CM (Android 2.1)!

OP Paul22000

22nd February 2010, 05:00 AM   |  #1  
Paul22000's Avatar
OP Senior Member
Thanks Meter: 139
 
3,473 posts
Join Date:Joined: Jan 2008
Donate to Me
[Edit] 2/05/2011: Use this new guide instead: http://forum.xda-developers.com/show...4#post11087674


[Edit] 1/13/2011: If you are on stock 2.2.1 FRG83D, click here to for SuperOneClick Root !
















*

So I recently decided to take my 100% stock Nexus One to Sense UI and I've documented every single step of the way. I've written this guide for two reasons. First, this entire process is scattered around in dozens of threads, written by equally as many people. Not only that, but most people in these threads assume that you know by heart exactly what adb, fastboot, recovery, and others are all about. Second, to put it bluntly, most people are pretty terrible at writing documentation. Writing down what you did so other people can follow seems extremely difficult for many people. Luckily, this is a skill I am good at. So here is a full consolidation of all the information, re-writtern for clarity as I went along step-by-step, from my many hours of attempting to bring my Nexus One from 100% stock to Desire's Sense UI. (Edit: Some people have said they'd run through this guide in 20 minutes!! It might look like a lot, but a lot of steps take a few seconds.)

Disclaimer:
You agree that by doing this process, I'm not responsible for any bricked devices.
Unlocking the bootloader will void your warranty.
This process will erase all of your phone's data.

Please don't copy/paste this elsewhere (to prevent having outdated info); just link back.
If you need immediate help, these guys might be able to help -> http://webchat.freenode.net -> Channel "modaco".
And this guide is written as if you are using Windows XP.
*(Yes, the above image of Google's campus is totally unrelated, but totally cool!)




Note: the notifications tray is personally modified

-------------------------
  • Backup [Optional]
    1. On PC: www.gmail.com -> Contacts -> Export, choose Google CSV
    2. On N1: Market -> AppMonster (or any other Backup application you prefer) -> Backup all apps
    3. (If you want/need to backup sms etc, I don't know what non-root app does this)
    4. Remove any authenticators etc



  1. Downloads
    1. Download nexus-addon-0.1-signed.zip, (From thread: CyanogenMod-5)
    2. Download Desire Sense UI OR CyanogenMod:
      Sense UI:
      1. Download the latest version here: MoDaCo Custom ROM Desire Port (Choose with MoDaCo Additions, without A2SD)
      2. Alternate download location (mirror) for r21: alpha-r21-update-modacocustomrom-nexusone-desire-withadditions-sig.zip
      Cyanogen Mod:
      1. CyanogenMod
      2. Download the "Google Addon" as well
    3. Don't download any "radio" updates unless you know what you're doing! (I would highly advise against it!)
    4. Place both zip files (3 for Cyanogen) on N1's sdcard (don't unzip)




  2. Setup SDK
    1. Download android-sdk_r06-windows.zip
    2. Unzip to C:\ drive so it looks like C:\android-sdk-windows\
    3. Run SDK Setup.exe
    4. Double click everything so it has a red X except for green check mark next to "USB Driver Package"


      (Click for larger image)

    5. Install
    6. On N1: Settings -> Application -> Development -> enable USB debugging



    7. Connect phone to PC, do not mount
    8. New Hardware Found -> Point the install location to C:\android-sdk-windows\usb_driver\


      (Click for larger image)

    9. PC: Start -> Run -> cmd -> press Enter. A black window should appear.
    10. Type: cd C:\android-sdk-windows\tools
    11. Press Enter
    12. Type: adb devices
    13. Press Enter


      (Click for larger image)

      - It should say something similar to "HT123P123456 device" (this is your phone's serial number).
      - If it says "cannot find" or "invalid path" etc, make sure you're typing *exactly* what the green text above says.
      - If it says something else, try to reinstall the USB Driver package and restart your PC.
      - If it still doesn't work, reply to this thread and say "adb devices does not work. When I type 'adb devices', it says _______________. My PC is running _______________." [Choose one: Windows XP | Windows Vista | Windows 7 | Mac | Linux]

    14. If it works, your PC is correctly recognzing the phone. Continue on to the next step!




  3. Unlock Bootloader
    1. Turn phone off -> Hold Trackball, then hold Power until white bootloader screen shows up:


      (Click for larger image)

    2. FASTBOOT should be highlighted. Press the Power Button to go into Fastboot.
    3. PC: Start -> Run -> cmd -> press Enter. A black window should appear.
    4. Type: cd C:\android-sdk-windows\tools
    5. Type: fastboot devices

      - Note: Mac users need "fastboot-mac", available here: http://developer.htc.com/adp.html


      (Click for larger image)

      - It should say something similar to "HT123P123456 fastboot" (this is your phone's serial number). If it doesn't say this, something is wrong. Make sure you pressed the Power Button to go into FASTBOOT.
      - If you are typing fastboot devices and it just returns a blank line or ???????? (ie Windows 7 64-bit users), try using USB drivers in the PdaNet install: http://www.junefabrics.com/android/download.php
      - If that doesn't work, try not pressing the Power button to enter Fastboot. A few people have had it work that way. (Or may have been holding the Power button for too long.)
      - If you can't get this step to work, reply to this thread and say "When my phone is in the bootloader and I type 'fastboot devices', it says __________ instead."

    6. Type: fastboot oem unlock
    7. Read what the screen says. (Decision time!) (All data will be wiped here)


      (Click for larger image)

    8. Your phone should reboot with a picture of an open padlock under the Google logo. If so, everything is good so far!


      (Click for larger image)





  4. Flash Recovery - (Update 09/01/2010: this may not work on SLCD Nexus Ones. Need an SLCD-supported recovery and then a ROM with SLCD support)
    1. Turn phone off -> Hold Trackball, then hold Power until white bootloader screen shows up
    2. FASTBOOT should be highlighted. Press the Power Button to go into Fastboot.
    3. PC: Download latest .img file - Amon_RA's Recovery Image
    4. Place img file into C:\android-sdk-windows\tools\
    5. PC: Start -> Run -> cmd -> press Enter. A black window should appear.
    6. Type: cd C:\android-sdk-windows\tools
    7. Type: fastboot devices

      It should say something similar to "HT123P123456 fastboot" (this is your phone's serial number). If it doesn't say this, something is wrong. Make sure you pressed the Power Button to go into FASTBOOT. If you can't get this step to work, reply to this thread and say "I'm trying to flash the recovery image. I unlocked my bootloader but fastboot devices doesn't work anymore. When I type 'fastboot devices', it says __________ instead."

    8. Type: fastboot flash recovery recovery-RA-nexus-v1.7.0.img (Note: the underlined part may be different depending on what you downloaded.) (Tip: On Windows XP, you can press tab to auto-complete the filename.)
    9. It should say: sending 'recovery' (3962 KB)... OKAY . . . . . writing 'recovery'... OKAY This should take a few seconds.


      (Click for larger image)

      If it doesn't work, try using Superboot (ignore this unless you're having issues flashing the Recovery):
      1. Modaco's Superboot -> "Before download, check your device 'about' screen to determine whether you need a superboot for 'ERD79' (the original shipping ROM, 'ERE27' (the official update) or ERE36B (the new leaked update)."
      2. Turn phone off -> Hold Trackball, then hold Power until white bootloader screen shows up
      3. Don't touch anything
      4. Open superboot file on PC
      5. Try to Flash Amon_RA's Recovery again
      6. If it still doesn't work, reply to this thread and say "When I tried to flash the recovery file, it said ________________ instead."

    10. If flashing the recovery was successful, use the menu options to boot directly into recovery, or turn the phone off and continue on with next step!




  5. Root
    1. Turn phone off -> Hold Volume Down, hold Power button
    2. Press Volume Down to highlight Recovery -> press Power to select Recovery. Your screen should look like this:


      (Click for larger image)

    3. Do this step only if you didn't use Superboot: Use trackball -> "Flash zip from from sdcard" -> nexus-addon-0.1-signed.zip

      - If you get a Triangle with a ! in the middle alongside an Android for 5+ minutes, you MAY have to remove battery and re-flash recovery (I had to do this once.) (Make absolutely sure that nothing is happening on your phone, as removing the battery when it's doing something can cause a brick.)
      - Alternatively, try the optional Superboot method, and then re-flash Amon_RA's recovery image.

    4. Select Reboot.




  6. Install ROM (Sense UI, Cyanogen, etc)
    1. Turn phone off -> Hold Volume Down, hold Power button
    2. Press Volume Down to highlight Recovery -> press Power to select Recovery
    3. Backup/Restore -> Nand backup
    4. Wipe -> Wipe data/factory reset
    5. Wipe -> Dalvik Cache
    6. Flash zip from sdcard -> alpha-r##-update-modacocustomrom-nexusone-desire-withadditions-signed.zip (Or whatever other ROM you're using.)
      - If you get an error such as "E:\Can't open /sdcard/[blah].zip (bad)", the file is probably corrupt. (Modaco has had some issues with this recently; I don't know why.)
      - If you want to make sure, use http://portableapps.com/node/19346 and drag the zip file onto it to verify the MD5 sum. For r21 with MoDaCo Additions, the MD5 should be: e5eb15ea971b220ffdfcac8f56037013


    7. If you're using Cyanogen, flash the Google Addon.
    8. Reboot

      - If a picture of an Android falling out of a box shows up, something went wrong. Just wait for it to reboot into recovery. (Good you made a backup! Just in case.)
      - Go back into recovery, Wipe all data again, Wipe Dalvik/cache again, and reflash the Sense ROM.
      - If it still doesn't work, reply to this thread and say "I keep getting the Android falling out of the box when flashing the Sense ROM, even after repeated wiping."

    9. If successful, a white HTC splash screen appears. It should take about 2-3 minutes to load into Sense.



    10. If it gets past that, congratulations! You made it!
    11. Post in this thread that it worked! And if you're feeling generous, feel free to send me a beer!
    12. And finally, enjoy and have fun!



      -->

--------------------------------------------------

  • Install a Different ROM
    1. If you want to install a new version of a ROM, switch to a different ROM like Cyanogen, etc, only repeat the "Install ROM" section. The only difference is you'll be downloading / flashing a different zip file of course.
    2. Make sure you backup (and wipe!) first before flashing any new roms!
    3. To go back to the original Android ROM, either Restore your backup, or download the zip file from the following thread and repeat the Install ROM section: http://forum.xda-developers.com/showthread.php?t=614850

  • Known Issues:
    1. Bluetooth is known to be buggy / will most likely not work. (Can't be fixed until HTC releases the Desire source code.)
    2. USB mount notification does not appear - use 'USB Mount' application from menu.
    3. To set live wallpapers, go into Settings -> Personalize.

--------------------------------------------------

What's the status on Bluetooth?

Quote:

http://android.modaco.com/content/go...status-update/

A status update!

I now have the release candidate of the Desire ROM!

The new ROM, which is MUCH newer than the build I have been using to date is faster and smoother, the Camera app is better synchronised with the flash, the Live Wallpapers selector is in the right place, the base is ERE27 rather than ERD79 and there are numerous little fixes all over the place! Of course, it will take a bit of time for me to do a full quality port over for the next MCR, but i've done a quick hack to flash it on and see what works.

That's the good news - the bad news is BlueTooth, Camera, USB connect popup and FM Radio still don't work correctly out of the box. BUT - I have discovered why.

Basically, it all comes down to the kernel.

I have confirmed that all of the above (i'm not 100% sure on BT, i'm still investigating that one) use specific features in the Desire kernel that aren't available in the generic kernel. HTC enhancements if you will. The Desire ships with a .29 kernel which, based on what i've seen in the apps and the setup of the config file, is pretty heavily customised. Unfortunately the Desire kernel doesn't boot on the Nexus One, so we're in a bit of a sticky situation until the Desire kernel source gets released, and it's unclear when that will be (HTC's track record in that regard isn't fantastic)!

All is not lost however, as I have started looking at a new approach to fixing the problems, as seen in the camera fix for Alpha 16. I'm basically hunting down the kernel specific hooks and - where possible - i'm rerouting those to an alternate location that I can control. Taking the camera app as an example, the libcamera.so file was checking kernel specific points before deciding whether the flash should fire or not. It was doing things like checking for a phone call, checking for a wimax connection (!), and when these checks didn't work properly, it was preventing the flash firing. By editing this library and rerouting those locations, I was able to make the flash fire - much better than just dropping in the 'wrong' library which was the previous solution. Similarly, the camera application itself was dropping back to 3 Megapixels by default because it was looking for a 'sensor resolution' file produced by the kernel, which didn't exist. By determining this as the cause and reverse engineering the Camera application, I was able to make 5 Megapixels the fallback resolution instead. Problem solved.

Hopefully a similar approach can be used for the other problems (FM radio, USB connection and Bluetooth) and we'll get everything 100% - believe me i'm working on it.

If we CAN get this working fully, the work i'm doing here - if I can get it 100% - will also enable Desire users to have newer kernels and custom kernels with all the goodness that brings, without being dependent on a HTC Kernel source release.

There's lots to do - starting with the RC port to use as a base - but it's been a fun ride and it's gonna get funner. Thanks for all your support!

P

Update:

http://twitter.com/buxit/status/13119161481



http://twitter.com/PaulOBrien/statuses/13119278256


Last edited by Paul22000; 7th February 2011 at 04:59 AM. Reason: Modified title to add "2.1"
The Following User Says Thank You to Paul22000 For This Useful Post: [ View ]
22nd February 2010, 06:58 AM   |  #2  
Paul22000's Avatar
OP Senior Member
Thanks Meter: 139
 
3,473 posts
Join Date:Joined: Jan 2008
Donate to Me
Reserved...
Last edited by Paul22000; 13th May 2010 at 05:59 AM.
22nd February 2010, 07:23 AM   |  #3  
Senior Member
Flag NW Indiana
Thanks Meter: 64
 
500 posts
Join Date:Joined: Feb 2010
More
Quick question..will CyanogenMod ever support the new Sense UI built in? I realize its in Alpha stages but when its actually stable enough/all features working.

Because from what I understand only the Modaco rom comes with it?
Last edited by ztmike; 22nd February 2010 at 07:25 AM.
22nd February 2010, 08:24 AM   |  #4  
Member
Thanks Meter: 1
 
36 posts
Join Date:Joined: Feb 2010
What do you mean by "rooting"
As I understand, after you unlock bootloader and have Amon_Ra recovery you should be able to install any custom rom including both Modaco and CM
btw, if you are newbie, u should try out CM, Modaco or Enom stable first. Modaco Sense is in alpha state and still has many problems

Good guide btw
22nd February 2010, 08:26 AM   |  #5  
Senior Member
Thanks Meter: 1
 
187 posts
Join Date:Joined: Aug 2008
Great guide! Just explain to me the recovery image though, I don't understand what that one does, since I haven't actually done anything yet. >.>
22nd February 2010, 08:37 AM   |  #6  
Member
Thanks Meter: 1
 
36 posts
Join Date:Joined: Feb 2010
Amon_Ra recovery is extremely helpful. It replaces the existing recovery and adds many features, including nandroid backup to back up and restore your phone in case you got screwed. It also applied zip custom roms from SD card(1 click) so you don't have to use command prompt -> more newbie friendly I guess.

btw, I don't think you need to flash Google apps in step E, correct me if I'm wrong though.

and take extra caution when flashing Radio, don't pull out the battery or do anything stupid because your phone might brick
22nd February 2010, 10:08 AM   |  #7  
Senior Member
Thanks Meter: 9
 
698 posts
Join Date:Joined: Dec 2009
Cheerio, very helpful guide. I'll bookmark it to link to people in the future.
22nd February 2010, 04:00 PM   |  #8  
Paul22000's Avatar
OP Senior Member
Thanks Meter: 139
 
3,473 posts
Join Date:Joined: Jan 2008
Donate to Me
"Quick question..will CyanogenMod ever support the new Sense UI built in?"

I doubt it. I don't think he did any Sense roms for the G1. But that's ok: Cyanogen if you prefer stock Android, Modaco if you prefer Sense UI. It's good to have options. And isn't that the greatness of Android?

---------------

"What do you mean by "rooting"?"

Rooting gives you superuser access. This is similar to using the Administrator account on Windows, but more so.

Quote:

From http://www.linfo.org/root.html - "root is the user name or account that by default has access to all commands and files on a Linux or other Unix-like operating system. It is also referred to as the root account, root user and the superuser."

From http://wiki.cyanogenmod.com/index.php/Main_Page - "In addition to locking the phone, carriers may impose software limitations to prevent using the handset in a manner that might undercut their voice plans - Skype, Google Voice, etc - or putting strain on the data network - tethering, streaming video, etc - The way round this is to acquire 'root' (administrator) access on your phone so you can install/modify/fix/break anything you want."

Many applications require root like Wifi Tethering, N1 Torch, and of course, installing some custom roms

---------------

"Great guide! Just explain to me the recovery image though, I don't understand what that one does, since I haven't actually done anything yet. >.>"

duylong186 had a good explanation. So I'll just post a picture



Having a Nand Backup/Restore is downright AMAZING by the way. It's the ULTIMATE undo button!

This is also good info, just to stress this point again:

Quote:

and take extra caution when flashing Radio, don't pull out the battery or do anything stupid because your phone might brick

Be careful everyone!
22nd February 2010, 05:24 PM   |  #9  
Junior Member
Thanks Meter: 0
 
7 posts
Join Date:Joined: Jan 2010
nice guide. i did everything except flash the radio. i would get the android out of the box error. everything is working fine here so far. anyways, i have all the google apps as well.
22nd February 2010, 05:59 PM   |  #10  
gtrplr71's Avatar
Senior Member
Flag Austin Tx.
Thanks Meter: 44
 
1,018 posts
Join Date:Joined: Jul 2009
More
sticky please! great work

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes