• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

How to Reconstruct a Dumped ROM & Reconstructed ROMs

Search This thread

jcespi2005

Senior Member
Feb 15, 2006
2,379
190
50
Madrid
This is the procedure to convert the dumped ROM into NBH "flashable" file. I take no responsability in any damage on your device. If you're not sure what you're doing, take time to learn some basics from wiki.

Well, i manage to reconstruct the spanish dumped rom from my Kaiser. This thread is about how to reconstruct a dumped Kaiser ROM, to have the original ROM that cames with your Kaiser, so you can revert to origin.

1. First of all is to Dump the ROM from your device. For this you only need to go to Pof post here and follow the instructions. After dumping the ROM you'll have 4 RAW files. Take apart in one folder the Part01.raw that contains the XIP and Part02.RAW that contains the IMGFS, both needed for the reconstruction process.

2. Download the WWE BaseROM to use in the reconstruction process here http://rapidshare.com/files/5781641...dio_sign_22.45.88.07_1.27.12.11_Ship.rar.html or http://rapidshare.com/files/1205992....5_radio_sign_22.45.88.07_1.27.12.11_Ship.exe

3. Download the modified version by Alex of Kaiser Kitchen here, that allows to reconstruct the ROM from the dump. The Kaiser Kitchen allows to cook a ROM from a dumped one and from base NBH shipped one. You need to put the NBH file from the step before in the BaseROM folder, and put the RAW files too. Then execute the KAISERKITCHEN.CMD and choose the next options from the menu it this order:
e, b (for dumped ROM), c, b, choose BuildOS tab, Load ROM option, Choose the KaiserKitchen folder, Go > Option, Close BuildOS, in the HRT choose ROM Builder, Choose Kaiser in device list, in the System button choose the os-new.NB file from the Kaiser Kitchen folder, press the BuildROM button and save as RUU_signed.NBH

Thanks to JugglerLKR for help me and the knowledge to solve the issues into reconstructed ROMs, and Alex to make a better script...

Thanks to all the testers who make this work for me ;)

Cheers.
 
Last edited:

rvdgeer

Senior Member
Mar 10, 2006
621
107
42
Amersfoort
batch file for steps 4 to 7: mind the filenames!

Waiting for this explanation I kind of figured out this myself...
Great move to make a tutorial!!!

If it helps, I made two batch files (reconstruct conservative ROM from dump.bat) from step 4 to 7.
All you need is to have an 'original' OS.nb (named Windows.nb in your tutorial) and the Part02.raw in the same directory as this batch file, along with all the programs described in step 1 to 3.

usage:
bigstorage 03_OS.nb Part02.raw
or
conservative 03_OS.nb Part02.raw

It performs the described steps and deletes the files you don't need for the ROM reconstruction.

Note:
I don't take any responsibility for any outcome and consequenses. Make sure you know what you are doing!
All credits go to the makers of the programs needed...

EDIT:
REMOVED THE ATTACHMENT...
NO USE FOR IT WHEN WE CAN USE THE KITCHEN! :)
 
Last edited:

jcespi2005

Senior Member
Feb 15, 2006
2,379
190
50
Madrid
Waiting for this explanation I kind of figured out this myself...
Great move to make a tutorial!!!

If it helps, I made a batch file (reconstruct conservative ROM from dump.bat) from step 4 to 7.
All you need is to have the 'original' 03_OS.nb (named Windows.nb in your tutorial) and the Part02.raw in the same directory as this batch file, along with all the programs described in step 1 to 3.


Thanks for your contribution :)
 

rvdgeer

Senior Member
Mar 10, 2006
621
107
42
Amersfoort
I noticed something...
When I flash back my reconstructed ROM I'm missing some icons in settings, for example 'device information'...

Did you notice this too?
 

vijavij

Member
Oct 11, 2007
34
1
Works Fine

Hello,
I am a newbie here. First I flashed my German TMobile vario III with original HTC rom and found that original HTC rom is somewhat sluggish in performance as comapred to the HTC rom.
I checked this step by step way of building the rom and it works just fine. Great learning experience. Thanks to Pof, Tadzio and yourself for the explanation.
Regards
 

jcespi2005

Senior Member
Feb 15, 2006
2,379
190
50
Madrid
Hello,
I am a newbie here. First I flashed my German TMobile vario III with original HTC rom and found that original HTC rom is somewhat sluggish in performance as comapred to the HTC rom.
I checked this step by step way of building the rom and it works just fine. Great learning experience. Thanks to Pof, Tadzio and yourself for the explanation.
Regards

