Post Reply

[Guide] build custom rom for HTC devices [NoDo & Mango tested]

OP sandman01

21st August 2011, 11:58 AM   |  #1  
sandman01's Avatar
OP Senior Member
Flag Upper Austria
Thanks Meter: 41
 
185 posts
Join Date:Joined: Dec 2007
More
Hi Dev's!

after finding out how to create my own rom I will explain the progress for everyone.


[1st step - rebuild nbh with parts from different original roms]

At first of all make sure you have RSPL/HSPL installed before you try to create/flash your rom

Download a original rom for your device to start-up
Extract the contens of the *.exe and copy the RUU_signed.nbh to a directory you like (working direktory were you can collect all tools, data during our costumation process)
use nbhTool to extract the *.nb parts from the RUU_singed.nbh
e.g.
Code:
nbhtool.exe -split RUU_signed.nbh Schubert.txt
A textfile file for nbhTool is generated modify it forthe contens you like to rebuild afterwards (e.g radio or os) ==> see attachment for a demo txt file)
rebuild a RUU_unsigned.nbh with nbhTool
e.g.
Code:
nbhtool.exe Schubert.txt
and flash it with an RUU (maybe use a costum RUU for task 29 or 00)
finish


[2nd step modify registry ==> DeveloperUnlock]

Tested official Schubert rom's Nodo & Mango (Europe & Asia) :)

open htcrie_0.7.0.35 and open os.nb (Version includet in WP7 Costum Rom Manual Kitchen)
do not use other versions of htcRIE (e.g. htcRIE_0.7.0.46) cause there is a huge difference when inserting IMGFS into os.nb
click on IMGFS on the left side and click Image => Save Files...
IMGFS.bin should be saved at the location of your choice
use XiDump to extract the contens of IMGFS.bin
Code:
xidump.exe imgfs.bin
The contens should be extracted in the folder IMGFS
go into this folder and copy default.hv to a save place for modifications (thats a hidden file!!)
Drag&Drop default.hv over HVEdit.exe
now a new file is created called default.hvm
delete the default.vh to prevent convusion
edit default.hvm with a text editor
Code:
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg]
    "PortalUrlProd"=""
    "PortalUrlInt"=""
create Key wich doesn't exists at the moment
Code:
[HKEY_LOCAL_MACHINE\Comm\Security\LVMod]
    "DeveloperUnlockState"=dword:1
you can also check/add the key for maximum unsigned apps
Code:
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg\Install]
    "MaxUnsignedApp"=dword:7fffffff
save the file and drag&drop defaul.hvm over HVEdit.exe
a new default.hv is created wich contains you modifications
copy default.hv into the IMGFS folder wich was created before
Quote:

In addition to that you can copy the CustClear.provxml into the root of the IMGFS folder
make sure it is hidden & write protected
the CustClear will be directly in the Windows folder after flashing
so no need to copy CustClear from Ringtones to Windows to unlock the phone after an update via Zune

rename IMGFS folder to "dump"
now rebuild imgfs with ImgFromDump
Code:
ImgfsFromDump.exe IMGFS.bin IMGFS-rebuild.bin
copy IMGFS-rebuild.bin to a save folder & rename it to IMGFS.bin
go to htcRIE-0.7.0.35) and implant IMGFS with following shell comando
Code:
htcrie.exe replace /I imgfs.bin os.nb
next open os.nb with a hex editor and search for following HEX-String
Code:
C7 14 02 80 01 04 00
rewrite the next 4 HEX-Numbers with
Code:
5D D6
save the file
finished

For information the hex code wich is generated from htcRIE compared with the original os.nb hex code.
If you search for differences in this two bin files this was the first one of 14 differences.
Don't know why the others are different but work

for NoDo

Code:
         | htcRIE_0.7.0.35                    | Original
012C72E8 | C7 14 02 80 01 04 00 8B | 012C72E8 | C7 14 02 80 01 04 00 5D |
012C72F0 | FE FF FF C0 20 00 00 FF | 012C72F0 | D6 FF FF C0 20 00 00 FF |
for Mango
Code:
         | htcRIE_0.7.0.35                    | Original
