Rooting CDMA Hero [Mac] - Hero CDMA Android Development

Root the CDMA Hero
Edit: I assumed that everyone knew that you needed the Android SDK to root. If you didn't know and/or don't have it, you can download it from here. http://developer.android.com/sdk/index.html. Extract it to a location of your choice. I put mine in /Users/Antonio(Would be your username)/Documents/Android/SDK
Now, this part is completely optional.
I'm going to show you how to add your sdk/tools directory to your .bash_profile file so you won't have to navigate to the folder each time.
Download this so you'll be able to see your hidden files http://www.mediafire.com/?diimft1ninn Run it, check "Show Hidden Files" then click Restart finder. Now, navigate to your home folder (/Users/%UserName%/) and see if there's a .bash_profile already there. If not, create with textedit.
Now add this to the file: export PATH=${PATH}:/Path/Of/Your/Sdk/Tools/Folder
Mine is /Users/Antonio/Documents/Android/SDK/tools
Now do not save it as rich text. If yours is in rich text, click on "Format" in the menu bar, and click "make plain text". Now save it as .bash_profile and uncheck "if no extension is provided, use .txt".
Now you can go back to Ghost and uncheck "Show all hidden files" and restart finder again.
Now, for rooting.
First, go to Settings > Applications>Development, and make sure USB Debugging is checked on your phone.
1. Download Asroot2 (http://zenthought.org/tmp/asroot2) and move it to your SDK/tools directory
2. Navigate to your SDK/tools folder (cd ~/Documents/Android/SDK/tools for me)(~ replaces /User/%Username% if you didn't know)
3. Then type:
Code:
./adb push asroot2 /data/local/
./adb shell chmod 0755 /data/local/asroot2
./adb shell
/data/local/asroot2 /system/bin/sh
And you should get:
$ /data/local/asroot2 /system/bin/sh
[+] Using newer pipe_inode_info layout
Opening: /proc/857/fd/3
SUCCESS: Enjoy the shell.
4. Then type:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4775 su
At this point you should have root access.
Now, for the recovery image (gives you extra options like backing up with Nandroid, partioning SD, etc.)
1. Download the recovery image from here: http://forum.xda-developers.com/showthread.php?t=596879
2. If you are still in adb shell from rooting type in exit until you are out. You should be in the directory where you extracted the recovery image. If not go there (You can put it in the SDK/Tools folder and nav there). Type in the following:
adb push recovery-RA-heroc-v1.5.1.img /sdcard/
You should get something like 868 KB/s (3352576 bytes in 3.767s)
3. Type in adb shell. If you see a dollar sign ($) then type in su and press enter. If it is a pound sign (#) you are good. Now type in:
Code:
flash_image recovery /sdcard/recovery-RA-heroc-v1.5.1.img
Once that is finished you are done. To reboot into recovery type in adb shell reboot recovery.
Told you most of the steps are the same. I just copied from other members and slightly modified it for Mac.
Now, if we could get a moderator to merge all these "How to Root" threads.

Ugh... Doesn't seem to work on Macbook. Phone shows "USB Connected", but, see below...
Code:
michael-macbook:tools mglipin$ ./adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
michael-macbook:tools mglipin$ ./adb push asroot2 /data/local
error: device not found
michael-macbook:tools mglipin$
What's up?

Start HTC Sync on your phone Dont worry that it pops up with an error abbout not finding a PC.
Then when you do adb devices you should see your phones serial number.
Alsomake sure USB Debugging Settings >Applications > Development is turned on

Thanks for this! I ended up getting mine rooted last night, but i had no idea about the recovery image thing. I gotta get that Nandroid going so i start removing some of the Sprint/HTC bloat!

ajones7279 said:
Root the CDMA Hero
3. Type in adb shell. If you see a dollar sign ($) then type in su and press enter. If it is a pound sign (#) you are good. Now type in:
flash_image recovery /sdcard/recovery-RA-heroc-v1.2.3.img
Click to expand...
Click to collapse
I get to this step....and in my terminal it keeps coming up with
Code:
mtd: re-read error at 0x00440000 (Out of memory)
mtd: write error at 0x00440000 (Out of memory)
mtd: re-read error at 0x00440000 (Out of memory)
mtd: skipping write block at 0x00440000
mtd: write error at 0x00460000 (Out of memory)
error writing recovery: No space left on device
Any ideas???

SS70Chevelle said:
I get to this step....and in my terminal it keeps coming up with
Code:
mtd: re-read error at 0x00440000 (Out of memory)
mtd: write error at 0x00440000 (Out of memory)
mtd: re-read error at 0x00440000 (Out of memory)
mtd: skipping write block at 0x00440000
mtd: write error at 0x00460000 (Out of memory)
error writing recovery: No space left on device
Any ideas???
Click to expand...
Click to collapse
Unless you replaced your SD card with something > 4Mb then the 3.4Mb recovery image won't fit on the stock 2Mb SD card.
I ordered a 16Mb card myself from Amazon.

I'm pretty sure this has nothing to do with MicroSD card space. I have a 4 gig with lots of space.

I have a 2GB stock card and was able to flash. I initially had the same "Out of memory" error and fixed it by cleaning up my SD card -- copying off extra pictures, videos, podcasts, etc. I also rebooted for good measure, probably not necessary.

Thanks for the guide have everything working! The link to the recovery ROM is hard to get into, it is hosted here as well for anyone else that has a problem.
http://www.androidspin.com/downloads.php?dir=amon_ra/RECOVERY/&file=recovery-RA-heroc-v1.2.3.img
I was also getting the same error message. I didn't do anything to my SDcard, I just died a battery pull and tried again and everything worked.

Ooops, nvm
It is a 2Gb card and the recovery is 3.4Mb.

gilroykilroy said:
Unless you replaced your SD card with something > 4Mb then the 3.4Mb recovery image won't fit on the stock 2Mb SD card.
I ordered a 16Mb card myself from Amazon.
Click to expand...
Click to collapse
It cant be the size of the SD card, I have well over 4GB free on my 8GB card. Does anyone know how much device memory you must have free to flash the recovery image?

It was definitely the device memory. I deleted about 10 programs and rebooted. After that it had no error messages.

5tr4t4 said:
I have a 2GB stock card and was able to flash. I initially had the same "Out of memory" error and fixed it by cleaning up my SD card -- copying off extra pictures, videos, podcasts, etc. I also rebooted for good measure, probably not necessary.
Click to expand...
Click to collapse
mactruc said:
I was also getting the same error message. I didn't do anything to my SDcard, I just died a battery pull and tried again and everything worked.
Click to expand...
Click to collapse
Same Here, the soft reset worked like a charm Just started my nandroid backup. Thanks again gentlemen.

herzzreh said:
Ugh... Doesn't seem to work on Macbook. Phone shows "USB Connected", but, see below...
Code:
michael-macbook:tools mglipin$ ./adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
michael-macbook:tools mglipin$ ./adb push asroot2 /data/local
error: device not found
michael-macbook:tools mglipin$
What's up?
Click to expand...
Click to collapse
Go to Settings > Applications > Development and make sure USB Debugging is checked. It was a step I left out (assumed people knew rather).

ajones7279 said:
Go to Settings > Applications > Development and make sure USB Debugging is checked. It was a step I left out (assumed people knew rather).
Click to expand...
Click to collapse
I can vouch for this as well, had the same issue, and this took care of it.
Thanks for the Mac guide! Worked flawlessly.

so, i'm quite definitely (and obviously, as you'll see) a complete android noob. i apologize in advance.
i followed the guide to the letter, and ran into the "out of memory" error. so i cleared out a few photos from the sd card and rebooted the phone, then tried the last step again. i typed "adb shell reboot recovery" at the command line, and my phone started to reboot, but when it hit the first HTC logo the screen went completely black, the charging light went off, and i couldn't turn the phone back on at all. i ended up popping the battery out and back in, then booted it back up just fine. it booted normally, as it always had, so i'm assuming i did something wrong and it's not "rooted".
basically my question(s) is/are:
a) when i ran into the "out of memory" error and rebooted, should i have started the guide from the beginning again? or was i right to just continue on from the step i left off at?
b) if it worked and i did in fact succeed in rooting the phone, how can i find out for sure that it's rooted? is there a failsafe way to tell me that it worked?
c) if i did something else wrong along the way.. what should i do?