Glad to hear helps you...

I add a link to this thread in the Wiki for quick finding...

EDIT: If you guys want, you can upload your reconstructed ROMs to rapidshare or any other site, and i mantain a list of reconstructed ROMs in the first page. This can be ussefull for ppl looking differents languaje ROMs.

Send me a PM if you don't know how to upload or any other issue.
 
Last edited:

kfluk

Senior Member
Oct 7, 2007
71
0
I have the follow error when work with CHT part02.raw (imgfs.bin here)
Any hint?

C:\wm6\ppc\test2>imgfstonb imgfs.bin 03_OS.org.nb.payload 03_OS.new.nb.payload -conservative
ImgfsToNb 2.1RC1
Using conservative mode

Sector size is 0x800 bytes
Writing imgfs to offset byte 0x6e0000, sector 0xdc0
Padding ImgFs from 0x4690000 bytes (0x8d20 sectors)
to 0x46a0000 bytes (0x8d40 sectors)
Conservative/move mode: imgfs partition overflow! Aborting!
available sectors: 0x8c00, needed sectors: 0x8d40


No problem in -bigstorage mode

C:\wm6\ppc\test2>imgfstonb imgfs.bin 03_OS.org.nb.payload 03_OS.new.nb.payload -bigstorage
ImgfsToNb 2.1RC1
Using bigstorage mode

Sector size is 0x800 bytes
Writing imgfs to offset byte 0x6e0000, sector 0xdc0
Padding ImgFs from 0x4690000 bytes (0x8d20 sectors)
to 0x46a0000 bytes (0x8d40 sectors)
Not conservative/move mode. Changing imgfsEnd from 0x4ce0000 to 0x4d80000

...
...
ImgFs Flash Region log blocks was 0x232, now is 0x237
Storage Flash Region log block was 0xffffffff, now is 0xffffffff,
Done!
 

jcespi2005

Senior Member
Feb 15, 2006
2,379
190
50
Madrid
I have the follow error when work with CHT part02.raw (imgfs.bin here)
Any hint?

C:\wm6\ppc\test2>imgfstonb imgfs.bin 03_OS.org.nb.payload 03_OS.new.nb.payload -conservative
ImgfsToNb 2.1RC1
Using conservative mode

Sector size is 0x800 bytes
Writing imgfs to offset byte 0x6e0000, sector 0xdc0
Padding ImgFs from 0x4690000 bytes (0x8d20 sectors)
to 0x46a0000 bytes (0x8d40 sectors)
Conservative/move mode: imgfs partition overflow! Aborting!
available sectors: 0x8c00, needed sectors: 0x8d40


No problem in -bigstorage mode

C:\wm6\ppc\test2>imgfstonb imgfs.bin 03_OS.org.nb.payload 03_OS.new.nb.payload -bigstorage
ImgfsToNb 2.1RC1
Using bigstorage mode

Sector size is 0x800 bytes
Writing imgfs to offset byte 0x6e0000, sector 0xdc0
Padding ImgFs from 0x4690000 bytes (0x8d20 sectors)
to 0x46a0000 bytes (0x8d40 sectors)
Not conservative/move mode. Changing imgfsEnd from 0x4ce0000 to 0x4d80000

...
...
ImgFs Flash Region log blocks was 0x232, now is 0x237
Storage Flash Region log block was 0xffffffff, now is 0xffffffff,
Done!

For me sounds like a bad dumping making imgfstonb bad calculating the lenght of imgfs.... can you repeat the dump process and attach the output yo see how goes?

And don't try to flash the result of -bigstorage cause don't work. To work you need to use -bigstoragemove instead of -bigstorage to get the result working.
 

kfluk

Senior Member
Oct 7, 2007
71
0
Thanks for advise. Try to dump the raw ROM now. Post result later.
btw, I don't find -bigstoragemove in imgfs 2 rc1 readme.txt.
Hidden parameter?
 

kfluk

Senior Member
Oct 7, 2007
71
0
ROM re-construction still fail. I post what I did for the ROM re-construction here. btw, my ROM is CHT unlock from HTC.

