HTC Nexus One/Flashing Guide
- 1 Introduction
- 2 ADB For Beginners
- 3 ADB/Fastboot/Bootloader
- 4 A2SD, Apps2SD, Apps2EXT, partitioning SD card
- 5 Unroot / Restore your Nexus
- 6 HBOOT
- 7 S-ON and S-OFF
- 8 Resize the partitions
- 9 Root
- 10 Flashing custom ROM
- 11 Manuals for creating a theme
- 12 Updating boot animation
- 13 System Applications - descriptions and removal
So you've decided to gain more control over your phone. Congratulations! You're about to experience hours of fun tinkering with your device--and many more hours of frustration trying to fix some gorram thing that was just working five minutes ago! As always, any of the following actions could brick your phone so it's best to understand the process as best as you can. Almost all these actions void warranties--if you still have one with your Nexus One. Try googling multiple how-to guides (with screenshots and pictures if possible) before before you do anything, search on youtube for how to videos, make proper backups and potentially understand how to reverse any intended and unintended changes you just made.
Protip: when googling, try putting "site:xda-developers.com" before your search term to search just xda-developers.com. Very handy sometimes! You can also limit your search to "Discussions" and thus search only forums. Finally, you can also limit your searches to within the last year to make sure you get access to the latest information. Some older methods are now obsolete (e.g. installing a new recovery can just be done with ROM Manager now, or unlocking bootloader is not really needed anymore to accomplish most tasks).
In general there are different levels of access over your device. Each of the following steps can be performed multiple ways. In general, I've included the simplest/easiest method:
- Root your phone. Many people simply gain superuser or root access over your device and leave it at that. That's perfectly fine and it can be a scary step for a first-time phone hacker. Why you should root your phone...and maybe why not! With SuperOneClick, it is as easy to root and unroot your phone as a few clicks. This is generally a very low-risk process, though things can obviously still go wrong. For a Nexus One, this can take as little as 10 minutes for a first-timer working slowly. This is also a good time to get Titanium Backup orother backup program, give it root access and backup everything, as well as set up automatic backups.
- Stop getting "low space" messages. If you're getting constant low internal space messages, you have a few options
- Use Titanium Backup to Menu key>Batch>Integrate updates of system apps into ROM. Also try Menu key>Clean up the Dalvik cache...
- You can also use Move2SD Enabler which unlocks the "Move to SD Card" options for more apps.
- But these are all basically stop-gap solutions. The real way to get upto 1 gig (!) for apps is to create another partition on your SD card and trick your phone into storing your apps on there. You can even do this without destroying the data on your SD card, but that only works about half the time so it's a good idea to just copy everything off your SD card onto your computer just in case. You can go either the simpler Link2SD way which allows you to pick and choose which apps to put on the second partition, or the more complicated but somewhat better Mount2SD way (which requires you have a custom recovery first--which is the next step). Titanium Backup will automatically create backups of these apps, too. This step could be done in as little as 10 minutes by a first-timer working slowly. Make sure you copy everything off your SD card first! You can just stop at this step if you're happy with your stock ROM with all the extra space.
- Install an alternate recovery. An alternate recovery allows you to create full backup images of your phone (except SD card) so you can reset your phone exactly as you had it that day (including SMSs) and flash custom/alternate ROMs. This step has gotten obscenely easy now with ROM Manager. Download it, open it up and select the "Flash ClockworkMod Recovery" option. The phone will reboot and do that. Then load up ROM Manager again and click on Backup Current ROM. Now you have a perfect backup image of your system in case anything goes wrong. Google how to restore an image to understand the process. You can just stop here if you're happy having a backup of everything.
- (Maybe) Control your CPU by swapping out your kernal. You may wish to increase battery life and performance by doing this.
- (Maybe) repartition the internal memory (Blackrose/HBOOT) to flash an alternate ROM. You have two options here. But before either, make sure you have created a nandroid backup using the previous step, titanium backups of your apps and probably a backup of your SD card. Either your chosen ROM will fit on the standard partitions on your phone, or it won't.
- ROMs that fit. Look at the ROM's description for words like "needs Blackrose" or "custom HBOOT". If they're not there, or say you just need the stock ones, you're ok. The ROMs available in the premium version of ROM Manager all fit. In which case you're good to go the next step.
- ROMs that don't fit. Most of the interesting ROMs these days are no longer based on Gingerbread (2.3) and the newest Android OSes need more space than is allocated to them by default in your Nexus One. To get Jellybean(4.1)/Ice Cream Sandwich (4.0) or higher-based ROMs, you need Blackrose. And I have no idea how it works...so hopefully someone else will chip in... Note: To restore a nandroid backup, the partition scheme has to match the backup's partition scheme. So, for example, to go back to your stock ROM before you started any of this tomfoolery, you have to uninstall blackrose.
- Flash ROM. If you didn't repartition, download your ROM file onto your SD card and install it using ROM Manger. If you did repartition, you have no OS! I'm a bit out of my depth here hopefully someone else with share their wisdom.
- (Maybe) install GApps (Gmail, Play Store, etc.). Most ROMs no longer come with Google Apps built-in due to legal issues. You can locate them easily, however. They usually come as an update.zip so you can use ROM Manager to select them as you would a ROM and install them.
This is the most up-to-date information as of Nov 22, 2012.
ADB For Beginners
A2SD, Apps2SD, Apps2EXT, partitioning SD card
Unroot / Restore your Nexus
- Using fastboot:
- Using PASSIMG.ZIP method (adapted from here) ("Main version is older" error fix from here):
- Attention: Latest stock ROMs don't flash using PASSIMG.ZIP method. Use the provided latest Froyo PASSIMG, and upgrade it after flashing.
- Download FRG83 ROM from here. FRG33 ROM from here can also be used, but might result in "Main version is older" error.
- Rename the downloaded ZIP file to PASSIMG.ZIP.
- Transfer the provided PASSIMG.ZIP file to the root of your SD card.
- Power down your phone.
- Hold down the Volume Down button as you power your phone back on.
- A screen should appear showing your phone’s system searching for various files. This will take up to 2 minutes.
- The phone will ask you if you want to start the update. Press the Volume Up button to start the update.
- If you followed these steps correctly - congratulations, you are now on stock Froyo ROM.
- Legacy information - irrelevant to the guide above - USE ONLY IF YOU KNOW WHAT YOU'RE DOING AND WHY YOU'RE DOING IT:
HBOOT is the Nexus One bootloader. It is the first "program" which is started when the phone is switched ON.
The last official is 0.35.0017.
Why changing the HBOOT ?
- Some ROM needs another HBOOT with additionnal features
- You can resize partitions if you install a bundle like BlackRose
How to change HBOOT ?
- See page
S-ON and S-OFF
S-ON / S-OFF mean Security ON / Security Off.
With security OFF, you can do some changes as resizing partitions
How to switch S-ON / S-OFF ?
- To be completed
Resize the partitions
The initial partitions are (reminder / the Nexus One has 512 Mo of flash) :
- System = 145 mb
- Cache = 95 mb
- Data = 196 mb
Some ROM needs more space in System :
- KitKat ROMs needs system between 220 to 250 and a good compromize is cache between 10 and 16 MB
- This page gives some ROM needs
To resize the partition you need to be in S-OFF.
BlackRose tool gives :
- S-OFF feature
- Another HBOOT with aditionnal features
- A tool to resize partition
- Initial conditions :
- Android is launched (don,t be in fastboot or recovery)
- Your phone and your computer are linked with an USB cable
- Your phone is on developer / ADB mode
- Download the file from here and unzip it on computer (Linux or Windows)
- Run the .exe from Windows or give executable right on linux and launch BlackRose in console : ./BlackRose
How to resize ?
- Launch blackRose with editor parameter in a console. Eg in Linux : ./BlackRose editor
- Enter resize key word
- Enter the system size in MB
- Enter the cache size in MB
- Enter a name for the partition
You can look at this YouTube video
The Nexus One's stock bootloader has a built in feature to allow the user to easily unlock and root the device.
- Root with unlocking the bootloader. In order to Unlock the Nexus One's bootloader, the user must first boot into fastboot mode by holding down the trackball while powering on the device. Next, the user must connect the phone to their PC, and send the command "fastboot oem unlock" through an ADB Command Prompt. The Nexus One will ask if you want to unlock your bootloader, and warn you that doing so will VOID you warranty. Upon Unlocking the bootloader, the Nexus One will reset itself to factory settings and wipe all data previously saved on the phone.
- The above didn't work for me on a stock 2.3.6
- Root without unlocking the bootloader. XDA developers found ways to root the phone without unlocking the bootloader, i.e. without voiding the warranty.
- Easy 1-click solution - SuperOneClick
- Works up to Gingerbread 2.3.3 using the latest SuperOneClick with Gingerbreak.
- Gingerbread 2.3.4 can be rooted only when downgraded to 2.3.3 or to Froyo, using PASSIMG method, which will wipe the phone. You can attempt this guide.
- Solutions for Froyo:
- Older solutions, not working with latest OS versions, mentioned here for historical and educational reasons:
- Download VISIONary+.
- Download Z4Root.
- Root FRF91/FRF85B/FRF83/FRF72 (T-Mo/AT&T) Without Unlocking by Constrabus
- Root Without Unlocking (Alternative way for all ROMs Vodafone,Korean,US - not working on FRG33/FRG83) by dolomiti7
- 1-click root application - UniversalAndRoot - not working on FRG33/FRG83
- Easy 1-click solution - SuperOneClick
If you rooted without unlocking the bootloader, such as through SuperOneClick, unrooting is as simple as clicking the unroot button.
Flashing custom ROM
Generally, each custom ROM thread contains directions for installation, but sometimes they might confuse complete newcomers that don't take their time to search the guides. Here's a very generic explanation of steps needed to update a stock phone to custom ROM:
- Download the ROM of your choice.
- Copy the downloaded ROM image to the SD card
- Root if you don't want to unlock bootloader (or just unlock bootloader).
- Flash custom recovery image (if not done while rooting)
- Turn off the phone
- Turn on the phone while holding Volume Down
- Select "BOOTLOADER" from the menu
- Select "RECOVERY" from the menu
- Select "Wipe"
- Select "Wipe data / factory reset"
- Select "Wipe Dalvik cache"
- Return to main recovery menu
- Select "Flash update.zip" or "Flash ZIP file"
- Turn off verification, if such option is presented
- Select your downloaded ROM image
- Wait for the flash to finish successfully, if it didn't - do not continue!
- Return to main recovery menu
- Reboot the phone
- You can follow a video walkthrough for this here: How to Flash a Custom ROM
Manuals for creating a theme
Updating boot animation
- Download the ZIP of the boot animation you would like to apply to your phone.
- Rename that file to bootanimation.zip
- Open up a command prompt, and head into your local tools folder (the line below is just an example):
- Now, enter the following commands, one line at a time.
adb remount adb mv adb push bootanimation.zip /system/media/bootanimation.zip adb push bootanimation.zip /data/local/bootanimation.zip adb reboot
- Now when your phone begins to reboot, it should be using the new boot animation you just applied to your phone. Note that if this does not work on your phone, please use the following commands to remove the boot animation:
cd C:\Android\tools adb remount adb shell rm /system/media/bootanimation.zip adb reboot
- Note: another possible location is /system/customize/resource/bootanimation.zip