ersocia said:
basically my question(s) is/are:
a) when i ran into the "out of memory" error and rebooted, should i have started the guide from the beginning again? or was i right to just continue on from the step i left off at?
Click to expand...
Click to collapse
I had the same issue. After the soft reset you should have done this:
Code:
mtd: re-read error at 0x004c0000 (Out of memory)
mtd: skipping write block at 0x004c0000
96-26-56-112:tools brynehobbs$ ./adb shell
$ su
# flash_image recovery /sdcard/recovery-RA-heroc-v1.2.3.img
# reboot recovery
ersocia said:
b) if it worked and i did in fact succeed in rooting the phone, how can i find out for sure that it's rooted? is there a failsafe way to tell me that it worked?
Click to expand...
Click to collapse
yeah dl PicMe from the market, its free and requires root to run.
ersocia said:
c) if i did something else wrong along the way.. what should i do?
Click to expand...
Click to collapse
Figure out where you made the mistake and try again.

ersocia said:
c) if i did something else wrong along the way.. what should i do?
Click to expand...
Click to collapse
Just about everything is reversable...and the nandroid backup will save you from just about anything.
However, if even that fails and you find yourself feeling like this guy:
http://forum.xda-developers.com/showthread.php?t=581963
You can always return to stock with the exes from here:
http://forum.xda-developers.com/showthread.php?t=559622

Ran into the memory problem, but I have root now.
I didnt do anything to the sdcard or the device memory, all I did was hit phone+power+menu to do the reboot then did the commands to flash the recovery image and now I am running my nandroid backup.
I love the recovery menu also much better than the recovery menu on my rooted G1, but missing the recovery shell. Is there a way to get into the shell from the recovery menu or is adb the only way in.
edit: nevermind about the recovery shell just realized you cant have a software keyboard in the recovery shell

i am having a hard time rooting my sprint htc hero
the stuff that ajones7279 posted is not enough from me as i have only had a mac and android phone a few weeks and don't know very much
i would be grateful if some one could give me detailed info on how to root my hero on a mac
thank you

Related

[GUIDE] How To Root The Sprint CDMA Hero (Windows)