=================================
C:\wm6\ppc\org_rom>pdocread.exe -l
210.63M (0xd2a0000) FLASHDR
| 3.12M (0x31f000) Part00
| 4.38M (0x460000) Part01
| 73.38M (0x4960000) Part02
| 129.75M (0x81c0000) Part03
3.80G (0xf2e80000) DSK1:
| 3.79G (0xf2a80000) Part00
STRG handles:
handle 85a97436 3.79G (0xf2a80000)
handle 47476c3e129.75M (0x81c0000)
handle 0748310a 73.38M (0x4960000)
handle 474830e6 4.38M (0x460000)
handle a74b1f0e 3.12M (0x31f000)
disk 85a97436
0 partitions, 0 binary partitions
customerid=00000000 uniqueid= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
disk 47476c3e
0 partitions, 0 binary partitions
customerid=00000000 uniqueid= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
disk 0748310a
0 partitions, 0 binary partitions
customerid=00000000 uniqueid= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
disk 474830e6
0 partitions, 0 binary partitions
customerid=00000000 uniqueid= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
disk a74b1f0e
0 partitions, 0 binary partitions
customerid=00000000 uniqueid= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=====================================================
pdocread -w -d FLASHDR -b 0x800 -p Part00 0 0x31f000 Part00.raw
pdocread -w -d FLASHDR -b 0x800 -p Part01 0 0x460000 Part01.raw
pdocread -w -d FLASHDR -b 0x800 -p Part02 0 0x4960000 Part02.raw
pdocread -w -d FLASHDR -b 0x800 -p Part03 0 0x81c0000 Part03.raw
=====================================================
copy part02.raw C:\wm6\ppc\org_rom_test1
=====================================================
C:\wm6\ppc\org_rom_test1>dir
Volume in drive C is OS
Volume Serial Number is 34EC-33D3

Directory of C:\wm6\ppc\org_rom_test1

17/10/2007 22:23 <DIR> .
17/10/2007 22:23 <DIR> ..
17/10/2007 22:14 76,939,264 Part02.raw
28/08/2007 21:11 99,219,775 RUU_signed.nbh

=====================================================
C:\wm6\ppc\org_rom_test1>nbhextract RUU_signed.nbh
=== NBHextract v1.0
=== Extract contents from HTC NBH files
=== (c)2007 xda-developers.com
=== by: pof & TheBlasphemer based on itsme perl scripts

Device: KAIS13000
CID: HTC__001
Version: 1.56.405.5
Language: USA
Extracting: 00_Unknown.nb
Extracting: 01_SPL.nb
Extracting: 02_MainSplash.nb
Encoding: 02_MainSplash.bmp
Extracting: 03_OS.nb

=====================================================
C:\wm6\ppc\org_rom_test1>nbsplit -kaiser 03_OS.nb
NBSplit 2.1RC1
Using data chunk size = 0x800 and extra chunk size = 0x8
on file 03_OS.nb
Done.

=====================================================
C:\wm6\ppc\org_rom_test1>ren Part02.raw imgfs.bin

=====================================================
C:\wm6\ppc\org_rom_test1>imgfstonb imgfs.bin 03_OS.nb.payload 03_OS-new.nb.payload -conservative
ImgfsToNb 2.1RC1
Using conservative mode

Sector size is 0x800 bytes
Writing imgfs to offset byte 0x6e0000, sector 0xdc0
Padding ImgFs from 0x4960000 bytes (0x92c0 sectors)
to 0x4960000 bytes (0x92c0 sectors)
Conservative/move mode: imgfs partition overflow! Aborting!
available sectors: 0x8c00, needed sectors: 0x92c0

=====================================================
 

jcespi2005

Senior Member
Feb 15, 2006
2,379
190
50
Madrid
Thanks for advise. Try to dump the raw ROM now. Post result later.
btw, I don't find -bigstoragemove in imgfs 2 rc1 readme.txt.
Hidden parameter?

Glad to help...

Really tadzio tools are in Release Candidate, means not finished yet, so this parameters are part of the "testing" phase to get the tools working for Kaiser.

Tadzio makes a great effrot and work on the new version.
 

jcespi2005

Senior Member
Feb 15, 2006
2,379
190
50
Madrid
ROM re-construction still fail. I post what I did for the ROM re-construction here. btw, my ROM is CHT unlock from HTC.

