Android: Reverting Nexus One (N1) to stock image
Step 1. Disable backup my settings under privacy settings.
Step 2. unzip the original shipping ROM and put it somewhere you can find.
Step 3. Plug in Nexus One with USB to computer (enable usb and debug modes)
Step 4. adb reboot bootloader (which will boot into the bootloader)
Step 5. Confirm fastboot connection fastboot devices
Step 6*. fastboot erase userdata
Step 7*. fastboot erase cache
*If step 6 and 7 does not work, and if you have Amon_RA’s recovery installed, you can do a factory data wipe from there.
Alternately, you can also do a factory data wipe within Android. Settings => Privacy Settings => Factory Data Reset.
Thanks to Brian and setzer715.
Step 8. Go to the directory that you stored your unzipped files.
Step 9. fastboot flash userdata userdata.img
Step 10. fastboot flash boot boot.img
Step 11. fastboot flash system system.img
Step 12. Skip to step 13 if you want to keep recovery (assuming you have a modified recovery such as Amon_RA’s recovery). If not fastboot flash recovery recovery.img
Step 13. fastboot reboot
Step 14. After the system boots up and while setting up skip setting up with the google account and you can setup accounts later. This will prevent the phone from pulling down the previous settings (downloaded apps, wallpaper etc) from google.
Step 15. You are done. Enjoy.