I have compiled this guide from the other one posted on this forum, the discussion therein, and my own knowledge. If you have any suggestions on making it better or to correct any mistakes I may have made please let me know.
This guide is intended for Windows and includes detailed instructions. It will cover the steps necessary to root, flash the new recovery image, create a full backup. This will work with software versions 1.29.651.1 and 1.56.651.2 (aka Android 1.5). If you have updated to 2.1 please following this guide here. I am not responsible for any damage done to your phone using this guide. Root at your own risk.
I have put to together a video on YouTube for you to follow along as well. The version numbers of certain files are now outdated in the video so change file names as necessary.
If you own a non-Sprint Hero, you will need to do some extra steps. Follow the guide in the How to Root Non-Sprint CDMA Hero thread.
Step 1: Download the Android SDK from http://developer.android.com/sdk/index.html The Windows file is called android-sdk_r06-windows.zip. Extract the files to your C: drive so that you now have the folder C:\android-sdk-windows
Step 2: Download the asroot2 exploit file from http://forum.xda-developers.com/attachment.php?attachmentid=244212&d=1257621154 Extract asroot2.zip to C:\android-sdk-windows\tools folder.
Step 3: Download the Hero recovery image from http://forum.xda-developers.com/showpost.php?p=4898505&postcount=1g Place this file in C:\android-sdk-windows\tools as well.
Step 4: Make sure USB Debugging is off by going to Settings>Applications>Development. Now connect the phone to your PC via USB cable.
Step 5: Mount your sdcard; Browse to the HTC Sync folder and install HTC Sync on your pc. After it is done installing unmount the sdcard then enable your USB debugging.
Step 6: Open a command prompt by clicking the Start button and typing cmd into the search box and pressing enter or found under All Programs>Accessories.
Step 7: You will now enter a series of commands which I will place inside code boxes to indicate the entire command. You may copy and then paste them into the command prompt window by right clicking. Only enter one command at a time.
1:
Code:
cd C:\android-sdk-windows\tools
2:
Code:
adb devices
If you've been following this guide you will see your phone's serial number. If you get "device not found" error, you either need to make sure you the drivers were properly installed or make sure you enable USB debugging AFTER you connect the USB cable. Continue on once you get the proper phone serial output.
3:
Code:
adb push asroot2 /data/local/
4:
Code:
adb shell
5:
Code:
chmod 0755 /data/local/asroot2
6:
Code:
/data/local/asroot2 /system/bin/sh
You should see an output that says:
$ /data/local/asroot2 /system/bin/sh
[+] Using newer pope_inode_info layout
Opening: /proc/857/fd/3
SUCCESS: Enjoy the shell.
#​Now for a few last commands.
7:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
8:
Code:
cd /system/bin
9:
Code:
cat sh > su
10:
Code:
chmod 4755 su
You are now officially rooted. A few more steps and you will have flashed the recovery image.
11:
Code:
exit
12:
Code:
exit
13:
Code:
adb push recovery-RA-heroc-v1.6.2.img /sdcard
Pushing is equivalent of copy the file to the root of your sdcard. By the time you finished reading this it should be done. You'll know its done because the ouput will say something like transferred X bytes in X secs.
14:
Code:
adb shell reboot
This will cause the phone to restart automatically. Wait till it is fully booted to continue.
15:
Code:
adb shell
16:
Code:
su
17:
Code:
cd /sdcard/
18:
Code:
flash_image recovery recovery-RA-heroc-v1.6.2.img
FLASHING TO THE RECOVERY TAKES SEVERAL SECONDS-- BE PATIENT. ENTER THE NEXT COMMAND ONLY AFTER THE COMMAND PROMPT RETURNS TO THE # (ROOT SYMBOL).
19:
Code:
reboot recovery
Step 8: This is the last command; you may now close the cmd prompt. This will cause your phone to boot into recovery mode; it should take no longer than 30 secs. The third option on the list is "- Backup/Restore"; select it. Now, select the first option "- Nand backup". The phone will prompt you to press HOME to confirm which is want you want to do. The backup will begin. You will see the screen say, "Performing backup : .........." When done, the bottom of the screen will say "Backup complete!" and you will be given the menu options again. Go back to the main menu and select reboot system. Rebooting your phone after installing the new recovery image may take several minutes.
Step 9: Once your phone is fully booted, mount the sdcard. You will see a folder called "nandroid"; I highly recommend you copy this to your pc in case you lose your sdcard data or reformat it. Your phone is rooted, 100% backed up, and ready to install a custom rom if you wish!
wow dude,
instructions worked great on Win7
i was able to download the missing usb_drivers by running SDK Setup in C:\android-sdk-windows, and selecting the usb driver from the available packages. I was unable to download the index for the SDK Setup program until I enabled "force http://" in the settings menu.
had to copy over asroot again after i ran SDK Setup (that program deleted it from the directory)
your instructions worked like a charm. total time spent rooting this thing after finding your post: 18 minutes.
(you might want to add a line there in the "mount and copy over the zip file step" to backup the nandroid folder from your SDCard to your comp just as a backup of your stock phone image)
anyway.. cheers!
izanagi said:
wow dude,
i'm about to follow these instructions. thank's for the precise list!
(btw, about to try it on Win7.. may have to change some folder pathing but we'll see)
okay.. typo on the first command in parentheses, and I'm missing the usb_drivers folder (do you have it / can sent it to me) so am unable to install the device in win7.
Click to expand...
Click to collapse
Heh, thanks for the misspell heads up. I did my rooting from Win7 pc; it automatically installed correct drivers for me. To check go to the Control Panel>View devices and printers. You see one device named "Android Phone". Otherwise as far as Ive heard installing HTC Sync installs proper drivers.​
izanagi said:
*** edit had to copy over asroot again after i ran SDK Setup (that program deleted it from the directory)
**** edit: all done.. your instructions worked like a charm. total time spent rooting this thing after finding your post: 18 minutes.
(you might want to add a line there in the "mount and copy over the zip file step" to backup the nandroid folder from your SDCard to your comp just as a backup of your stock phone image)
anyway.. cheers!
Click to expand...
Click to collapse
Thank you for taking the time help make my guide better. I'm very glad to know there are little to no hiccups.
When I do step 5, instead of:
5. "/data/local/asroot2 /system/bin/sh"
You should see an output that says:
$ /data/local/asroot2 /system/bin/sh
[+] Using newer pope_inode_info layout
Opening: /proc/857/fd/3
SUCCESS: Enjoy the shell.
#
I get:
[1] Killed /data/local/asroot2 /system/bin/sh
Any suggestions? Should I just be quiet until there is an Eris specific way to do this?
When I do step 5, instead of:
5. "/data/local/asroot2 /system/bin/sh"
You should see an output that says:
$ /data/local/asroot2 /system/bin/sh
[+] Using newer pope_inode_info layout
Opening: /proc/857/fd/3
SUCCESS: Enjoy the shell.
#
I get:
[1] Killed /data/local/asroot2 /system/bin/sh
Any suggestions? Should I just be quiet until there is an Eris specific way to do this?
detox702 said:
When I do step 5, instead of:
5. "/data/local/asroot2 /system/bin/sh"
You should see an output that says:
$ /data/local/asroot2 /system/bin/sh
[+] Using newer pope_inode_info layout
Opening: /proc/857/fd/3
SUCCESS: Enjoy the shell.
#
I get:
[1] Killed /data/local/asroot2 /system/bin/sh
Any suggestions? Should I just be quiet until there is an Eris specific way to do this?
Click to expand...
Click to collapse
This guide is for the CDMA Hero not the Eris!
When I go to apply the rom I get an white screen with skateboarding androids on the bottom and the prompt to erase data yes/no. I press the home key and the Hero reboots without asking to "Apply sdcard:choose zip". This is done from the boot menu. Does the rom load automatically? Did I do something wrong? I got root with no problem. A tip; to make it easier and to avoid spelling mistakes copy and paste the rooting commands from the instructions. Made it go faster too. Thanks in advance.
Never mind. I held down Home and Power at
the same time instead of Home THEN power! ARRGH! Loading up now as I type. Sorry.
ELIMINATED said:
When I go to apply the rom I get an white screen with skateboarding androids on the bottom and the prompt to erase data yes/no.
I press the home key and the Hero reboots without asking to "Apply sdcard:choose zip".This is done from the boot menu.
Does the rom load automatically? Did I do something wrong? I got root with no problem.
A tip; to make it easier and to avoid spelling mistakes copy and paste the rooting commands from the instructions. Made it go faster too. Thanks in advance.
Click to expand...
Click to collapse
yuck... break up your sentences, that's alot of crap to throw on someone all at once... and the bold doesn't help it any.
check to see if you have the custom recovery installed....
-turn off phone
-hold vol down + power
-should search for some stuff then give three options
-press "home" to enter recovery image
do you see "!" and a phone.... does it just hang or do you see a green/yellow menu?
At the end of his post he says he figured it out. He wasn't holding down home key
None of this is working for me at all... I'm not sure what I'm doing wrong, but every time I enter ANY of the commands into the prompt all I get is "cannot find the path specified".
For reference, i have done everything in this guide to the letter, everything is downloaded, unzipped to the correct location, USB drivers installed, etc etc. Not sure what's wrong.
EDIT: I figured it out.. user error, awesome. Worked great, thanks for this!
awesomeindeed said:
None of this is working for me at all... I'm not sure what I'm doing wrong, but every time I enter ANY of the commands into the prompt all I get is "cannot find the path specified".
For reference, i have done everything in this guide to the letter, everything is downloaded, unzipped to the correct location, USB drivers installed, etc etc. Not sure what's wrong.
EDIT: I figured it out.. user error, awesome. Worked great, thanks for this!
Click to expand...
Click to collapse
"cd C:\android-sdk-windows\tools" is actually "cd C:\android-sdk_r3-windows\tools"
is that where you are stuck?
thank you TS. I've been lurking xda for a couple years now when i had the mogul and tp. First time on an android device. Thank you for your time in helping me.
someone buy this man a drink!!!
Invaluable piece of work right here, helped me get it done in no time at all....real clear concise and very helpful....REQUEST THIS BE A STICKY!!!!!
fenske09 said:
"cd C:\android-sdk-windows\tools" is actually "cd C:\android-sdk_r3-windows\tools"
is that where you are stuck?
Click to expand...
Click to collapse
That was the name of the zip file not the extracted folder.
Please help, I followed all of your instructions, I received no errors however I can't boot the recovery image. I checked and it is in the sd card, but every time it just hangs at the HTC logo
I downloaded a terminal emulator and typed su and it gave me # so I assuming I am rooted?!
newtodroid said:
Please help, I followed all of your instructions, I received no errors however I can't boot the recovery image. I checked and it is in the sd card, but every time it just hangs at the HTC logo
I downloaded a terminal emulator and typed su and it gave me # so I assuming I am rooted?!
Click to expand...
Click to collapse
Redownload the recovery image and reflash it. The one you're using probably became corrupt during DL or something.
theresthatguy said:
Redownload the recovery image and reflash it. The one you're using probably became corrupt during DL or something.
Click to expand...
Click to collapse
also make sure you have the heroc version there's a hero and heroC, i messed that up once and had similar results
new ROM
So i loaded the custom ROM, and i followed all the istructions as listed on this guide. When i rebooted my phone, a bunch of my apps started Force Closing on startup.
did i miss something, or do something wrong?
if i reinstall them on the new ROM will they work right?
thanks for any insight
kristaps said:
So i loaded the custom ROM, and i followed all the istructions as listed on this guide. When i rebooted my phone, a bunch of my apps started Force Closing on startup.
did i miss something, or do something wrong?
if i reinstall them on the new ROM will they work right?
thanks for any insight
Click to expand...
Click to collapse
you converted your sd card to fat32,ext2,swap and now the apps are looking for the program on your sd card,
turn off your phone
take out sd card
turn on phone
uninstall app
turn off phone
put in sd card
turn on phone
reinstall app
this should fix you

[GUIDE] Root Hero [MAC], Load Unofficial MoDaCo 1.2c, Nandroid Backup/Restore!

NOTE: This is a work in progress. While I have completed this guide myself SEVERAL times to ensure accuracy, It is possible that typos or errors in understanding exist. Please use at your own risk, and expect NOTHING from me. I will do my best to update this guide and improve the formatting as I find time. Feel free to leave feedback!
I cannot stress this enough: always have backups of any important information. While we may not be able to do full image-based backups until after root, you can still make sure we aren't deleting needed data. While yes, Google should hold your most important data and allow you to sync at any time, what would you do if Google went down? And I've even had trouble using the "Offline" function for some of the Apps. Therefore, Make a copy of everything on your SD card and read this excellent guide from Lifehacker about how to backup Google Apps data: Lifehacker
You will need an SD card. I recommend AT LEAST an 8GB Class 4. Most actually recommend a Class 6 for use with apps2sd, but I just wanted to let you know that it would still work with a Class 4. For those unaware, apps2sd allows you to save internal phone memory by placing after-market applications onto your SD card. Most users notice a speed benefit from this.
If you would like to purchase a Class 6 SD card, you can get a one here with three sizes available (4GB, 8GB, 16GB):
A-DATA MicroSDHC Class 6 Turbo With SD Adapter
To ensure the best possible load, perform a factory reset, and WIPE your SD card!
Code:
Menu > Settings > Security > Factory data reset > Reset phone > Erase everything
TRUE FACTORY RESET (UN-ROOT)
If you, like me, have already rooted and are trying to perform this process over again, you will unfortunately have to download the original ROM and flash it in Windows.
Download: RUU_Hero_C_Sprint_1.29.651.1_signed_release.exe
Run in Windows (I used XP through VMWare Fusion), and this will return the phone to the TRULY factory loaded state. Any other Factory data reset will simply reload the last ROM image saved, which, if you rooted and loaded MoDaCo, would be MoDaCo. I am encouraging you to follow this process to avoid any problems that may exist while the phone is rooted or loaded with the unofficial ROM. And even if you perform this process as a first-time rooter, it certainly wont hurt!
ROOT HERO [MAC]
(This is the process that allows modifications to occur on your phone):
The guide I follow and can verify is this:
Rooting CDMA Hero [Mac]
I do not use Windows as a primary platform, so I would recommend following this guide if you are on Windows:
How to root the CDMA Hero (DETAILED Windows guide)
You should be able to return to this guide after you have successfully completed the root process on Windows. Continue from the section "NANDROID BACKUP" below.
Per the purpose of this guide, I will detail my exact steps from the "Rooting CDMA Hero [Mac]" post. Thanks ajones7279!
Plug in your phone
Download Android SDK: http://developer.android.com/sdk/index.html
Unpack, Rename the extracted folder to "AndroidSDK" (This is case sensitive!), and Move it to "Applications" (I consider the Android SDK a set of applications.)
Open TextEdit, Click Format>Make Plain Text, then copy and paste the following:
Code:
export PATH=${PATH}:/Applications/AndroidSDK/tools
Save as: ".bash_profile"
On Phone: Go to Settings > Applications > Development>USB Debugging and make sure the option is checked.
On your Mac: Download asroot2: http://zenthought.org/tmp/asroot2
Save this file into: /Applications/AndroidSDK/tools
Open Terminal and run the following commands (You can copy and paste):
Code:
cd /Applications/AndroidSDK/tools
adb push asroot 2 /data/local
adb shell chmod 0755 /data/local/asroot2
adb shell
/data/local/asroot2 /system/bin/sh
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4775 su
exit
exit
At this point, the phone has root access.
Download: http://rapidshare.com/files/303797523/recovery-RA-heroc-v1.2.3.img
Save this file into: /Applications/AndroidSDK/tools
Go back to your terminal and type:
Code:
adb push recovery-RA-heroc-v1.2.3.img /sdcard/
adb shell
su
flash_image recovery /sdcard/recovery-RA-heroc-v1.2.3.img
exit
exit
adb shell reboot recovery
Now, the phone will reboot into recovery mode. To preserve our freshly rooted state, we will make a Nandroid backup.
NANDROID BACKUP
*NOTE: These steps assume that you have already entered Recovery Mode on the phone through Terminal "adb shell reboot recovery" or the "Quick Boot" app.*
On phone: Using the trackball, scroll down and select "Nandroid v2.2 backup". This will create a backup of the phone in its freshly rooted state to your SD card, under the nandroid directory.
After it completes the backup, we want to make sure that we have the backup "backed up" by copying it to our Mac (Just in case anything happens to the SD card!).
Select "USB Mass storage on"
After your SD Card appears, copy the contents of the "nandroid" folder to anywhere you wish on your Mac (You are using Time Machine right?)
Once the copy is complete, eject the sdcard in mac and select "USB Mass storage off" on the phone.
NOTE: Nandroid does not backup the contents of your SD card. If you don't want to lose what's on your SD card, MAKE A BACKUP COPY!
From this point forward, if you do something that seems to really mess with the phones functionality, you can simply go back to your Nandroid backup!
RESTORE NANDROID BACKUPS
Select "Nandroid v2.2 restore" *THIS WILL ERASE EVERYTHING ON YOUR PHONE*
Your phone will be returned to the condition it was in as of the last Nandroid backup. You can control which backup is restored by deleting the unwanted, time-stamped folders within the "nandroid" directory on your SD card. If you leave only one time-stamped backup folder, that is the backup that will be restored.
Note that this will leave the custom Recovery ROM we loaded (recovery-RA-heroc-v1.2.3.img) in place.
I actually perform a Restore after every Backup. While this takes extra time, you know your Backup is intact and not corrupted in any way!
If you are looking for a complete factory reset, you will need to scroll up to "TRUE FACTORY RESET (UN-ROOT)"
PREPARE SD CARD FOR APPS2SD (A2SD)
For those unaware, apps2sd allows you to save internal phone memory by placing after-market applications onto your SD card. Most users notice a speed benefit from this.
Select "Wipe SD: fat32+ext2+swap" *THIS WILL ERASE EVERYTHING ON YOUR SDCARD*
Select "USB Mass storage on"
The mounted drive should now be empty. Double-check that it was partitioned correctly by opening Disk Utility and verifying 3 partitions on the sdcard: NONAME, disk1s2, and disk1s3. Close Disk Utility.
LOAD Unofficial MoDaCo 1.2c Core ROM
Forum Post: Unofficial MoDaCo 1.2
Download: Unofficial MoDaCo 1.2c Core
Save this file into: your SD card. (the root of your SD card, probably named "NONAME" if you didn't change it. You can change it to whatever you want though.)
Save the file as: "update.zip" (Or rename it)
Eject your sdcard and Select "USB Mass storage off"
Select "Apply sdcard:update.zip"
Select "Reboot system now"
If it successfully loaded, you now have a fresh load of the Unofficial MoDaCo 1.2c ROM! Congrats!
I would recommend that you create another Nandroid backup. Scroll back up to "NANDROID BACKUP" and follow the steps over again and come back to this point.
Now you are ready for the workarounds!
Guide: Workaround Issues (Unofficial MoDaCo 1.2c)
Why'd you make another guide?
nice guide man, no need to respond why you made another guide, the more the merry, nicely detailed as well
Shhhhhh.
I was just curious because there are like six...
I made another guide because while many of the forum posts acomplish bits and pieces, my guide provides the overall picture. Root, ROM, and Backup. And my upcoming "Workarond Issues" guide will collect scattered information in a similar fashion.
I find it ironic that I thanked you for your contribution and you find this guide excessive. Would you prefer that I removed the guide?
No not at all. Yours is nice and concise. There's just a lot, that's all. That's why I said it would be nice if a moderator could have merged all the ones that were already written at the end of mine. Didn't mean any harm.
Ah, I see what you mean. To be honest, I am also making this guide for self reference. If most all of the information I need is together its easier to help myself as well as my friends and the community. Thanks again for all your contributions.
Just to raise awareness, Nandroid does NOT back up your apps if you are using AppsToSD as in MoDaCo. You must back up your apps separately.
True, thanks for the heads up. I'll work on a separate guide that details how to backup your other apps. I believe that anything after-market can be backed up and restored through ASTRO though, and this is much easier for most than adb and Terminal commands (push/pull).
The whole 1.56.651.2 Firmware update is also making me wait to post any further guides, as some of my worksarounds may prove useless. It looks like we still have the Apps Renaming and Reverting issue though, and I didn't see the Sprint admin adress such issues specfically.
?
ok i did the update to the hero. and now found out about rooting(im new to all this) do i run that program you put in the beginning with windows? and then does that rom resolve the issue with battery with sms and other things the OTA update fixed? or should i get another rom or .img idk what to call it really and what does RUU stand for?
Alright,
A couple things to add to this guide, for the complete noob, as I can try to explain it a little more clear.
This should be done prior to doing anything within the guide.
First, connect your phone to your computer and mount your sd card. This can be done by connecting the usb cable, then on your phone, drop down the menu and chose, connect to p.c., Mount SD card. Make a folder and backup your entire sd card to this folder. Once done, delete everything off the card. if you don't, you will run into format and partitions errors later in the guide.
Eject the sd card on the computer, and end usb sharing on the phone. remove the USB cable from the computer.
Next, on the phone Go to Settings > Applications > Development>USB Debugging
Make sure that USB debugging is NOT CHECKED. If its checked later in the guide you will run into errors pushing the files onto the phone.
At this point you can start the guide from the beginning, under the main heading Root Hero [MAC]
I am running OSX 10.6.2 so i ran into a couple of issues.
Next. Under the part where you have to create the .bash file. This file should be saved in your user folder.
/Users/USERNAME where USERNAME is the name of your user account.
For instance my User account is Hamspiced so my user folder is:
/Users/Hamspiced/
when saving the file, uncheck "if no extension is provided, use .txt".
Next, I couldn't copy paste the code because it wasn't parsed properly. This is what i had to do.
And this should be a direct copy paste into terminal. If you don't know how to access terminal click the spyglass in the upper right hand of the screen, and type in terminal. then you should be able to directly copy paste this text.
Code:
cd /Applications/AndroidSDK/tools
./adb push asroot2 /data/local
./adb shell chmod 0755 /data/local/asroot2
./adb shell
/data/local/asroot2 /system/bin/sh
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4775 su
exit
exit
As stated you should have root access on the phone. you can verify this by downloading Terminal emulator from the Market, then running the app. Once inside the app if you hold Menu, you should bring up the onscreen keyboard. if you type in "su" (stands for super user) it will change the prompt from $ to #. If yours does not change, start over, something went wrong. If it did change then you can proceed to the next part of this guide.
Next the guide is trying to put the recovery Image to your phone. This doesnt restore your phone, it just puts the recovery portion to it, and it allows you to do all the cool things to your phone, like allow you to create backups, restore backups, and load customs roms.
again i ran into issues with parsing the correct format so these are copy pastes from terminal.
Code:
./adb push recovery-RA-heroc-v1.2.3.img /sdcard/
./adb shell
su
flash_image recovery /sdcard/recovery-RA-heroc-v1.2.3.img
exit
exit
adb shell reboot recovery
If you get an access denied error pushing the recovery image, its because you had debugging turned on prior to connecting your phone to the computer. it must be off, then turned on once the phone is connected.
This will result in headaches, and endless google searching with no results.
Follow the rest of the guide regarding the Nandroid backup this backs up the entire phone settings. you want to save the raw phone backup as well as the backup after you load the rom. both are incredibly important!
Prepare SD Card for Apps2sd….
If when you checked Disk Utility and your SD card didnt partition properly follow these steps.
You must erase everything on your sd card for these steps to work. I ran into errors creating the partition. What i had to do was in the recovery mode chose factory recovery. when the phone restarted i had to go to Settings>Security>Factory Data Reset.
This restored EVERYTHING. THe phone, Sd Card, Etc. Everything was lost, however since in the begining, we made a backup of the SD card, and then we made a backup of our phone, we are fine.
Restart the phone in recovery mode once this finishes and restarts. (Hold Home and Power to turn on)
Next chose Part SD: fat32+ext2+swap this will partition the card properly. Then choose restart phone.
Once the phone restarts, we have to go through the normal steps that we did once we first received the phone for its first bootup. connect it to the computer, transfer over the Nandroid backup that should be saved from the first time you saved it on your phone. then restart the phone again in recovery mode.
Now you need to restore the nandroid backup. since you transferred it over, its the only nandroid backup there is, it will restore the phones origional settings. from here you can load the official MoDaCO rom fine on the SD card that is now formatted properly.
These are about all the issues and resolutions i ran into. Hopefully it helps someone else.
Guess it's subjective. I think I haven't turned off USB Debugging since shortly after I got the phone and didn't run into any problems. It's always on before I plug it in and I haven't ran into any errors while pushing a file to my sd card. Also didn't erase my sd card before I formatted (did back it up though of course) and everything went smooth. Dunno. It's always good to hear from diff people though. Also just edited my thread, thanks for the heads up.
need help rooting htc hero from sprint
i have 1.5 firmware bb version is 1.04.01.09.21 kernel version 2.6.27-533ce29dhtc [email protected] build number1.56.651.2 cl85027software 1.56 cant get root on this device can someone please help me
quis5550 said:
i have 1.5 firmware bb version is 1.04.01.09.21 kernel version 2.6.27-533ce29dhtc [email protected] build number1.56.651.2 cl85027software 1.56 cant get root on this device can someone please help me
Click to expand...
Click to collapse
Try here
http://forum.xda-developers.com/showthread.php?t=581686&highlight=root+mac
First, excellent guide! Personally, I used Universal Androot (snipurl.com/uaroot) to root my Hero, but this was a huge help in getting the SDK installed!
I'm running into a problem while trying to do the Nandroid backup. When I try to flash the recovery image, I get the following error message....
AJBlue98$ ./adb shell
$ cd /sdcard/
$ su
# flash_image recovery recovery-RA-herocv1.6.2.img
flash_image: not found
Click to expand...
Click to collapse
I even try the command with the leading "./" and I get essentially the same thing...
# ./flash_image recovery recovery-RA-herocv1.6.2.img
./flash_image: not found
Click to expand...
Click to collapse
I'm running the latest official Sprint 2.1 ROM on my Hero and Terminal on Mac OS X Snow Leopard 10.6.4 on a late-2009, 17 in. MacBook Pro. Oh, and I installed the Android SDK into another directory (had it installed before I found this tutorial), so here's my $PATH...
-bash: type: /opt/local/bin:/opt/local/sbin:/Users/AJBlue98/soylatte/bin:/Users/AJBlue98/android-sdk-mac_86:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin: not found
Click to expand...
Click to collapse
Am I missing something? I'll really appreciate the help!
—Adam
ajblue98 said:
First, excellent guide! Personally, I used Universal Androot (snipurl.com/uaroot) to root my Hero, but this was a huge help in getting the SDK installed!
I'm running into a problem while trying to do the Nandroid backup. When I try to flash the recovery image, I get the following error message....
I even try the command with the leading "./" and I get essentially the same thing...
I'm running the latest official Sprint 2.1 ROM on my Hero and Terminal on Mac OS X Snow Leopard 10.6.4 on a late-2009, 17 in. MacBook Pro. Oh, and I installed the Android SDK into another directory (had it installed before I found this tutorial), so here's my $PATH...
Am I missing something? I'll really appreciate the help!
—Adam
Click to expand...
Click to collapse
yeah, you're missing the "flash_image" binary on your phone lol search xda for it and push it to /system/bin, then try the command again.
regaw_leinad said:
yeah, you're missing the "flash_image" binary on your phone lol search xda for it and push it to /system/bin, then try the command again.
Click to expand...
Click to collapse
Thanks, regaw_leinad, for the lead! I found a copy of the flash_image file and copied it to my Android SDK folder, but when I try to push it to my phone, I get this:
AJBlue98$ ./adb push flash_image /system/bin
failed to copy 'flash_image' to '/system/bin/flash_image': Permission denied
failed to copy 'flash_image' to '/system/bin/flash_image': Read-only file system
Click to expand...
Click to collapse
(I rebooted the phone and tried again after my original post. The error message changed. BTW I'm connected via USB with debugging turned on and "Charge only" selected as my connection type.)
I've tried running adb as root, but I get this:
AJBlue98$ ./adb root
adbd cannot run as root in production builds
Click to expand...
Click to collapse
Again, any help will be greatly appreciated!
—AJBlue98
ajblue98 said:
Thanks, regaw_leinad, for the lead! I found a copy of the flash_image file and copied it to my Android SDK folder, but when I try to push it to my phone, I get this:
(I rebooted the phone and tried again after my original post. The error message changed. BTW I'm connected via USB with debugging turned on and "Charge only" selected as my connection type.)
I've tried running adb as root, but I get this:
Again, any help will be greatly appreciated!
—AJBlue98
Click to expand...
Click to collapse
ok type
adb shell
then
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
to mount it as r/w
then try the flash image command again.
Adb root or adb remount won't work, because your boot.img isn't patched yet.
regaw_leinad said:
ok type
adb shell
then
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
to mount it as r/w
then try the flash image command again.
Adb root or adb remount won't work, because your boot.img isn't patched yet.
Click to expand...
Click to collapse
Okay, I did that. I'm still charge-only and debugging turned on, and here's what happened.
(N.B.: I'm on a Mac, so I have to include "./" before running an application in the current directory. Also, I'm including "AJBlue98" in front of my "$" prompts to differentiate my Mac's local prompts from the adb shell prompts.)
AJBlue98$ ./adb shell
$ mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mount: Operation not permitted
Click to expand...
Click to collapse
So I tried these few things...
$ su
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# cd /sdcard/
# mv flash_image /system/bin
failed on 'flash_image' - Cross-device link
# exit
$ exit
AJBlue98$ ./adb shell su mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Permission denied
AJBlue98$ ./adb push flash_image /system/bin
failed to copy 'flash_image' to '/system/bin/flash_image': Permission denied
Click to expand...
Click to collapse
Now I'm completely flummoxed. As always, please help and thanks in advance!
Update: I got frisky, so I tried this, just for the heck of it...
AJBlue98$ ./adb shell
$ su
# cd /sdcard
# ./flash_image recovery /sdcard/recovery-RA-heroc_v1.2.3.img
./flash_image: permission denied
# chmod 755 ./flash_image
# ./flash_image recovery /sdcard/recovery-RA-heroc_v1.2.3.img
./flash_image: permission denied
# su ./flash_image recovery /sdcard/recovery-RA-heroc_v1.2.3.img
Permission denied
Click to expand...
Click to collapse
Update 2:
I got some help at irc.twit.tv from a good soul in the #twitlive channel, who pointed me to ROM Manager (downloadable from the Market). That just did the whole backup, hey-presto, no flash_image BS required.
Thanks for the help anyway, all!
ajblue98 said:
Okay, I did that. I'm still charge-only and debugging turned on, and here's what happened.
(N.B.: I'm on a Mac, so I have to include "./" before running an application in the current directory. Also, I'm including "AJBlue98" in front of my "$" prompts to differentiate my Mac's local prompts from the adb shell prompts.)
So I tried these few things...
Now I'm completely flummoxed. As always, please help and thanks in advance!
Update: I got frisky, so I tried this, just for the heck of it...
Update 2:
I got some help at irc.twit.tv from a good soul in the #twitlive channel, who pointed me to ROM Manager (downloadable from the Market). That just did the whole backup, hey-presto, no flash_image BS required.
Thanks for the help anyway, all!
Click to expand...
Click to collapse
sweet, glad you got it worked out
there were a few errors in what you did above, but looks like you got everything working without it, so that's good

110 Error RUU 1.56 Fix - 100% unroot too!

Update - 2/21/2011
If you have bricked an HTC EVO this will likely NOT work for you and this is the wrong info to be reading. I have gotten a few emails from this link about EVO 110 errors.
12/26/2010 - This thread is super old now:
If you ran the 1.56 RUU and your phone no longer turns on visit htc.com, go to support, choose Hero (Sprint) and download the 2.1 system update.
Remove battery from your phone and start it up again, then run the exe file that you just downloaded -
http://member.america.htc.com/downlo...2.27.651.6.exe
------All the info below is kept for reference -------
(As of 3/31/2010 - I am 10 for 10 for getting these back and working!! 3/3 of going back to 100% stock)
Edit: I have no longer kept track... its been over a month and I know personally I've done about 15 more of these... with about half being return to stock.
If you need to contact me, PLEASE EMAIL instead of using private messages, it'll probably turn into a google talk chat anyways, so add me on there, [email protected] (Its just easier than having to log in here and reply to private messages, since I get emails on the go as well.)
So you just ran the 1.56 RUU and got a 110 error. Now your screen turns on and stays black and if you plug the phone into USB you see the HTC logo. Unplug it and see the RUU menu.
Like you, I decided to attempt to roll back using the RUU 1.56. I was hit with the 110 error, and nothing but fastboot would work, I was able to launch ./fastboot-mac oem boot to get into the system.
I tried ./fastboot-mac boot image/bootname.img and a billion other things like everyone else who is having the issue, but just like them I had no success. In the second post below are the steps to resolve this issue. This will either take you to your first Nandroid backup or to whatever ROM you choose to flash once you get recovery back. I have not found a way to get back to 100% stock, but at least your phone wont be a brick.
EDIT:As of 3/30/2010 @ 8:30 PM I was able to get my phone completely 100% to stock. I was able to do this by retrieving a Nandroid restore from someone who used flashrec to make their initial backup. This restore does not touch the recovery image but I was able to boot into my recovery then write the HTC recovery back on top of it. I now have 100% un-rooted phone. See Post number 2 for the right way to do this.?
I've helped a few people over log me in now.
I'm willing to continue doing this but it is cutting into my family time, I will do this for a "respectable" amount of money.
Feel like I've helped you??
Buy me some coffee!
(Zip attached includes fix and stock folders. Use the fix folder FIRST to get completely booted. You can use the stock folder if you want to get 100% stock after you have a running unrooted system but have RA recovery.)
Steps to resolve:
(You SHOULD have a Nandroid backup of some sort, if not download a ROM... Fresh1.1??)
1) Boot the phone to black screen
2) Plug phone into PC/MAC - The HTC logo should appear at this point
---- If you've been doing anything else, rerun the RUU and let it fail and reboot to the HTC logo.
3) PC - fastboot oem boot | MAC - ./fastboot oem boot
(Make sure you turn on USB Debugging under Settings --> Applications --> Developer)
4) Root your phone using asroot2
Code:
adb push asroot2 /data/local/
adb shell chmod 0755 /data/local/asroot2
adb shell
/data/local/asroot2 /system/bin/sh
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4775 su
5) This is where your Nandroid backup comes into play.
(Browse to your nandroid folder, find your first backup and copy all of the .img files except system and cache to your SD card root directory)
NOTE: At this point you should dismount the SD card if you mounted inside of Android OS(Sense/Launcher)
6) run adb shell (PC - adb shell | Mac - ./adb shell)
7) type su
8) Run the following commands (if you get out of memory errors, type su again and try once more)
NOTE: Do not copy the "#"'s in the commands, the # just means you are running as SU, as opposed to the "$"
Code:
# flash_image recovery /sdcard/recovery.img
# flash_image boot /sdcard/boot.img
# flash_image misc /sdcard/misc.img
9) now... type reboot recovery
This time you should get your recovery menu, should have been RA or whatever you used... from there I did a complete nandroid restore and my system booted.
Also, after I did this I did try to let it boot without doing a recovery and it wouldnt go anywhere... but I'm fairly impatient... it may have wanted to load. I figured it best to do an entire Nandroid restore though.
-------------------------------------------------------------
100% Stock Configuration Work Around
-------------------------------------------------------------
Non-Rooted Nandroid Backup:
nandroid.7z
I was able to get my phone completely 100% to stock. I was able to do this by retrieving a Nandroid restore from someone who used flashrec to make their initial backup. This restore does not touch the recovery image but I was able to boot into my recovery then write the HTC recovery back on top of it. I now have 100% un-rooted phone. I'm not sure how to go about posting a 127MB file, what do you think it the best place?
After restoring the Nandroid backup I tried this:
Code:
Dustan-Bonneys-MacBook:tools dustanbonney$ ./adb shell
$ su
su: permission denied
Then I rebooted to recovery (I used RA 1.5.2)
Code:
Dustan-Bonneys-MacBook:tools dustanbonney$ ./adb remount
remount succeeded
Dustan-Bonneys-MacBook:tools dustanbonney$ ./adb shell
/ # mount -a
mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: No such file or directory
/ # cd /sdcard
/sdcard # flash_image recovery /sdcard/Stock/recovery.img
flashing recovery from /sdcard/Stock/recovery.img
/sdcard # reboot recovery
I was booted to the Triangle and exclamation mark... I pulled the battery and booted up normally.
Stock Kernel - 2.6.27-533ce29d [email protected] )
Stock Build - 1.56.651.2 CL85027 release-keys
Other things that should be mentioned:
If you used RA 1.6.2 - I was unable to get my boot.img or the stock boot.img from the RUU's rom.zip to flash back to the recovery partition. I had to use the RA 1.6.2.img and "flash_image recovery /sdcard/recoverynamegoeshere.img"
It seems that if you've flashed the radio update, the RUU does not write the radio back successfully. Others have had issues going back to the stock radio using the upgrade.zip option as well.
I attempted to use the boot.img, recovery.img, from the RUU's rom.zip with no success. I might try it again. I was able to get to stock recovery (Triangle and exclamation) and to the Hboot menu... but from hboot I had to run the RUU and rebrick the device cause I couldnt get anything at that point, even fastboot oem boot wouldnt load.
There have been times when I get weird issues writing the flash recovery, boot, or misc and when you reboot and load "fastboot oem boot" it wont look like it goes anywhere.... check "adb devices" and your device should be listed. From there do an "adb remount" and then "adb shell" and reflash once more and then "reboot recovery".
If all else fails, I'm available for a small fee.
[email protected]
Anxiously waiting your news. Just encountered this problem today.
Updated ...
imekul said:
Anxiously waiting your news. Just encountered this problem today.
Click to expand...
Click to collapse
Wow! If you've fixed this, I think you're everyone's hero now. We won't have to worry about using the RUU now
I was going to try something similar to this today, but i was unable to brick my phone using the 1.56.651.2 RUU. I was running Flipz updated radio and DamageControl v2.0r2.. The RUU completed successfully..
I was reading over the forum post in http://forum.xda-developers.com/showthread.php?t=645002 and i read that you could boot the system using the command 'fastboot oem boot' I was going to try to use FlashRec to do the work of Flashing the recovery, then booting into recovery and use nandroid.. but you beat me to it! Good work!
I attempted flashing a new recovery image this way with no avail... I also attempted only
Code:
flash_image recovery /sdcard/recovery.img
and still was unable to boot the phone into recovery. I think it had to have been something with doing boot.img and recovery.img at the same time... I dont know what the misc.img does and I'm assuming data.img is userdata... but I did them all and then it worked...
Other users also tried flashrec and with no success... right track though.
chavo2005 said:
I was going to try something similar to this today, but i was unable to brick my phone using the 1.56.651.2 RUU. I was running Flipz updated radio and DamageControl v2.0r2.. The RUU completed successfully..
I was reading over the forum post in http://forum.xda-developers.com/showthread.php?t=645002 and i read that you could boot the system using the command 'fastboot oem boot' I was going to try to use FlashRec to do the work of Flashing the recovery, then booting into recovery and use nandroid.. but you beat me to it! Good work!
Click to expand...
Click to collapse
What do u mean by 3) PC - fastboot oem boot | MAC - oem boot?
blankd3ckskat3r said:
What do u mean by 3) PC - fastboot oem boot | MAC - oem boot?
Click to expand...
Click to collapse
if your using a pc type fastboot oem boot
if your using a mac type ./fastboot oem boot
This!
Thanks Regaw
regaw_leinad said:
if your using a pc type fastboot oem boot
if your using a mac type ./fastboot oem boot
Click to expand...
Click to collapse
Trying this right now.
So far, am getting lots of "mtd: write error" and "mtd: re-read error" Out of memory errors for flashing the recovery image. Guess I'll give this some time, and try to su again and reflash? Or should I kill it as soon as the Out of memory errors pop up and try again?
If you get errors like...
adb shell
su
flash_image recovery .........
(out of memory... etc)
Then...
just su again... so you really su twice
its what I had to do.
imekul said:
Trying this right now.
So far, am getting lots of "mtd: write error" and "mtd: re-read error" Out of memory errors for flashing the recovery image. Guess I'll give this some time, and try to su again and reflash? Or should I kill it as soon as the Out of memory errors pop up and try again?
Click to expand...
Click to collapse
Trying it a second time, and so far am getting a bunch of Out of memory errors. After the first one "finished," I did as you recommended and typed "su" a second time, and then typed the "flash_image recovery /sdcard/recovery.img" command.
So far, looks like it's giving the same errors the second time around.
This second attempt, it ended with "error writing recovery: No space left on device."
Just to be sure, I checked the SD card, and that has over 1 GB of free space.
If you're willing to allow something like logmein.com or some way for me to remote assist you, I would like to try. [email protected] if you're in.
imekul said:
This second attempt, it ended with "error writing recovery: No space left on device."
Just to be sure, I checked the SD card, and that has over 1 GB of free space.
Click to expand...
Click to collapse
Sounds awesome. Thanks. I'll e-mail you now.
Dun Dun Dun... The results are in!
imekul said:
Sounds awesome. Thanks. I'll e-mail you now.
Click to expand...
Click to collapse
dfbonney is the man!!
After a friendly little session on LogMeIn Express, I am good as new! How awesome!!
imekul said:
dfbonney is the man!!
After a friendly little session on LogMeIn Express, I am good as new! How awesome!!
Click to expand...
Click to collapse
We ended up just needing to run
Code:
adb shell
reboot
fastboot oem boot
adb shell
su
//flash commands here
that seemed to do it. so make sure if you're having issues to restart the device and try again!
Edit: Also, we didnt get data.img to work so we only did boot, recovery, and misc.img's

