[GUIDE] How To Root HBOOT 1.01 - Legend Android Development

Ok guys I noticed a lot of people are getting stuck with this myself included and for me it was because the information I needed was fragmented all over the place, So here is all the information that I used some parts have been edited to fit the purpose of rooting 1.01 as there is no definative guide at the minute.
1st thing to do is make a goldcard even if you already have a working goldcard make it again mine was working for other phones but wouldnt work for this.
All credit for the goldcard guide goes to BlaY0
BlaY0 said:
Here are few easy steps on how to make Goldcard without taking it out of your phone but you have to be root (VISIONary temproot is fine).
You will be doing this from command prompt:
Code:
adb shell
su
First you need to find out sdcard's CID:
Code:
cat /sys/class/mmc_host/mmc0/mmc0:*/cid
...copy it into text box on http://hexrev.soaa.me/. Now go to http://psas.revskills.de/?q=goldcard and put in the reversed CID you have got on previous web page. Push goldcard.img to your phone via 2nd command prompt:
Code:
adb push goldcard.img /data/local/
...unmount sdcard via Settings, go back to 1st command prompt and make a backup then make goldcard:
Code:
dd if=/dev/block/mmcblk0 count=1 of=/data/local/sdcard_backup.img
cat /data/local/goldcard.img > /dev/block/mmcblk0
sync
exit
You may also pull that backup to your PC:
Code:
adb pull /data/local/sdcard_backup.img .
Click to expand...
Click to collapse
The 2nd guide you will need to use is also by BlaY0
BlaY0 said:
Preface
Because there are too many ppl without any knowledge spreading false findings and statements I decided to write this HOWTO.
Audience
This HOWTO is primarily ment for those who already have rooted Legends but they recently experienced problems flashing CM's or new Vodafone FroYo boot.img.
Background
HBOOT is like a BIOS in our PCs and to cut a long story short it also contains partition table for phone's internal storage. That means it has info on where exactly certain partition starts and how big it is.
At HTC they decided to partition Legend's internal storage this way:
misc 640 kB
recovery 4,375 MB
boot 2,5 MB
system 240 MB
cache 40 MB
data 185 MB
...but as we found out (first with CM nightly) boot partition was a little short for the boot.img to fit in if we had one or more bad cells (sectors) on it. Eventually we found out that quite some Legend's had bad cell on boot partition and those unfortunate souls that owned such phone were unable to upgrade to Vodafone FroYo rooted ROM too.
I think that HTC also recognized that Legend's boot partition was kinda small so they rearanged partition table in HBOOT 1.00 a bit making boot partition bigger (now it is 3 MB) by shrinking recovery partition a little.
So now we know that some of us actually need HBOOT 1.00 in order to flash FroYo's boot.img without a problem. But how do we keep root then?
Prerequirements
Android SDK (primarily adb)
working USB drivers (for adb to work)
goldcard (in case you are trying to flash ROMs with different CID than your phone has)
ClockWorkMod recovery (if your Legend is already rooted)
Rerequirements
Vodafone FroYo OTA update (actually just firmware.zip from OTA)
Legend rooting tools (just testimage.zip)
Hack 4 Legend v5(just misc1-2.img and flash_image)
VISIONary r13(r14 is out also but i haven't tested it yet)
Instructions
I will split instructions into two parts... for already rooted phones and phones that were already updated with Vodafone OTA thus they lost root.
Already OTA updated with HBOOT 1.00
That one is relatively easy. You could also follow Paul's guide but I like my approach better
Connect your phone to your PC. Second you have to install VISIONary r13 into your phone and do the "temproot" procedure. After a successful "temproot" you should be able to adb shell and then su. Fire up command prompt and issue:
Code:
adb shell
su
...you should have root privileges now (showing #). Next thing is backing up misc partition and replacing it with one from hack4legend-v5.zip. Extract this zip somewhere and fire another command promt there. Now you should upload flash_image binary and misc1-2.img:
Code:
adb push flash_image /data/local/
adb push misc1-2.img /data/local/
...switch back to 1st command prompt and change permission of flash_image_binary:
Code:
chmod 755 /data/local/flash_image
...and backup your current misc partition:
Code:
cat /dev/mtd/mtd0 > /sdcard/misc_backup.img
Now flash misc1-2.img:
Code:
/data/local/flash_image misc /data/local/misc1-2.img
exit
...and you are set to downgrade retaining HBOOT 1.00.
Unzip r4-legend-root.zip and find testimage.zip in it. Put it on your phone's sdcard renaming it to LEGEIMG.zip. You can then reboot into bootloader issuing:
Code:
adb reboot bootloader
...from command prompt. Phone will reboot and find LEGEIMG.zip on your sdcard, copy it into RAM and check it. If you get CID error at this point, then you don't have goldcard. Make your sdcard gold and try again. After successful flash and reboot you may remove LEGEIMG.zip from sdcard. Next step is upgrading of rooted FroYo ROM. Put FroYo update ROM zip to your sdcard and install it via ClockworkMod recovery. You may also flash backed up misc partition after that. Still in recovery mode and hooked with your PC switch to command prompt and restore it back:
Code:
adb shell
flash_image misc /sdcard/misc_backup.img
exit
...and reboot.
Click to expand...
Click to collapse
So by now you will be on an unrooted Eclair rom. The third guide I used was by David Cogen
David Cogen said:
I. Before You Begin
1. YOU MUST BE ON VERSION 1.31 IN ORDER TO ROOT THE LEGEND, IF YOU ARE NOT YOU CAN DOWNGRADE USING THIS PROCEDURE.
2. This will erase all the data on your phone so please at least sync your contacts with Google before continuing.
3. You must have HTC Sync version 2.0.33, not a newer version. Uninstall HTC Sync and install this version instead.
1. Download the Rooting Tools
Legend Rooting Tools
2. Unzip them to the C: drive on your computer (so the file path is C:\r4-legend-root\)
3. Turn off your phone and turn it back on by holding down Back and Power until you see Fastboot come up on the screen. Push the Power button while highlighting Fastboot on the phone and Fastboot should show up in red now on the phone (if it doesn’t push Power again until it does).
4. Plug the phone in via USB cable to the computer.
5. Open the folder you extracted to the C drive and double click “step1-windows.bat” and wait for it to finish.
6. Once you see the menu on the phone come back up, navigate to BOOTLOADER and push power, then navigate to RECOVERY using the volume buttons to navigate and the power button to select and the phone should boot to the ! screen.
7. Now on the computer double click the “step2-windows.bat” file and wait for it to finish. (UPDATE 12.13.10 – You MUST have HTC Sync version 2.0.33 not a newer version for step2 to work. Please uninstall HTC Sync and download and install this version instead, unplug then plug your phone back in, then rerun step2-windows.bat).
8. Now you should see a custom recovery screen, using the optical trackpad navigate to Wipe and push on the trackpad to select it. Then navigate to Wipe data/factory reset and select that.
9. Once that is done, push volume down to go back to the main menu and select Flash zip from sdcard and select the rootedupdate.zip file and wait for it to flash. All done, you have root access and can use any root required app! Enjoy!
IV. Load a Custom ROM etc (Optional)
1. Head over to our How To Load a Custom ROM on the HTC Legend procedure and continue with that to load custom ROMs and other fun stuff!
Thanks to Paul at Modaco for his awesome scripts!
Click to expand...
Click to collapse
By now you should have HBOOT 1.01 with a rooted Ecclair ROM and Clockwork Recovery Mod So you can flash any custom rom that you like although I would recommend you try B 0.2
If you use this guide, you do so at your own risk.

wow...nice tutorial

I've requested that this goes in the stickies. Well done mate

FeaRThiS said:
The 2nd guide you will need to use is also by http://forum.xda-developers.com/member.php?u=609649
So by now you will be on an unrooted Eclair rom.
Click to expand...
Click to collapse
Question: So the second guide is to downgrade Froyo 3.5 to Eclair 1.3?

smartsreenath said:
wow...nice tutorial
Click to expand...
Click to collapse
Thanks glad it helped.
TheGrammarFreak said:
I've requested that this goes in the stickies. Well done mate
Click to expand...
Click to collapse
Cheers m8 Might not be the best way but it was the only way I managed to root mine on 1.01.
nxdu said:
Question: So the second guide is to downgrade Froyo 3.5 to Eclair 1.3?
Click to expand...
Click to collapse
Fist FroYo is 2.2 not 3.5 and Eclair is 2.1 not 1.3 but yes it is to downgrade to Eclair so that you can root and then upgrade back to FroYo so you end up with rooted FroYo.

FeaRThiS said:
Fist FroYo is 2.2 not 3.5 and Eclair is 2.1 not 1.3 but yes it is to downgrade to Eclair so that you can root and then upgrade back to FroYo so you end up with rooted FroYo.
Click to expand...
Click to collapse
FroYo is HTC WWE 3.x, and éclair is 1.x and 2.x

Thank you!, so it doesn't matter which version of Froyo you're on but what the Hboot version of your phone is on that varies what guide you'll be using ? mine is asia's 3.15.707.3
Yes , one last thing;o how do I check whether all my contacts are properly syncd with Google ? As gmail does not display any of my contacts, if so how would I go about doing it ?._.
Sent from my HTC Legend using XDA App

TheGrammarFreak said:
FroYo is HTC WWE 3.x, and éclair is 1.x and 2.x
Click to expand...
Click to collapse
Ahh I was talkin Android version not HTC version more confusion.
Sent from my HTC Legend using XDA App

FeaRThiS said:
You will be doing this from command prompt:
Code:
adb shell
su
Click to expand...
Click to collapse
Creating a goldcard procedure
What I did, installed visionary r13, clicked on "temproot now"
Access the adb shell via "cd c:\windows-anroid-sdk\platform-tools\adb shell"
however I got the $ sign and when I typed su it says "permission denied" what might be the problem? sorry._. new to this

Hi Folks,
If you don't mind me asking, do you reckon this will work for HTC Wildfire running 2.2 RUU from shipped ROMs with Hboot of 1.01? TIA.

First I was like... but then I was like
Hey Guys,
I hope someone can help me. I followed some tutorials about rooting the HTC Legend. I followed some steps but when I had to downgrade my HTC Legend it went wrong, whatever I try every methode keeps saying, permission denied. And when I use the RUU Bootloader it says some kind of error:S I really want my Legend to get rooted! Can anyone help me?
Kind Regards Tom

After rebooting the bootloader in the second guide, it can't find LEGEIMG.zip. It says image is wrong. I have the LEGEIMG.zip in goldcard root. please help!

haha123 said:
After rebooting the bootloader in the second guide, it can't find LEGEIMG.zip. It says image is wrong. I have the LEGEIMG.zip in goldcard root. please help!
Click to expand...
Click to collapse
Format your SD card in a card reader, as FAT32, then create the Goldcard as described in the first post in this thread.
Make sure you get a NEW goldcard.img as Blay0 describes in the quoted post, my old Goldcard image I used with the 2.1-update1 no longer worked and I needed to get a new one. I think the CID changed when upgrading to 2.2.
This was my problem and doing what I described above solved my problem.

TheLegendaryJay said:
Format your SD card in a card reader, as FAT32, then create the Goldcard as described in the first post in this thread.
Make sure you get a NEW goldcard.img as Blay0 describes in the quoted post, my old Goldcard image I used with the 2.1-update1 no longer worked and I needed to get a new one. I think the CID changed when upgrading to 2.2.
This was my problem and doing what I described above solved my problem.
Click to expand...
Click to collapse
What about this?:
What I did, installed visionary r13, clicked on "temproot now"
Access the adb shell via "cd c:\windows-anroid-sdk\platform-tools\adb shell"
however I got the $ sign and when I typed su it says "permission denied" what might be the problem?

justcookiesncream said:
What about this?:
What I did, installed visionary r13, clicked on "temproot now"
Access the adb shell via "cd c:\windows-anroid-sdk\platform-tools\adb shell"
however I got the $ sign and when I typed su it says "permission denied" what might be the problem?
Click to expand...
Click to collapse
you could try visionary r14 but r13 worked fine for me and many others.

Is this safe?
(or safe as it can be?)
I was previously rooted, but then the microphone on my handset broke, and I replaced it under warranty.
I now have a new handset, but it's back to the stock Vodafone UK Froyo build, with HBOOT 1.0
I'm really liking the look of Blay0's ROM, but fearful of breaking the phone...

brypie said:
Is this safe?
(or safe as it can be?)
I was previously rooted, but then the microphone on my handset broke, and I replaced it under warranty.
I now have a new handset, but it's back to the stock Vodafone UK Froyo build, with HBOOT 1.0
I'm really liking the look of Blay0's ROM, but fearful of breaking the phone...
Click to expand...
Click to collapse
I would say its as safe as it can be and BlaY0's rom is amazin 1500+ score on quadrant with data2ext
I have personally used this method to root my phone without any problems but if you are on hboot 1.00 there may be a easier/safer way of rooting but I am unsure about that.

Trying it now...
In the 2nd guide, I can't crete the misc_backup.img --> "read-only file system".
Is this the S-ON / S-OFF thing?
How can I get around this?
Thanks.

brypie said:
Trying it now...
In the 2nd guide, I can't crete the misc_backup.img --> "read-only file system".
Is this the S-ON / S-OFF thing?
How can I get around this?
Thanks.
Click to expand...
Click to collapse
Nothing to do with s-on looks like you dont have root when you type su in adb do you get a # ?

FeaRThiS said:
Nothing to do with s-on looks like you dont have root when you type su in adb do you get a # ?
Click to expand...
Click to collapse
Yep - tempRoot using Visionary
EDIT - just figured it out - I still had the SD Card connected as a disk drive to my PC D'oh!

Related

Bootloader 'not allowed'

Dear XDA-Helpers,
First of all I want to apologize. Because likely the most of you will think the answers on my question are already posted. But I've searched and searched and I don't have found the solution. (Yes I saw this thread too: http://forum.xda-developers.com/showthread.php?t=487187 It's the same question but that didn't help too.)
So this is what I did:
I wanted to test out the Eclair 2.0 Rom, so I flashed that over Cyanogen. Then I wanted back to 1.6, and used this method. ( http://www.gphone.org.hk/cgi-bin/ch/topic_show.cgi?id=60&bpg=1&age=0)
So I was on 1.5 and rooted with the one click method. Then I flashed the signed-dream_devphone_userdebug-ota-14721.zip ROM. When that was finished I reboot my G1, and then I wanted to flash Cyanogen, but when I went back to recovery mode, the orignal HTC recovery was back and I was unrooted, now I also cannot flash any DREAIMG.nbh because when I go in bootloader it says "not allowed".
I really don't know what to do now.
Some specs about my G1:
Android G1 with Donut 1.6
Kernel Version: 2.6.29-00479-g3c7df37 [email protected] #19
Build Number: dream_devphone-userdebug 1.6 DRC83 14721 test-keys
About the error of the bootloader:
0028002 not allowed
DREA110 PVT 32B
HBOOT-0.95.0000
CLPD-4
RADIO-2.22.19.261
Sep 2 2008
serial0v
Thanks!
You're not unrooted. You just didn't read the instructions carefully enough.
Use fastboot to flash a modified recovery (I prefer CM's).
Code:
start your phone in fastboot usb mode.
fastboot flash recovery recovery.img
fastboot reboot
Once that is done, go into the recovery and you can flash roms again.
This time FOLLOW the instructions...
After you've flashed the htc recovery image, do NOT restart the phone, simply flash cyanogens rom right after that, THEN reboot.
next time please post in the QnA section
you might also like to try RA-Dream-v1.5.2 - there are lots of extra options in there like partitioning your card for swap, apps2sd etc
garok89 said:
next time please post in the QnA section
you might also like to try RA-Dream-v1.5.2 - there are lots of extra options in there like partitioning your card for swap, apps2sd etc
Click to expand...
Click to collapse
Sorry for wrong section, I was used to use RA-Dream recovery, but since I don't have root anymore, I cannot flash a other recovery..
Bavilo said:
You're not unrooted. You just didn't read the instructions carefully enough.
Use fastboot to flash a modified recovery (I prefer CM's).
Code:
start your phone in fastboot usb mode.
fastboot flash recovery recovery.img
fastboot reboot
Once that is done, go into the recovery and you can flash roms again.
This time FOLLOW the instructions...
After you've flashed the htc recovery image, do NOT restart the phone, simply flash cyanogens rom right after that, THEN reboot.
Click to expand...
Click to collapse
Well, when I typ 'su'/'sudo' in Terminal Emulator, it says no permission or something, so I think I don't have root anymore.. will your method fix my Bootloader? I used to get a screen with some skateboard but now I get a screen with a few colours.. and then it says 'not allowed'
Well when you flash the htc recovery image and then reboot the phone it will flash the stock recovery. That's why you need to flash cyanogens rom right after it.
But I don't really see why you're at the stock bootloader again now.
So you're on 1.6 with the stock bootloader? And the bootloader won't flash the .NBH, Looks like you need a goldcard.
Thanks for your answer!
Bavilo said:
Well when you flash the htc recovery image and then reboot the phone it will flash the stock recovery. That's why you need to flash cyanogens rom right after it.
But I don't really see why you're at the stock bootloader again now.
So you're on 1.6 with the stock bootloader? And the bootloader won't flash the .NBH, Looks like you need a goldcard.
Click to expand...
Click to collapse
yes I'm on 1.6 with the coloured boot loader and I can't flash a .NBH file, it says not allowed. What is a goldcard? You mean this? http://revskills.de/pages/goldcard.html
It says I need to give them my SD Card Serial (CID), but I have no idea what it is and where I can find it..
Here now the problem is that you cannot flash anything from the bootloader coz its telling 'Not allowed' And not even flash through recovery coz its the non - Rooted Stock one...
So here you go may be this would help you to get out of this problem.
First try this...
1. Get Amon_RA Recovery image into any folder.
2. Then Start your Phone in Boot loader mode
3. Open Command Prompt on your PC (Windows > Run > Type 'cmd' > Enter)
4. Browse to the folder where the Recovery image is located using cd <folder>
5. Connect the Phone to the PC via USB
6. Type fastboot boot <recovery_img_name.img> in the cmd window.
The Phone may boot into the Rooted Recovery...
If Not Try this..
Remember when G1 was first rooted ?
We had to type telnetd and then it installed the telnet application...
Try it...
Put the downloaded recovery image into the sdcard means /sdcard/recovery.img
1) Go to the Terminal emulator & type "telnetd" and press enter.
2) Press Home
3) Goto the market and download "Telnet"
4) Open Telnet and connect to localhost : 23
5) Press enter and you should see a #
6) Now type the following and press enter at the end of each line
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd sdcard
flash_image recovery cm-recovery-1.4.img
cat /sdcard/recovery.img > /system/recovery.img
7) Now try going into Recovery mode hope this might work...
Then Post ur info here...
Thank you!
sangeet.003 said:
Here now the problem is that you cannot flash anything from the bootloader coz its telling 'Not allowed' And not even flash through recovery coz its the non - Rooted Stock one...
So here you go may be this would help you to get out of this problem.
First try this...
.....
If Not Try this..
...
Then Post ur info here...
Click to expand...
Click to collapse
Thank you for your answer!
The first method did not work because, when I go in Bootloader my PC don't detect that the G1 is connect, it just don't do anything.
The second method didn't work too, because when I typ in terminal 'telnetd' it says no permission...
He can't flash from the boot loader as he doesn't have the engineering boot loader installed.
The other option might work though. If not, a goldcard will be the only way out.
This process is a bit tricky though.
First of all you will need the cid of your sdcard, to get this, type the following command in the terminal emulator.
Code:
cat /sys/class/mmc_host/mmc1/mmc1:*/cid > /sdcard/serial.txt
The cid will be saved within the root directory of your sdcard.
Now comes the tricky part, you need to reverse the string byte-wise. Here is an example.
This is what your cid can look like.
Code:
03534453553038478021021a320087be
Now split it up in pairs.
Code:
03|53|44|53|55|30|38|47|80|21|02|1a|32|00|87|be
Next, reverse the string byte-wise.
Code:
be|87|00|32|1a|02|21|80|47|38|30|55|53|44|53|03
Your reversed cid will look like.
Code:
be8700321a0221804738305553445303|
Now, take that cid and plug it into the goldcard generator you posted earlier and enter your email.
https://ssl.webpack.de/revskills.de/pages/goldcard.html
You will be send an goldcard.img file.
This last part is important and requires knowledge with linux and the dd command
1. Format your sdcard with Fat32.
2. Open a shell and type dd if=location_of_goldcard/goldcard.img of=/dev/sdx(where x is the letter that stands for your sdcard)
3. When it gives you a prompt saying the write was successful, drag the .NBH to the root of the sdcard, plug it in your G1, and try again.
You are welcome to hit me up on MSN if you need further assistance.
thierrz said:
Thank you for your answer!
The first method did not work because, when I go in Bootloader my PC don't detect that the G1 is connect, it just don't do anything.
The second method didn't work too, because when I typ in terminal 'telnetd' it says no permission...
Click to expand...
Click to collapse
That's because you're on 1.6. I believe this only worked in 1.0 where the keyboard was attached to a root console, so anything you typed on the keyboard would go straight to the console with root permissions. This flaw has been fixed.
Bavilo said:
Code:
cat /sys/class/mmc_host/mmc1/mmc1:*/cid > /sdcard/serial.txt
Click to expand...
Click to collapse
And again, permission denied
Problem solved, a goldcard was needed.
This thread can be closed.
Solved!
okay, it's solved! Thanks to Bavilo for helping me out on msn
Thanks al others for helping!

