I've posted this as a reply in another thread, but I realised this could come in handy for loads of people having issues with the buggy Orange firmware. Enjoy:
OK so it took me a night without any sleep to work this out but I have successfully unlocked my HTC Hero locked to Orange.
I found out what to do after trying to obtain an unlock code from unlock-now.com and receiving this message
"The default HTC Hero ROM from operator Orange UK contains a bug that prevents the unlock code from being accepted by the phone. In order to unlock your phone you should change the ROM firmware to MoDaCo v2.9 which is an unofficial firmware that fixes this bug.
Flashing an unofficial firmware on your phone will void its warranty and it's not recommended. Please do not purchase the unlock code unless you have already upgraded your Hero's firmware to MoDaCo v2.9 Custom ROM, otherwise you won't be able to unlock it and we will NOT refund your payment because the codes are valid"
So I visited the MoDaCo Android forums and downloaded the 'Core Download of the 2.9 custom ROM.
To get the ROM to install, you have to patch the recovery image of the phone. This is basically a fail safe which the guys @ MoDaCo have realised they can exploit to install thier own ROMs. HOWEVER, following the instructions on thier website on how to patch the recovery image did not work when using the adb command 'fastboot', this is due to the lovely chaps at google trying to close the exploit by updating the recovery image in version 2.73.4xx.x ROM's!
Do not worry though, there is a little application which you can load onto your phone called flashrec to install the special recovery image. You copy the recovery image file (cm-hero-recovery.img) and the flashrecblablabla.apk file onto your SD card, then install the flashrec utitity onto your phone with the "adb install flashblablabla.apk" command from the adb directory in a command prompt window (with phone attached via USB and SD card in phone). This will install the software on the phone (make sure phone is in usb debugging mode - Settings>Applications>Development, otherwise adb command from command prompt wont work!)
Now that the flashrec program is installed, it'll show up as flash recovery or something similar to that in the main applications menu, run it (now from your phone) and delete whats in the text box and type "/sdcard/cm-hero-recovery.img", ensure the cm-hero-recovery.img is actually in the root of your SD card! More details on this here
OK so now switch off the phone and hold down home and on buttons until you get to a green & black screen with some options, this is the newly installed special recovery image which allows you to install the MoDaCo firmware! Rename the zip file you downloaded of the MoDaCo 2.9 rom to 'update.zip' and put it on the root of your SD card using your PC, insert in phone and then select 'wipe/factory reset' option, this clears the phone of all your settings, its good practise to do this, when this has completed, select 'apply sdcard:update.zip' to install, the update takes a long time and seems like its hanging at times but be patient. More info here
When it has finished it will say it has been sucessful, reboot the phone and now wait at least 5 minutes, this takes a long time as its the first time its ever run this new firmware so please be patient, it wont do a lot except show HTC and hero images animations which sometimes don't animate for ages!
Once the phone has booted, enter the time/date, language, etc and patiently wait for it to boot (much slower than normal), once its up and running and not loading anything else, switch the phone off. Now insert the sim card you want to use with the phone. Visit an unlocking site and get the code for your IMEI, now switch phone on and wait for it to notice the sim is not an Orange one, it will now ask for the 8 digit code, enter it, it always says unlocked successfully regardless of the code, but now it should have a little "Unlocking sim card" message but this time, it will dissapear on its own (It just hangs on this screen in the buggy Orange ROM) and the phone will be unlocked for life!!
I personally wanted a original release HTC ROM but after using the MoDaCo ROM for a while, I think its actually better than the standard HTC version! MoDaCo recommend you update the 'radio', this is on the same page where you download the ROM, click here to visit the radio's page, ignore the ROM's at the top of the post, scroll down to the radio's section and get the latest one. Download it and rename it to 'update.zip', now remove the other update.zip from your SD card we used for the ROM and replace it with the radio one, follow same instructions as above regarding booting into recovery image and install update.zip, when its completed, remove battery, re-insert and switch on. You may get a little image of a box with an arrow coming out going to the phone, this is normal, another game of patience, wait for bloody ages, when the phone finally boots you should now have an unlocked, debranded custom firmware with the latest radio release (better reception and reliability!)
HOPE THIS HELPS YOU ALL, PLEASE DO YOUR RESEARCH, I AM UNABLE TO ANSWER PM's!
OK so it took me a night without any sleep to work this out but I have successfully unlocked my HTC Hero locked to Orange.
I found out what to do after trying to obtain an unlock code from unlock-now.com and receiving this message
"The default HTC Hero ROM from operator Orange UK contains a bug that prevents the unlock code from being accepted by the phone. In order to unlock your phone you should change the ROM firmware to MoDaCo v2.9 which is an unofficial firmware that fixes this bug.
Flashing an unofficial firmware on your phone will void its warranty and it's not recommended. Please do not purchase the unlock code unless you have already upgraded your Hero's firmware to MoDaCo v2.9 Custom ROM, otherwise you won't be able to unlock it and we will NOT refund your payment because the codes are valid"
So I visited the MoDaCo Android forums and downloaded the 'Core Download of the 2.9 custom ROM.
To get the ROM to install, you have to patch the recovery image of the phone. This is basically a fail safe which the guys @ MoDaCo have realised they can exploit to install thier own ROMs. HOWEVER, following the instructions on thier website on how to patch the recovery image did not work when using the adb command 'fastboot', this is due to the lovely chaps at google trying to close the exploit by updating the recovery image in version 2.73.4xx.x ROM's!
Do not worry though, there is a little application which you can load onto your phone called flashrec to install the special recovery image. You copy the recovery image file (cm-hero-recovery.img) and the flashrecblablabla.apk file onto your SD card, then install the flashrec utitity onto your phone with the "adb install flashblablabla.apk" command from the adb directory in a command prompt window (with phone attached via USB and SD card in phone). This will install the software on the phone (make sure phone is in usb debugging mode - Settings>Applications>Development, otherwise adb command from command prompt wont work!)
Now that the flashrec program is installed, it'll show up as flash recovery or something similar to that in the main applications menu, run it (now from your phone) and delete whats in the text box and type "/sdcard/cm-hero-recovery.img", ensure the cm-hero-recovery.img is actually in the root of your SD card! More details on this here
OK so now switch off the phone and hold down home and on buttons until you get to a green & black screen with some options, this is the newly installed special recovery image which allows you to install the MoDaCo firmware! Rename the zip file you downloaded of the MoDaCo 2.9 rom to 'update.zip' and put it on the root of your SD card using your PC, insert in phone and then select 'wipe/factory reset' option, this clears the phone of all your settings, its good practise to do this, when this has completed, select 'apply sdcard:update.zip' to install, the update takes a long time and seems like its hanging at times but be patient. More info here
When it has finished it will say it has been sucessful, reboot the phone and now wait at least 5 minutes, this takes a long time as its the first time its ever run this new firmware so please be patient, it wont do a lot except show HTC and hero images animations which sometimes don't animate for ages!
Once the phone has booted, enter the time/date, language, etc and patiently wait for it to boot (much slower than normal), once its up and running and not loading anything else, switch the phone off. Now insert the sim card you want to use with the phone. Visit an unlocking site and get the code for your IMEI, now switch phone on and wait for it to notice the sim is not an Orange one, it will now ask for the 8 digit code, enter it, it always says unlocked successfully regardless of the code, but now it should have a little "Unlocking sim card" message but this time, it will dissapear on its own (It just hangs on this screen in the buggy Orange ROM) and the phone will be unlocked for life!!
I personally wanted a original release HTC ROM but after using the MoDaCo ROM for a while, I think its actually better than the standard HTC version! MoDaCo recommend you update the 'radio', this is on the same page where you download the ROM, click here to visit the radio's page, ignore the ROM's at the top of the post, scroll down to the radio's section and get the latest one. Download it and rename it to 'update.zip', now remove the other update.zip from your SD card we used for the ROM and replace it with the radio one, follow same instructions as above regarding booting into recovery image and install update.zip, when its completed, remove battery, re-insert and switch on. You may get a little image of a box with an arrow coming out going to the phone, this is normal, another game of patience, wait for bloody ages, when the phone finally boots you should now have an unlocked, debranded custom firmware with the latest radio release (better reception and reliability!)
HOPE THIS HELPS YOU ALL, PLEASE DO YOUR RESEARCH, I AM UNABLE TO ANSWER PM's!