This guide is adapted from here for the initial rooting and here for the app removal. If you follow this guide and break your phone I can’t help you. All the following actions should be taken with the knowledge that it is at your own risk and will void your warranty. For that matter Sprint may send an army of ninjas after you. Don’t say you weren’t warned….
This guide assumes a base install of Ubuntu 9.10 but should work for previous versions. If you know enough to have changed your download directory then you know enough to modify the following commands.
Prep:
- Download the Android SDK
- Download asroot2
- Download the recovery image
- Extract the SDK into your home directory
tar -xzvf ~/Downloads/android-sdk_r3-linux.tgz -C ~ - Copy the other two files into the newly created android-sdk directory
cp ~/Downloads/asroot2 ~/android-sdk-linux/
cp ~/Downloads/recovery-RA-heroc-v1.2.3.img ~/android-sdk-linux/ - Turn on USB debugging on your phone: Menu -> Settings -> Applications -> Development -> USB Debugging
- Connect your phone to your computer with a USB cable
Now in normal circumstances I would never recommend you “become” root as it’s generally not necessary but my attempts to root the phone did not work with sudo so for the next steps you will need to actually be the root user.
Rooting the phone:
- Become root
sudo su - - cd to your the directory created when you un-tarred the SDK
cd ~/android-sdk-linux/tools - Copy asroot2 to your phone, change the permissions to make it executable, execute asroot2
./adb push ../asroot2 /data/local/
./adb shell chmod 0755 /data/local/asroot2
./adb shell /data/local/asroot2 /system/bin/sh - Now we will use the access asroot2 has given up to create a su binary for root access
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4755 su
If all has gone well you should now have a root prompt “#” instead of “$”. If you don’t then ask over at the first link in this post for help. I didn’t do any of the development on this I am merely giving the steps that worked for me. Now it’s time to flash a new recovery image so we can take a backup of the phone before we start screwing around. These steps are from the android-sdk-linux/tools directory you were in before. If you already exited your android shell bring it back up with ./adb shell and type su to get your root prompt.
- Reboot your phone. Yes this is a necessary step. The recovery image won’t flash if you don’t so this.
reboot - Copy the recovery image to your phone once it has booted
./adb push ../recovery-RA-heroc-v1.2.3.img /sdcard/ - Connect to the shell on your phone and flash the recovery image
./adb shell
su
flash_image recovery /sdcard/recovery-RA-heroc-v1.2.3.img - Reboot into recovery mode and take a Nandroid backup before you do anything else
reboot recovery - Once the recovery screen has come up take a backup, make sure you have enough free space on your sd card before you do this, so that when you screw up your phone you will be able to restore it. Once you get bored in the recovery image select the top option to boot the phone into your regular HTC Sense environment.
I received no output from the command to flash the recovery image and it took less than two seconds once I had rebooted the phone. If you do not reboot the phone prior to the above steps you will most likely see Out of memory errors. If you see them even after a reboot then uninstall all your silly little app market playthings and try again. If you play around and screw up your phone without a backup then you’ll have to track down a recovery image or single apps and so on. Once again I WILL NOT HELP YOU WITH THIS.
Removing the stock Sprint Apps:
Simply connect to your phone with the SDK, become root, and remove the files from /system/app
./adb shell
$ su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/app
ls
At this point you will have a list of all the stock crap on your screen. If you go about removing stuff you may screw up your phone. That’s what the backup we took earlier was for. Don’t think you made a backup with app store app so you are alright. Do the nandroid backup. Don’t be an idiot about this.
To remove an app simply use the rm command. The following commands remove Sprint NFL, Sprint Nascar, Peep, Footprints, and Sprint Stock, the stock music program (if you are using something else), and Quick Office
rm *Twitt*
rm *Stock*
rm *Foot*
rm Quickoffice_HTC_1.0.1.apk
rm com.htc.MusicWidget.apk
rm com.htc.MusicWidget.odex
rm HtcMusic.apk
rm Sprint_Nscar.apk
There’s a list of apps and some more description here on XDA Developers.
Like I said: This is NOT my work. I merely typed up all of the steps and put them in a single place. All thanks should go to the folks who posted the threads and risked bricking their devices to make this possible!