How To: Get back to stock 2.1, stock recovery and S-ON for an RMA

The other day my phone's touchscreen developed a dead spot. Verizon was kind enough to send me a "Like-New" replacement and requested that I return the old phone. The only problem with that was I had hacked the hell out of it and didn't want them to see what I did and charge me.
I had rooted the phone, installed Clockwork Recovery, set S-OFF with Unrevoked Forever, updated to the latest radio and installed all kinds of different ROMs before finally settling on CM6. Now I had to find a way to install either stock 2.1 or stock 2.2 with the correct radio for either one, flash back the stock recovery, and finally set the phone back to S-ON. If you find yourself in a similar situation, you'll probably want to read this instead of spending 6 hours pulling your hair out, like I did. Here's what I finally came up with:
STEP 1: Get ADB Running.
Make sure you have ADB up and running. If you're rooted with a custom ROM and you don't have ADB running you have more problems than I can help you with. If you use a Mac, see Step 1A below to make things a little easier when using ADB.
Step 1A: (Mac Users Only) Make Your Life Easier.
Let's add the android SDK tools folder to your .bash_profile. What does this do, you ask? It makes it so that you can run any ADB commands without having to be in your SDK Tools directory. How do we do this?
Open a terminal window. Type
Code:
nano ~/.bash_profile
This will open a text editor in the terminal and create a new text file in your home directory called .bash_profile, which will be invisible in the Finder.
Enter the following:
Code:
PATH=$PATH:/Applications/Utilities/android-sdk-mac_86/tools
export PATH
!!IMPORTANT!! I have my "android-sdk-mac_86/tools" folder inside my "Utilities" folder, which is inside the "Applications" folder. If you have your android sdk folder somewhere else you will have to change the above text to reflect the proper path to your folder.
Hit ctrl-x. Not cmd-x, ctrl-x.
The editor will ask you if you want to save changes. Press "Y".
It will ask you what you want the file name to be. Just press enter, as we've already named it .bash_profile.
Quit and re-open terminal.
You can now use any command in the SDK tools folder from any directory.
STEP 2: Install Fastboot.
Make sure you have the HTC Fastboot tool installed. If you don't, you can get it here: http://developer.htc.com/adp.html
Download it for your particular operating system.
Another tip for Mac users: Once you download and unzip it, rename it from "fastboot-mac" to just "fastboot", then place it in your SDK Tools directory.
STEP 3: Downgrade To 2.1 With Old Radio.
We now need to downgrade our radio and get back to stock 2.1. The best way I found to do this was explained in this thread: http://forum.xda-developers.com/showthread.php?t=757927
Download the zip and follow the instructions.
Hat tip to Berzerker7 for the write-up, and aiccucs for putting together the zip file in that thread.
The next step will be a little bit of backtracking, but it's mostly painless, and it still seems to be the easiest way to do this.
STEP 4: Set NAND To S-ON.
We now need to set the NAND to S-ON. Problem is, in step 3 we flashed the stock recovery back onto the phone. Not a huge issue.
First, go to unrevoked.com and download unrevoked3. Run it. This will re-root the phone and install Clockwork recovery. Once this is done, go here: http://unrevoked.com/rootwiki/doku.php/public/forever and download the unrevoked-forever S-ON Tool.
Copy this file to your SD card and rename it "update.zip"
You can do that with adb like this:
Code:
adb push /path/to/unrevoked-forever-son.zip /sdcard/update.zip
Reboot into recovery and use Clockwork to apply the patch, which will set the NAND back to S-ON.
STEP 5: Get The Phone To Accept Stock Recovery With S-ON
This was the biggest problem that I ran into. The phone would regurgitate every zip I found which contained a stock recovery when the phone was set S-ON. I finally found a way around that.
First, download this PB31IMG.zip file: http://d01.megashares.com/index.php?d01=CHoQD3B
This IMG file was posted by Diego Mejia, on a youtube video he uploaded. Thanks to Diego, his work was very helpful in this process.
Here's the catch: in order to apply this PB31IMG.zip, we need to downgrade HBOOT or we'll get an error, due to the fact that we had set S-ON in the previous step.
Here is a link to a post on androidforums.com with an attached zip file called "revert.zip": http://androidforums.com/incredible-all-things-root/123816-how-revert-back-earlier-version-hboot.html
Credit is due to adrynalyne for coming up with this process and posting the files, I just tweaked his instructions a bit to make them work for me.
Once the "revert.zip" file has been downloaded, follow adrynalyne's instructions on what to do with the files. Reposted below:
Boot the phone into Clockwork Recovery.
Go to partitions, and mount data.
Type the following commands in a terminal window:
Code:
adb push flash_image /data
adb push mtd0.img /data
adb shell
chmod 777 /data/flash_image
cd /data
flash_image misc mtd0.img
exit
adb reboot oem-78
Watch for your phone to reboot to a silver HTC logo.
Then type:
Code:
fastboot devices
Verify your device shows up/responds/etc.
Click to expand...
Click to collapse
If the "fastboot" command works you should see an "H" followed by a string of random numbers and letters. So far, so good.
STEP 6: Reapply Stock 2.1 With Stock Recovery.
Once you've run the "fastboot" command successfully, go ahead and pull the battery. Leave the phone off. Go back to the PB31IMG.zip you downloaded in step 5, and copy it to the root of your SD card. Put the SD card back in the phone and boot it into recovery. If you've done all this correctly, the phone should recognize the PB31IMG.zip as valid and ask if you want to apply it. Do so. This will reflash the stock 2.1 ROM with the stock recovery while the phone is set S-ON. You can now send your phone back to Verizon.
STEP 7: Profit.
--B
Hey Mods, any chance of a sticky?
--B
There's a much easier/faster way to do this:
Just S-ON before you downgrade a first time, and then flash_image misc right away. The PB31IMG will take and you'll be at 2.1 with a single RUU flash.
Berzerker7 said:
There's a much easier/faster way to do this:
Just S-ON before you downgrade a first time, and then flash_image misc right away. The PB31IMG will take and you'll be at 2.1 with a single RUU flash.
Click to expand...
Click to collapse
Interesting. I couldn't get RUU to jive for some reason and didn't happen upon the bit about the flash_image until I'd already gone around in circles for several hours. Cool if the shortcut works, though! Where was your info at one o'clock this afternoon when I needed it?
--B
xraystyle said:
Interesting. I couldn't get RUU to jive for some reason and didn't happen upon the bit about the flash_image until I'd already gone around in circles for several hours. Cool if the shortcut works, though! Where was your info at one o'clock this afternoon when I needed it?
--B
Click to expand...
Click to collapse
Not reading your topic. lol
I found it easier, to just since your rooted already, just put it to S-on, then run the stock RUU for 2.2. and your done in two steps. no need for all the codes.... I just did it, got my refurb yesterday,...
Thanks for the informative post! This will help a lot of people in the future.