01106830 | C7 14 02 80 01 04 00 8B | 01106830 | C7 14 02 80 01 04 00 5D |
01106838 | FE FF FF C0 20 00 00 FF | 01106838 | D6 FF FF C0 20 00 00 FF |

[3rd step get ready for cab updates/customation]

Use DefaultCerts.dat & MSDefaultCerts.dat (from XBmod-Yuki's HD2 Rom) in your IMGFS to be ready for costum cab updates


[4th step adding OEM apps]

simply copy & overright the files from IMGFS Partition with the *.xap's, *.xml's,...
thanks to itje for mentioned that

thx to itje for the instruction how to dump IMGFS-Contens from OMEGA/ETERNITY roms
Quote:
Originally Posted by itje

dump ruu:

Code:
nbhTool -split ruu_signed.nbh Schubert.txt
dump os.nb:
Code:
xidump -b os.nb

[5th step adding additional languages]
thx to itje for extracting/preparing language packs from ETERNITY rom
Just copy & replace in IMGFS
Languages-Files

[6th step change wallpaper]
thx to -WP7User- to explain the necesarry steps for changing the wallpaper
Copy the pictures you like to have in your rom into IMGFS
add or modify values in default.hv
don't forget the comma if there is more than one wallpaper!!
Code:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\WallpaperSets]
for changing the defauft lookscreen wallpaper look into user.hv and change
Code:
[HKEY_CURRENT_USER\Software\Microsoft\Photos\LockScreen]

XSPL
XSPL posted by Cotulla

Tools
nbhTool posted by ted973
Htcrie posted by Heathcliff74
NbhImageTool posted by DaG
XiDump posted by bepe
ImgfsfromDump posted by airextreme (v2.4.0 won't work for me)
HvEdit posted by ceesheim

Kitchen
WP7 Costum Rom Manual Kitchen posted by xda2_haseeb (instruction for IMGFS editing)
WP7build posted by tslany (only for information)

Registry Keys
Cab Updater
Omega OEM apps

FYI
The attached text file contains all nb entries to rebuild the whole rom expect the spl
You only need the line for radio.nb or os.nb, the rest could be deleted if you do not need them

flash devices only if you know what you are doing, i take no responsible for any damage

thx to itje for creating a nbhMerge textfile for HTC Trophy
Attached Files
File Type: txt Schubert.txt - [Click for QR Code] (272 Bytes, 582 views)
File Type: txt Trophy.txt - [Click for QR Code] (139 Bytes, 257 views)
File Type: zip CustClear.zip - [Click for QR Code] (510 Bytes, 284 views)
File Type: zip Certificates.zip - [Click for QR Code] (16.2 KB, 343 views)
File Type: zip cecompr_nt.zip - [Click for QR Code] (26.9 KB, 232 views)
Last edited by sandman01; 4th October 2011 at 06:42 AM. Reason: HOW-TO Change wallpapers & lockscreen
The Following 15 Users Say Thank You to sandman01 For This Useful Post: [ View ]
24th August 2011, 08:31 AM   |  #2  
sandman01's Avatar
OP Senior Member
Flag Upper Austria
Thanks Meter: 41
 
185 posts
Join Date:Joined: Dec 2007
More
where are all the rom coockers?

Are Ansar & DFT the only one who knows how to make a flashable rom?

Maybe we can use this thead to collect our testing progress
- what do we have tested (also to see wait leads in an corrupt *.nbh)
Last edited by sandman01; 24th August 2011 at 08:50 AM.
24th August 2011, 08:37 AM   |  #3  
drkfngthdragnlrd's Avatar
Retired Recognized Developer
Flag Pacoima, CA
Thanks Meter: 265
 
2,401 posts
Join Date:Joined: Mar 2008
Donate to Me
More
I think you meant "cookers" lol. I don't think there are any "publicly" available tools atm.
The Following User Says Thank You to drkfngthdragnlrd For This Useful Post: [ View ]
24th August 2011, 10:00 AM   |  #4  
Senior Member
Thanks Meter: 10
 
101 posts
Join Date:Joined: Jun 2011
Donate to Me
@sandman01: where did you get the unofficial untouched european HTC HD7 firmware?

I would also love to look inside the rom cooking process. AFAIK there are only a few tools here on XDA, that allow rom manipulation up to a certain degree. And the custom roms need the RSPL or HSPL boot loader to flash the unofficial roms, because the official roms are signed.

However, I did not ever see any of the original roms, which brings me to my first question: where can I get them?
24th August 2011, 10:48 AM   |  #5  
sandman01's Avatar
OP Senior Member
Flag Upper Austria
Thanks Meter: 41
 
185 posts
Join Date:Joined: Dec 2007
More
Hi rudelm!

with RSPL/HSPL you can flash every official HD7 rom.
Look in the HD7 Rom development section for roms you like to analyse
My only requirement is the german language is included in the rom. :)