Sector size is 0x800 bytes
Writing imgfs to offset byte 0x6e0000, sector 0xdc0
Padding ImgFs from 0x4960000 bytes (0x92c0 sectors)
to 0x4960000 bytes (0x92c0 sectors)
Conservative/move mode: imgfs partition overflow! Aborting!
available sectors: 0x8c00, needed sectors: 0x92c0

=====================================================

Well, seems the part02.raw have a problem. Have you tried to dump the part02.raw? do executing imgfstodump imgfs.bin

Take a look at the output of the command and look for an error. If the dump process goes well, then try to dump back the dump folder with imgfsfromdump imgfs-in.bin imgfs-new.bin (the imgfs-in.bin is extracted from origin Windows.nb.payload with imgfsfromnb windows.nb.payload).

The result of this process is a new imgfs-new.bin to use with imgfstonb.exe command.

Say me if this helps you...
 

kfluk

Senior Member
Oct 7, 2007
71
0
I dump again the Part02.raw from kaiser.

After rename Part02.raw to imgfs.bin
I run imgfstodump imgfs.bin
Dump goes well. At least the command complete without problem.

imgfsfromdump fail if do it immediately after dump.

C:\wm6\ppc\org_rom_test1>imgfsfromdump 03_OS.nb.payload imgfs-new.bin
ImgfsFromDump 2.1RC1
Compression DLL does not support compression type ''!

The only different is I extract OS.nb from "RUU_Kaiser_HTC_WWE_1.56.405.5_radio_sign_22.45.88.07_1.27.12.11_Ship".

i.e. full procedure.
1. Get part02.raw from device and rename to imgfs.bin
2. NBHextract RUU_signed.nbh
3. NBSplit -kaiser 03_OS.nb (result two file 03_OS.nb.payload and 03_OS.nb.extra)
4. imgfstodump imgfs.bin (no error)
5. imgfsfromdump 03_OS.nb.payload imgfs-new.bin (error)
 

jcespi2005

Senior Member
Feb 15, 2006
2,379
190
50
Madrid
I dump again the Part02.raw from kaiser.

After rename Part02.raw to imgfs.bin
I run imgfstodump imgfs.bin
Dump goes well. At least the command complete without problem.

imgfsfromdump fail if do it immediately after dump.

C:\wm6\ppc\org_rom_test1>imgfsfromdump 03_OS.nb.payload imgfs-new.bin
ImgfsFromDump 2.1RC1
Compression DLL does not support compression type ''!

The only different is I extract OS.nb from "RUU_Kaiser_HTC_WWE_1.56.405.5_radio_sign_22.45.88.07_1.27.12.11_Ship".

i.e. full procedure.
1. Get part02.raw from device and rename to imgfs.bin
2. NBHextract RUU_signed.nbh
3. NBSplit -kaiser 03_OS.nb (result two file 03_OS.nb.payload and 03_OS.nb.extra)
4. imgfstodump imgfs.bin (no error)
5. imgfsfromdump 03_OS.nb.payload imgfs-new.bin (error)

This is not valid command "C:\wm6\ppc\org_rom_test1>imgfsfromdump 03_OS.nb.payload imgfs-new.bin"... cause you need to extract the imgfs.bin from the 03_OS.nb, and then use like imgfs-in.bin. Note that the imgfs.bin is inside the 03_os.nb.payload.

The imgfsfromdump commmand takes the dump folder and makes a new imgfs named imgfs-new.bin using imgfs-in.bin to take infor about headers...

Te correct command is imgfsfromdump imgfs-in.bin imgfs-new.bin.

If you want, upload the par02.raw and send me the link. I'll try to repack for you.

Cheers.
 

kfluk

Senior Member
Oct 7, 2007
71
0
This is not valid command "C:\wm6\ppc\org_rom_test1>imgfsfromdump 03_OS.nb.payload imgfs-new.bin"... cause you need to extract the imgfs.bin from the 03_OS.nb, and then use like imgfs-in.bin. Note that the imgfs.bin is inside the 03_os.nb.payload.

The imgfsfromdump commmand takes the dump folder and makes a new imgfs named imgfs-new.bin using imgfs-in.bin to take infor about headers...

Te correct command is imgfsfromdump imgfs-in.bin imgfs-new.bin.

If you want, upload the par02.raw and send me the link. I'll try to repack for you.

Cheers.

Hi jcespi2005,
How could I extract the imgfs.bin from the 03_OS.nb?
I am uploading part02.raw to rapidshare, speed is very slow. Will post you the link.
thanks for your patient.

kfluk