from : http://forum.xda-developers.com/showpost.php?p=9310785&postcount=2
from : http://forum.xda-developers.com/showthread.php?t=845512
1。 制作金卡:
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
Code:
cat /sys/class/mmc_host/mmc0/mmc0:*/cid
Code:
adb push goldcard.img /data/local/
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
2。 root and 刷机
[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
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
Code:
adb push flash_image /data/local/
adb push misc1-2.img /data/local/
Code:
chmod 755 /data/local/flash_image
Code:
cat /dev/mtd/mtd0 > /sdcard/misc_backup.img
Code:
/data/local/flash_image misc /data/local/misc1-2.img
exit
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
Code:
adb shell
flash_image misc /sdcard/misc_backup.img
exit
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
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
Code:
cat /dev/mtd/mtd0 > /sdcard/misc_backup.img
Code:
cp /sdcard/flash_image /data/local/
chmod 755 /data/local/flash_image
/data/local/flash_image misc /sdcard/misc1-2.img
Code:
mv /sdcard/LEGEIMG.zip /sdcard/firmware.zip
mv /sdcard/testimage.zip /sdcard/LEGEIMG.zip
Code:
exit
adb reboot bootloader
Code:
adb shell
flash_image misc /sdcard/misc_backup.img
exit
wipe 进去全部wipe
完成之后按“音量键下”返回绿色recovery
滑动到第四项选择flash zip from sdcard,光学键确定,
选择要cm_legend_full-27,光学键确认,再按光学键确认
完成在滑动到第四项选择flash zip from sdcard光学键确定,在刷gapps-gb-20110115-signed完成后第一项光学确定直接重启完成!
注意事项,目前刷完后待机关屏回亮绿灯,可能是我才疏学浅,未找到调解的地方,不算是BUG 其他均完美!谷歌地图自己在豌豆夹里下载最新即可!
遇到问题跟帖回复,本人会持续在线一段时间!