Alternative method: Removing bloatware

Requirements:
- ClockworkMod Recovery on your device
- Know how to reboot into recovery
- Have Android SDK (adb) installed - and familiar with the concept of what it does, and know how to access it via command line - if not look around, it's everywhere on how to do this.
Disclaimer:
- What you do is your fault
Optional:
- Ability to discern what, and what not to remove
Synopsis:
This is a good technique if you're receiving 'read only' errors while trying to remove apps - namely located in /system/app
[size=+3]Method:[/size]
- Reboot into recovery - it's been said in other threads it's best to DISCONNECT USB, power down, boot into recovery and THEN replug the USB connector.
- Using the clockwork menu - navigate down to 'partitions menu' using your volume down button - then hit the power button
- From the partitions menu, select 'mount /system' and hit the power button
- From your Android SDK tools directory - check 'adb devices' - this should indicate your phone is connected and in 'recovery' mode.
e.g.:
Code:
$ adb devices
List of devices attached
HT06BR007742 recovery
- Type 'adb shell' - this will put you into a command line for your phone
- From the command shell: 'cd /system/app'
- To get a list of what you can remove, type 'ls'
- To remove an .apk - type 'rm FileName.apk'
- When you're done, it's suggested you use the clockwork menu to reboot the phone ('back to the main clockwork menu, and 'reboot device')
Further example / note:
Once logged in via 'adb shell' and the system dir is mounted via clockwork:
Code:
/system/app # ls |grep "ATT"
ATT_Maps.apk
ATT_Navigator.apk
/system/app # rm ATT_Navigator.apk
Also, a side note, you can see all available commands for this shell by typing:
Code:
ls /sbin
The list is quite comprehensive.
I hope this helps someone
thanks thinice !
Added to the sticky roll-up.
I'm not 100% on this but I was able to uninstall whatever I wanted through Titanium Backup, including the ATT bloatware once I was rooted.
I am not sure about the Titanium Backup method. I restored to stock rom with root and used Titanium backup to remove some apps. They showed as removed, however when I reboot the phone the apps are back and not removed. I could not get Titanium backup to remove the apps with root alone.
removing AT&T Radio
I have searched the forum and have not yet found the answer to this question...I have removed all of the AT&T apps that I want to remove, except, which apk is AT&T radio?
You talking about fm radio on a sense rom?
Sent from my HTC Liberty using XDA App
Ah, no I'm using my HTC Aria with the stock image. I've rooted it though, and I'm just getting rid of the included AT&T apps I do not want. This one shows up as "AT&T Radio". Just trying to figure out which apk to remove in order to remove this app.
what apps are SAFE to remove without effecting HTC Sense or Aria? we need to make a list of files/apps safe to remove. i heard one user saying removing HTC stocks caused error issues when it tried to sync.
Hello also any luck with change the radio to activate for 1700 mhz UMTS ?
wdlamb said:
Ah, no I'm using my HTC Aria with the stock image. I've rooted it though, and I'm just getting rid of the included AT&T apps I do not want. This one shows up as "AT&T Radio". Just trying to figure out which apk to remove in order to remove this app.
Click to expand...
Click to collapse
AndroidMusic.apk
Thanks, that was exactly what I was looking for.
I've worked on this a few hrs now. I got Clockwork Recovery to work. Figured out HTC Sync was reverting the phone to stock recovery somehow. Removed that though...
Have rerun Unrevoked, and I can get into clockwork. I'm not interested in changing to different ROM now, just removing ATT crap.
When I try sideloading instructions/alternate method for removing ATT stuff, I get an error in cmd:
C:\android\tools>adb remount
remount failed: Operation not permitted
adb devices returns:
List of devices attached:
<myserial#> device
Any ideas? Have I not completed the root access procedure? I thought it was part of the Unrevoked process.
ahren37 said:
I've worked on this a few hrs now. I got Clockwork Recovery to work. Figured out HTC Sync was reverting the phone to stock recovery somehow. Removed that though...
Have rerun Unrevoked, and I can get into clockwork. I'm not interested in changing to different ROM now, just removing ATT crap.
When I try sideloading instructions/alternate method for removing ATT stuff, I get an error in cmd:
C:\android\tools>adb remount
remount failed: Operation not permitted
adb devices returns:
List of devices attached:
<myserial#> device
Any ideas? Have I not completed the root access procedure? I thought it was part of the Unrevoked process.
Click to expand...
Click to collapse
Yes, I think I was getting the same problem so I did a sequence of steps in some weird sequence to actually change it. It went something like this:
1. Make sure your PATH variable is set to Tools folder of Android SDK
2. Boot your phone into Clockwork and connect to PC
3. On your phone go to Partitions Menu and mount /system, then mount USB storage
3. Go to command prompt on your PC change your drive to phone/SD card drive (whatever that is, F:\ in my case)
4. adb remount
5. unmount /system
6. mount /data, mount USB storage
7. adb pull /data/data/com.android.providers.settings/databases/settings.db C:\settings.db
where C:\ is the main PC drive
8. change to C:\
9. echo update secure set value = 1 where name = 'install_non_market_apps';|sqlite3 settings.db
10. change to F:\
11. adb push C:\settings.db /data/data/com.android.providers.settings/databases/settings.db
12. Unmount everything, reboot and sideloading should work
sorting and backup
To see which files take the most space, use du with sort:
Code:
du * | sort -n
If concerned about deleting an important app, try moving it to the sd card instead. First mount the sdcard with the recovery menu, then:
Code:
mkdir -p /sdcard/backup/system/app
mv /system/app/something.apk /sdcard/backup/system/app
Thanks for the guide!
Great I'll try this tonight. Thanks
Sent from my HTC Aria using XDA App
I'm getting errors when attempting to remove the ATT_Navigator and ATT_Maps.
/system/app # rm ATT_Navigator.apk
rm ATT_Navigator.apk
rm: can't remove 'ATT_Navigator.apk': Directory not empty
Same error for both. Any suggestions?
I'm running Liberated 2.1 and ClockworkMod 2.5.0.1.
asiancuta said:
what apps are SAFE to remove without effecting HTC Sense or Aria? we need to make a list of files/apps safe to remove. i heard one user saying removing HTC stocks caused error issues when it tried to sync.
Click to expand...
Click to collapse
Yeah, I think it'll be nice to have a master list so future people won't have to mess with backups.
some I'm curious about is Mobi TV, Mobile banking, Mobile Video, Peep, and mostly if it'll be okay to remove the htc twitter widget.
the only program i ran into any issues with removing was the defalut mms app. i decided to see what would happen if i got rid of that app and replaced it with handcent or chompsms. those programs could still send messages, but i couldn't receive any.
the easiest way to compile a list like that is browse the forums for any preexisting knowledge, then just start testing things for yourself. make a nandroid backup of your rom as it sits, start removing programs, boot normally and see what happens! if theres no errors after you've removed the desired apk, make a new backup, reboot into recovery and keep going at it.

[Help]Data/Partition Recovery

So hey there,
i had a Xiaomi MI A2 lite with some unofficial LOS version on Android 9 running for a longer time stable.
This morning i wanted to check my messages, and it crashed and restarted, the internal memory is filled up since weeks!
It than only wanted to boot into twrp, which i definitively disliked, but whatever, no real problem, will just steal time i thought.
I was still in bed, not awake fully, so i wanted to try out twrp's partition fixing options.
Of course i accidentally wiped my data partition.
Still thought there will be a way, but got stressed more and more ...
so started up my pc and researched, found this forum post: https://android.stackexchange.com/questions/208106/how-to-recover-a-deleted-file-from-data-partition
which told me i could recover /data, just need to find some "Block Device" with "mount | grep 'on /data'", which got me the desired result i think, "/dev/block/dm-0 on /data type ext4 (rw,seclabel,relatime,data=ordered)"
Nice i thought, lets dd that over to the external sd card, got an "Error: 1" ...
I thought maybe it trys to buffer the file somehow on the full disk, so lets move it to a place, which i can access by PC over MTP from twrp, to copy it this way.
So did "dd if=/dev/block/dm-0 of=/external_sd/data.img" inside twrp's terminal, and voila, i had an empty data.img file on my sd, and no trace of "data" on my device any more.
So, is there some way for me now, to dump maybe the whole internal storage into a file through TWRP/ADB?
Or some other idea?
I'm pretty lost right now, i now, its my own fault, should've made a backup, but my 6 TB NAS was full, so i first need to order new HDD's to have space again ...
Had a lot of rly important stuff on that phone ...
Would even be open for commercial ideas ...
Most Android versions come with the Linux TAR utility. Why not pack the contents of data directories you are interested in into an archive - what at any time easily can get unpacked / restored in any location?
Example:
Code:
adb devices
adb shell "mkdir -p -m644 /<external-sdcard-name>/backup"
adb shell "tar -cvzpf /<external-sdcard-name>/backup/DCIM.tar.gz /storage/emulated/0/DCIM
adb pull /<external-sdcard-name>/backup/DCIM.tar.gz C:\DCIM
adp shell "rm -f /<external-sdcard-name>/backup/DCIM.tar.gz"
...
adb shell "tar -cvzpf /<external-sdcard-name>/backup/Musics.tar.gz /storage/emulated/0/Musics
adb pull /<external-sdcard-name>/backup/Musics.tar.gz C:\Musics
adp shell "rm -f /<external-sdcard-name>/backup/Musics.tar.gz"

Categories

Resources