[HOWTO] Update HBOOT to 1.00 keeping your Legend rooted

CAUTION!! By upgrading HBOOT to 1.00+ you loose the ability to S-OFF your Legend!!!
Preface
Because there are too many ppl without any knowledge spreading false findings and statements I decided to write this HOWTO.
Audience
This HOWTO is primarily ment for those who already have rooted Legends but they recently experienced problems flashing CM's or new Vodafone FroYo boot.img.
Background
HBOOT is like a BIOS in our PCs and to cut a long story short it also contains partition table for phone's internal storage. That means it has info on where exactly certain partition starts and how big it is.
At HTC they decided to partition Legend's internal storage this way:
misc 640 kB
recovery 4,375 MB
boot 2,5 MB
system 240 MB
cache 40 MB
data 185 MB
...but as we found out (first with CM nightly) boot partition was a little short for the boot.img to fit in if we had one or more bad cells (sectors) on it. Eventually we found out that quite some Legend's had bad cell on boot partition and those unfortunate souls that owned such phone were unable to upgrade to Vodafone FroYo rooted ROM too.
I think that HTC also recognized that Legend's boot partition was kinda small so they rearanged partition table in HBOOT 1.00 a bit making boot partition bigger (now it is 3 MB) by shrinking recovery partition a little.
So now we know that some of us actually need HBOOT 1.00 in order to flash FroYo's boot.img without a problem. But how do we keep root then?
Prerequirements
Android SDK (primarily adb)
working USB drivers (for adb to work)
goldcard (in case you are trying to flash ROMs with different CID than your phone has)
ClockWorkMod recovery (if your Legend is already rooted)
Rerequirements
Vodafone FroYo OTA update (actually just firmware.zip from OTA)
Legend rooting tools (just testimage.zip)
Hack 4 Legend v5(just misc1-2.img and flash_image)
VISIONary r13(r14 is out also but i haven't tested it yet)
Instructions
I will split instructions into two parts... for already rooted phones and phones that were already updated with Vodafone OTA thus they lost root.
Already OTA updated with HBOOT 1.00
That one is relatively easy. You could also follow Paul's guide but I like my approach better
Connect your phone to your PC. Second you have to install VISIONary r13 into your phone and do the "temproot" procedure. After a successful "temproot" you should be able to adb shell and then su. Fire up command prompt and issue:
Code:
adb shell
su
...you should have root privileges now (showing #). Next thing is backing up misc partition and replacing it with one from hack4legend-v5.zip. Extract this zip somewhere and fire another command promt there. Now you should upload flash_image binary and misc1-2.img:
Code:
adb push flash_image /data/local/
adb push misc1-2.img /data/local/
...switch back to 1st command prompt and change permission of flash_image_binary:
Code:
chmod 755 /data/local/flash_image
...and backup your current misc partition:
Code:
cat /dev/mtd/mtd0 > /sdcard/misc_backup.img
Now flash misc1-2.img:
Code:
/data/local/flash_image misc /data/local/misc1-2.img
exit
...and you are set to downgrade retaining HBOOT 1.00.
Unzip r4-legend-root.zip and find testimage.zip in it. Put it on your phone's sdcard renaming it to LEGEIMG.zip. You can then reboot into bootloader issuing:
Code:
adb reboot bootloader
...from command prompt. Phone will reboot and find LEGEIMG.zip on your sdcard, copy it into RAM and check it. If you get CID error at this point, then you don't have goldcard. Make your sdcard gold and try again. After successful flash and reboot you may remove LEGEIMG.zip from sdcard. Next step is upgrading of rooted FroYo ROM. Put FroYo update ROM zip to your sdcard and install it via ClockworkMod recovery. You may also flash backed up misc partition after that. Still in recovery mode and hooked with your PC switch to command prompt and restore it back:
Code:
adb shell
flash_image misc /sdcard/misc_backup.img
exit
...and reboot.
Rooted Eclair Voda FroYo or CM with HBOOT 0.43
Since you have already rooted phone we can prepare everything before we start. Hook your phone to your PC. Put FroYo ROM update zip to phone's sdcard. Put also misc1-2.img and flash_image from hack4legend-v5.zip and testimage.zip from r4-legend-root there. Extract Vodafone FroYo OTA and put firmware.zip to your phone's sdcard renaming it to LEGEIMG.zip. Reboot into bootloader from command prompt:
Code:
adb reboot bootloader
...bootloader will find LEGEIMG.zip extract it into RAM and check its integrity. If you get CID error at this point you don't have gold card. Make your sdcard gold and retry the procedure.
After successfull flashing of LEGEIMG.zip (firmware.zip from FroYo OTA) you have HBOOT 1.00, new (unrooted) recovery, new (unrooted) boot but old and intact system with superuser.apk and su. Reboot. When system is available, tick "USB debugging" in Settings->Applications->Development. After that you will be able to adb shell into your phone. Fire up some command prompt and issue:
Code:
adb shell
su
...while phone screen is still on. Superuser will pop-up. Grant it. Now make a backup of misc partition:
Code:
cat /dev/mtd/mtd0 > /sdcard/misc_backup.img
...now copy flash_image from sdcard to internal storage, change its permissions, and flash misc1-2.img:
Code:
cp /sdcard/flash_image /data/local/
chmod 755 /data/local/flash_image
/data/local/flash_image misc /sdcard/misc1-2.img
...rename LEGEIMG.zip to firmware.zip and testimage.zip to LEGEIMG.zip:
Code:
mv /sdcard/LEGEIMG.zip /sdcard/firmware.zip
mv /sdcard/testimage.zip /sdcard/LEGEIMG.zip
...exit from adb shell and reboot into bootloader:
Code:
exit
adb reboot bootloader
Phone will reboot, find LEGEIMG.zip and flash it over. You will end up with HBOOT 1.00 and downgraded and rooted recovery. Boot into ClockworkMod recovery and flash Voda FroYo custom update of your choice from your sdcard. You may also want to restore backed up misc partition after updating is done:
Code:
adb shell
flash_image misc /sdcard/misc_backup.img
exit
...and reboot.
Goldcard (no remove, no format, no data loss)
Here are few easy steps on how to make Goldcard without taking it out of your phone but you have to be root (VISIONary temproot is fine).
You will be doing this from command prompt:
Code:
adb shell
su
First you need to find out sdcard's CID:
Code:
cat /sys/class/mmc_host/mmc0/mmc0:*/cid
...copy it into text box on http://hexrev.soaa.me/. Now go to http://psas.revskills.de/?q=goldcard and put in the reversed CID you have got on previous web page. Push goldcard.img to your phone via 2nd command prompt:
Code:
adb push goldcard.img /data/local/
...unmount sdcard via Settings, go back to 1st command prompt and make a backup then make goldcard:
Code:
dd if=/dev/block/mmcblk0 count=1 of=/data/local/sdcard_backup.img
cat /data/local/goldcard.img > /dev/block/mmcblk0
sync
exit
You may also pull that backup to your PC:
Code:
adb pull /data/local/sdcard_backup.img .
BlaY0 said:
Reserved...
Click to expand...
Click to collapse
awosome , I think you must have found some method to crack the SPL? just as desire do ?
waiting
There's actually no cracking of SPL involved...
Hi blay0,
I follow your link to vodafone ota update and appoint me to the website, where is the the link to download it?
Thanks.
Sent from my HTC Legend using Tapatalk
BesFen said:
Hi blay0,
EDITED: I got it, thanks
Click to expand...
Click to collapse
THX
@blay0:
thanks you are great developer.
so if you could temproot automated so you could build pc software to root legend with one click automatically like as wildfire desire ......
thx again
Hmm, I don't understand what are you trying to say???
Sent from my HTC Legend
BlaY0 said:
Hmm, I don't understand what are you trying to say???
Sent from my HTC Legend
Click to expand...
Click to collapse
in htc wildfire rooting process will do Unrevoked 3 for Wildfire
is it possible to automated above process?
VISIONary has an option to "temproot" on every boot.
But I don't see why you would do that if you can root the way I described.
Sent from my HTC Legend
Thanks Blayo ...
@ Blayo
I have some doubts regarding OTAs .. Please check your PM
The primary use of OTA here is just to extract firmware.zip flashing it to upgrade HBOOT. This is not HOWTO for updating the whole system via OTAs.
Sent from my HTC Legend
After flashing firmware.zip, the phone wont boot. Stuck at the HTC logo. What should I do?
Hey guys , im really troubled gettin permission denied on push.
any suggjestions? googled loads of it but nothing related to my issue
Edit: i got root tru visionary yes , it aply's well and su promts for permission so i guess i got root
so was wondering why i keep gettin permission denied on any command in adb
Second EDIT : Nevermind total noobness , forgot i cant push within adb shell.
Hats off to BlaY0 for another amazing work.
rajasyaitan said:
Hats off to BlaY0 for another amazing work.
Click to expand...
Click to collapse
Yes indeed m8 , thanks for your efforts!
Finaly unlocked the Hboot 1.00 running rooted ota froyo
/bow 2 BlaYo.
You're awesome.
Amazing, thanx a million!!
Keeps the Legend running smoothly with custom Froyo Modaco rom.................
I used this guide after my downgrade to Rom 1.31 with HBoot 1.00 and it worked like a charm ! Thank you !
wow You're awesome

[Q] Broken Recovery

Hey there - hope somebody can help me!
* I've got a G1, which was ROOT and on Cynogenmod6.1
* I followed a guide to unroot my device and bring it back to 1.6 with normal SPL ..
Today, I wanted to root my phone again and update it again to Cyanogenmod6.1.
Installed RomManager and ClockwordMod-Recovery. Bootet to the Recovery and chosed "Update Zip". I wanted to flash the DangerSPL. That's the point everything crashed....
I can't start CWM-Recovery again, pressing HOME+POWER just brings me to the (original?) Recovery, which doens't accept any update.zip.
Hope I could fix it with Terminal or with TelnetD, but i can't.
What can i do? Help me please
FACTS:
Model: T-Mobile G1
Firmware: 1.6
Baseband: 62.50S.20.17U_2.22.19.26I
Kernel: 2.6.29-00479-g3c7df37
[email protected] #19
Build#: DRC92
Would be interesting to know, what SPL is installed.
If you had an engineering SPL, fastboot is you friend, you can flash a new recovery image directly.
Otherewise, if you do not have root access, I would suggest to boot the phone, install AndRoot / OneClickRoot or something like that and gain root access again. Then, having root access, you should be able to flash a new recovery using flash_image.
Hey there. It's the normal SPL. The one with the coloured background >.>
And, i've got root - but the flash_image thing isn't working. With no programm..
(Terminal/Flashrec/..)
):
Did you follow the instructions from here? There you can find a link to the flash_image binary, too.
You need to extract the zip, copy the flash_image binary on sdcard and probably you need to change the attributes to executeable (i am not sure). Then you need to copy the recovery.img to sdcard, too. After that, open the terminal application on your phone, go to super user mode and execute
/sdcard/flash_image recovery /sdcard/recovery.img
Click to expand...
Click to collapse
Hey!
I made it the way with the Terminal and with the ADB, but both times i get the message "/sdcard/flash_image: permission denied.
--
Edit: Ok i just played around with ADB and it works now. Thanks for you help!
kamikatze004 said:
Hey!
I made it the way with the Terminal and with the ADB, but both times i get the message "/sdcard/flash_image: permission denied.
Click to expand...
Click to collapse
Is sdcard mounted? If yes, do a
chmod +x /sdcard/flash_image
Click to expand...
Click to collapse
and try it again.

[Q] Flashing CM7

Hi all!
Last week I bought a used but still good-looking T-Mobile G1 (HTC Dream). The previous owner has rootet it (Android 1.6 is installed) and this are the infos:
Firmware-version: 1.6
Baseband-version: 62.50S.20.17U_2.22.19.26I
Kernel-version: 2.6.29-00479-g3c7df37
[email protected] #19
Build-number: DRC92
Click to expand...
Click to collapse
I looked through the forums here on XDA and found a laggy ICS-port, so I want to flash Gingerbread (CM7).
I've already flashed my Galaxy S, a friend's Galaxy R and my Asus Transformer tab, without any problems.
But flashing HTC-devices seems a little bit more complicated.
So what do I need to do? In the CyanogenWiki there's 'Danger_SPL' mentioned, guess I'll need it?
I don't need a looooong step-by-step-guide the correct threads or pages would be enough.
Thanks,
Lunch
need to know more about your phone, boot into bootloader mode (hold power + camera)
write down everything on this screen
DREA110 PVT 32B
HBOOT-0.95.0000
CPLD-4
RADIO-2.22.19.26I
Sep 2 2008
Serial 0
Click to expand...
Click to collapse
(at the moment it's connected with my PC for chrarging, this should explain Serial 0, right?)
Hope this helps.
ok so even if it is rooted the radio and spl need to be updated, which recovery is on there. (power on holding home button)
Ok, I bought it like this and didn't change anything...
Recovery: Android system recovery <2e>
(blue font)
ok you want amonra's recovery found here
http://wiki.cyanogenmod.com/wiki/HTC_Dream:_Rooting
this guide will help you root and update your phone, being your phone is rooted do not flash the dreaming.nbh or you will be reverted back to android 1.0 and loose root
you want to skip that step and go to flash amonra via terminal emulator
then update radio via recovery
then update to danger spl (must have radio updated first or you will brick!)
then i recommended flashing cm5 + gapps found in this link
once you finished this and confirmed all is working you want to update radio and spl further to be able to flash the newest roms, info here:
http://forum.xda-developers.com/showthread.php?t=831139
good luck and let me know if you get stuck (also the search function in xda is great and most of your question will have been answered, peek around a bit its more rewarding than having your hand held)
Thanks a lot for your help, I'll try it!
One quick question about the Telnet-app: do I have to write flash_image recovery /sdcard/recovery.img into the left text field and 23 in the right?
Error while connecting to server: localhost/127.0.0.1:23 - Connection refused
What do I do wrong? With Terminal Emulator the command isn't found...
telnet may not work thats ok
in terminal emulator you need to give yourself superuser permissions first
type su
then say yes to prompt
you are rooted right? do you have superuser.apk in app drawer?
Yes, I'm rooted and I'm su in Terminal Emulator.
Then there's this message: flash_image: not found
But the file is on the root of the sdcard, named recovery.img ...
And when navigating to /sdcard via Terminal Emulator and typing ls I see the recovery.img-file...
if you use windows it will auto add extentions, ie if you name it recovery.img it will read recovery.img.img
try naming it just recovery
also if it came in a .zip make sure you extract it so its a .img
Sent from my HTC Vision using xda premium
No, it's definetely named recovery.img ...
Is there another possibility to flash the recovery-file (via ADB for example)?
yes adb should work fine. i cant remember the command to type when you in adb but just by typing adb into the cmd you will get a list of commands including how to push the file/image you need.
Sent from my HTC Vision using xda premium
cd <adb-folder>
adb devices
adb shell
su
adb flash_image recovery /sdcard/recovery.img
Click to expand...
Click to collapse
Would this be possible (I can't test it now, phone is charging atm).
Thanks
that might just be perfect, but you said that didnt work from terminal emulator and a shell is nearly the same,
its worth a shot. being you are rooted you can try the orange.nbh and you will have an engineering spl where fastboot commands work and i can easly explain those (i dont use adb much but have used fastboot many time) so if adb dosent work for you check out one of the many guides out there or try ornage.nbh and fastboot
Sent from my HTC Vision using xda premium
Same message: flash_image: not found, but with ls I can see it...
Ok, my phone is rooted, I have the Superuser-app in my app drawer, I'm root when accessing the sdcard, I see the file when typing ls. What do I do wrong?
I've never run in trouble when rooting my Galaxy S or my Transformer tab. But my G1 seems quite defiant.
well not being there its hard to say, now try the ornage.nbh
youll find this file in the development section under ezterry's thread under 2708+ update 14mb ram hack. rename the image dreaming.nbh and put it on sdcard. now boot into hboot (power+ camera) and say yes to the prompt. this will allow you to use fastboot and allow you to flash recovery, radio and spl. when/if this all works then boot into recovery (home + power) and flash rom
Sent from my HTC Vision using xda premium
Ok, I'll try, thanks!
Just to go sure:
- I download orange-1.58......nbh from here: http://forum.xda-developers.com/showthread.php?t=831139 , rename it and put it onto my sdcard
- Flash it in fastboot (fastboot = hboot?)
- Flash Amon_Ra-recovery from cyanogenwiki
- flash spl (radio needed too?)
- ?
Don't want to mix in, but just some few stuff you should know:
Fastboot is a sort of recovery on your pc, although this has much more safety measures.
That .nbh file is a file that is a fresh new start to your phone: Like you have a new phone
From Fastboot you can flash a recovery, that you can take with you everywhere
The SPL/RADIO are BOTH needed to succeed. Cheers and if I made any mistakes, please point me to them
fastboot is within the bootloader. it is a .exe program in your sdk package and works similar to adb. the orange.nbh needs to be renamed dreaming.nbh and when you boot into your bootloader it will rewrite your recovery, radio, system, spl etc
the new hboot you get will have a fastboot option in it. connect the phone via usb and when in fastboot mode you will see fastboot usb in red on your phone. you will open a cmd in the same way as adb and will type fastboot devices just live adb to make sure you are attached.
the rest is explained in the op of that thread
Sent from my HTC Vision using xda premium

Categories

Resources