Nexus One

From Doowon Kim

Jump to: navigation, search

Contents

C programming

Hacking

cyanogen & kernel build

unlock bootloader & rooting

Step 1: Unlock your bootloader
In order to flash a new recovery image, you must unlock your bootloader. This process is quite simple, but it will wipe your phone.

Reboot phone into fastboot: Power off device and hold down trackball while powering back on. (The fastboot screen is the one with the Androids on skateboards)
Open a command prompt and navigate to your Android SDK tools folder.
Type ‘fastboot devices‘ to make sure your phone is recognized.
Type ‘fastboot oem unlock‘ to unlock the bootloader.
Use volume keys to navigate to yes and press the power button to confirm.

Step 2: Flash a new recovery image
Next we will download a new recovery image that allows us to flash custom zip packages.

Visit XDA and download Amon_RA’s recovery image for the Nexus One.
Copy the file to your Android SDK tools folder.
Open a command prompt and navigate to your Android SDK tools folder.
Type ‘fastboot flash recovery recovery-RA-nexus-v1.5.3.img‘. (Note filename will change as recovery image is updated)


Step 3: Boot into recovery mode and flash N1 Addon
Now that the new recovery image is installed, it is time to reboot into recovery mode and flash a custom zip package. Since your phone was just wiped, you might have to enable usb debugging again so ADB and fastboot commands will work.

Double check: Go to Settings > Application settings > Development > USB debugging (enable)

For this guide we will be flashing Cyanogen’s N1 Addon.

Visit XDA and download Cyanogen’s N1 Addon. (or any other custom .zip file you want to flash)
Copy the .zip file to the root directory of your SD card.
Open a command prompt and navigate to your Android SDK tools folder.
Type ‘adb reboot recovery‘ to reboot the phone into recovery mode. (The recovery screen says “Android system recovery” with green text on black background)
Use the trackball to navigate to “Flash zip from sdcard” and then select the zip file you wish to flash.
Follow the on screen instructions. Press the trackball to begin the flash when prompted.
When the flash is complete, navigate to reboot and press the trackball to reboot.
Congratulations, you are finished and it is now time to download some root apps from the Android Market. Search the Market for SetCPU for Root Users, Nexus One Torch, or use the term “Nexus root” and see what you find.

Problems?
If you run into any serious problems please visit our forums and we will do our best to help. The XDA Nexus One forums are also a great resource.

Please share any other Nexus One hacks and root apps in the comments and we will add them to this post.

Basic

USB

Hardware
Nexus One
Micro USB OTG cable (e.g.)
USB Dual Power Cable (e.g.) to provide power to the hub chip through the uplink port, since the Nexus One doesn’t provide bus power (yet)
Powered USB 2.0 hub (will charge the Nexus One) (e.g.) and optionally a battery pack for mobile use (e.g.) (some power calculations)
Software
Android 2.2 Froyo (2.1 may work, too)
ConnectBot
Download binaries…
boot.img or zImage
Modules
…or build a Nexus One kernel from source
# Fetch msm kernel tree
git clone git://android.git.kernel.org/kernel/msm.git
cd msm
# Switch to Nexus One 2.2 Froyo
git checkout origin/android-msm-2.6.32
# Get config
wget http://sven.killig.de/android/N1/2.2/usb_host/.config
# Patch (No device mode, Andrew de Quincey’s work not ported yet.)
wget http://sven.killig.de/android/N1/2.2/usb_host/android-kernel_msm-v2.6.30-rc2-27223-g248970b_Nexus-One_usb-host.patch
patch -p1 < android-kernel_msm-v2.6.30-rc2-27223-g248970b_Nexus-One_usb-host.patch
# Build
make -j2 ARCH=arm CROSS_COMPILE=/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/arm-eabi-
Install kernel
# Boot from RAM (till next reset)…
fastboot boot arch/arm/boot/zImage
# …or write to flash (boot.img from a nandroid backup)
/getramdisk.py boot.img
/mydroid/out/host/linux-x86/bin/mkbootimg --kernel arch/arm/boot/zImage --ramdisk ramdisk.img --base 0x20000000 -o boot_usb-host.img
fastboot flash boot boot_usb-host.img
Start ConnectBot and connect to Local
su
insmod drivers/usb/core/usbcore.ko
insmod drivers/usb/host/ehci-hcd.ko
insmod drivers/hid/usbhid/usbhid.ko
insmod drivers/usb/storage/usb-storage.ko
# Wait for usb-storage to enumerate partitions
mount /dev/block/sda1 /sdcard/usbstick
To use adb over WLAN
adb connect IPAddress:5555
Related posts:

Jokes MA Only by Jay Mohr Host of the Interactive Achievement Award Show Jay Mohr hosted the Interactive Achievement Awards show and the...
Nexus One Scores A Hat Trick Of Fail First, there was Google Wave, which was ushered in with...
Most Current Android Cell Phones Will Not Have Flash….Ever   Gizmodo recently posted an article about the upcoming Flash 10.1 (currently...
Adobe Flash 10.1 for Android 2.1 First Half of 2010 Adobe is pressing forward with Flash 10.1 for Android...
Android 2.2 Overview- Google Brings the Smackdown The Android 2.2 platform introduces many new and exciting features...


Android Apps

Personal tools