@drkfngthdragnlrd
thanks for correcting my mistake I've edited my post
24th August 2011, 09:09 PM   |  #6  
thesecondsfade's Avatar
Retired Recognized Developer
Flag Corona, CA
Thanks Meter: 108
 
1,014 posts
Join Date:Joined: Jul 2009
More
Are these WP7 Rom Tools not what you're looking for?
24th August 2011, 09:38 PM   |  #7  
sandman01's Avatar
OP Senior Member
Flag Upper Austria
Thanks Meter: 41
 
185 posts
Join Date:Joined: Dec 2007
More
Quote:
Originally Posted by thesecondsfade

Are these WP7 Rom Tools not what you're looking for?

Not really,
HTCrie is a good Tool but it isn't able to modify nbh files
If you want rom modifications you have to extract the contens and do you work.
e.g. extract os.nb or gsm.nb open it again with HTCrie and modify it
you can include other IMGFS, aso. when opend os.nb with the tool

Howerver you can't combine the *.nb files to a *.nbh when the work is done

For that operation you need something like the NbhImageTool from DaG, but with modifications (mayby the right certificat) to combine the *.nb files to an signed/correct flashabel *.nbh

see first post updated with the tools I already use
Last edited by sandman01; 24th August 2011 at 09:56 PM.
30th August 2011, 03:10 PM   |  #8  
Senior Member
Thanks Meter: 10
 
101 posts
Join Date:Joined: Jun 2011
Donate to Me
Quote:
Originally Posted by sandman01

Hi rudelm!

with RSPL/HSPL you can flash every official HD7 rom.
Look in the HD7 Rom development section for roms you like to analyse
My only requirement is the german language is included in the rom. :)

@drkfngthdragnlrd
thanks for correcting my mistake I've edited my post


about the RSPL/HSPL stuff: I know, OSPL is the one that flashes only the official firmware files. I'm currently flooded with all these new links to more and more roms, it's so damn confusing

Maybe these tools are the right way to look for cooking roms? http://forum.xda-developers.com/show....php?t=1240455
30th August 2011, 03:34 PM   |  #9  
sandman01's Avatar
OP Senior Member
Flag Upper Austria
Thanks Meter: 41
 
185 posts
Join Date:Joined: Dec 2007
More
Quote:
Originally Posted by rudelm

Maybe these tools are the right way to look for cooking roms? http://forum.xda-developers.com/show....php?t=1240455

You are right it's a little bit confusing.

The link you mentioned needs a Costum rom with two modified certificates to work for us.
(DefaultCerts.dat & MsDefaultCerts.dat)
So you wil need a costum rom to be able to make your own update packages. :(
Last edited by sandman01; 30th August 2011 at 03:40 PM.
14th September 2011, 05:58 PM   |  #10  
sandman01's Avatar
OP Senior Member
Flag Upper Austria
Thanks Meter: 41
 
185 posts
Join Date:Joined: Dec 2007
More
custom roms build process solved

see post 1 for tools

Post Reply Subscribe to Thread

Tags
build nbh, wp7
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes