I’m using the following tools:
First step is to install the sdk, I’ve installed it in ~/bin/android-sdk
and I have added the tools folder to my PATH.
I’ve copied fastboot, recovery.img, su and superuser to the tools folder.
Shut the phone down and turn it on by pressing both the powerbutton and the back button.
The phone booted a fastboot bootscreen and I plugged in the usb-cable and ran:
(should return you phones productcode if everything is working)
fastboot boot <path-to>/cm-hero-recovery.img
This boots the the phone with the recoveryimage, I used this oppetunity to make a backup by choosing nandroid backup.
It makes a snapshot of the filesystem on the sdCard and can be used like this to recover your phones original software:
fastboot flash boot <path-to>/boot.img
fastboot flash system <path-to>/system.img
fastboot flash userdata <path-to>/data.img
The above steps are “just” prep. Now to actally root the bastard 😉
The adb-tool sends commands and files to the phone, I did this:
adb shell mount /system
adb push su /system/bin/
adb shell chmod 4755 /system/bin/su
adb push Superuser.apk /system/app/
adb shell reboot
….waiting for the phone to boot
Then I do:
(to make sure the phone is talking with my computer)
(Click Always allow on the phone)
All the above keyboardgymnastics was to get paid apps in Market, this will help me do just that: