PDA

View Full Version : [APP][UTIL]nbImageTool .4 (Partition Dumper) support .nbh .nb .dio .fat .nb0 .payload


Da_G
15th August 2009, 09:24 AM
Hey everyone :)

I've been working on learning C++, so I can refresh some of the existing tools, add some nice features, make them adhere more to the standards, etc.

This is the first fruits of my labor, this program analyzes an .dio, .fat, .nbh, .nb, .nb0, or .payload, reads out partition info to the screen, and dumps the uldr.bin, xip.bin, and imgfs.bin partitions. It should be compatible with any HTC ROM, and any other ROM that does not need to be run through nbsplit.

It does so without generating an intermediate .extra or .payload like the mamaich/tadzio toolset, and i've tried to keep an eye on speed, so it should be pretty fast.

Usage is "nbimagetool.exe -c filename.nb" - alternatively you can run the program with no parameters for some help output.

-c switch is optional, it strips the leading free space from imgfs.bin, so that it is compatible with imgfstodump (most IMGFS partitions have free space at the beginning, and the imgfsfromnb tool strips this automatically)

The idea for this tool is mostly to be used in a Kitchen, during the dumping process, for a nice fast dump :) Please let me know any errors you might run into!

UPDATED! Added .dio and .fat support
.5pre3 here, new support for asus roms (http://forum.xda-developers.com/showpost.php?p=4417642&postcount=69)

DONE:
* Added .nbh support
* Added .dio support

TODO:
* Add support for .bin
* Fix whatever bugs you might find

CHANGELOG:
.1 Initial Release - supports .nb .payload .nb0
.2 Added .nbh support
.3 Added output of .nbh info when dumping
.4 Added support for .dio and .fat, fixed a bug that might trigger in rare circumstances

Please no feature requests at this time, thanks :)

Visual example of program usage:

http://img91.imageshack.us/img91/8343/program.png

Sample .nbh output:

http://img15.imageshack.us/img15/2071/program2k.png

ther-amm
15th August 2009, 09:55 AM
Thanks Da_G for this new thread :)

CRACING
15th August 2009, 10:02 AM
Thanks for the tool da_g.

Does it works for our old is gold wizard too? :)

d_train
15th August 2009, 10:23 AM
Thanks Da_G

adwinp
15th August 2009, 10:42 AM
Very nice, except, that we DO need nbsplit in most cases (nbsplit -kaiser) -> kaiser, diamond, topaz, blackstone, raphael etc...

poggiami
15th August 2009, 10:54 AM
Thanks for the tool da_g.

Da_G
15th August 2009, 10:59 AM
@CRACING:

You tell me! :)

@adwinp:

I think you misunderstand, when I say it doesn't need nbsplit I mean as a seperate program, it has algorithms to handle the 'nbsplit' process internally, without generating intermediate files :) and, it automatically detects the 'extra' data so you don't need to feed it parameters like -kaiser, -hermes, etc. :)

muttim86
15th August 2009, 11:05 AM
Thanks Da_G... good you are ...

Da_G
15th August 2009, 11:18 AM
Posted a screenshot that should give a clearer explanation :)

tom_codon
15th August 2009, 11:29 AM
Congratulations bro :)

Nice works as always !

Tom

udK
15th August 2009, 11:31 AM
Thanks my friend, nice tool, everything works fine ;)

ther-amm
15th August 2009, 11:48 AM
It's work!!, I have already try with my modified MBR from old Eten M600 ROM payload.

Compatibility Mode: ACTIVE
os.fat opened for reading, size 45914624 bytes.
MBR Signature is a match! Valid .nb

Size of Data Chunk: 512 bytes
Size of Extra Chunk: 0 bytes

Partition 1: BootInd : 0
Partition 1: FirstHead : 2
Partition 1: FirstSector : 1
Partition 1: FirstTrack : 0
Partition 1: FileSystem : 32 (ULDR)
Partition 1: LastHead : 31
Partition 1: LastSector : 1
Partition 1: LastTrack : 71
Partition 1: StartSector(L) : 2
Partition 1: TotalSectors(L): 2302 (1178624 bytes)
Partition 2: BootInd : 0
Partition 2: FirstHead : 0
Partition 2: FirstSector : 1
Partition 2: FirstTrack : 72
Partition 2: FileSystem : 35 (XIP RAMIMAGE)
Partition 2: LastHead : 31
Partition 2: LastSector : 1
Partition 2: LastTrack : 159
Partition 2: StartSector(L) : 2304
Partition 2: TotalSectors(L): 2816 (1441792 bytes)
Partition 3: BootInd : 0
Partition 3: FirstHead : 0
Partition 3: FirstSector : 1
Partition 3: FirstTrack : 160
Partition 3: FileSystem : 37 (IMGFS)
Partition 3: LastHead : 31
Partition 3: LastSector : 129
Partition 3: LastTrack : 39
Partition 3: StartSector(L) : 5120
Partition 3: TotalSectors(L): 78080 (39976960 bytes)
Partition 4: BootInd : 0
Partition 4: FirstHead : 0
Partition 4: FirstSector : 129
Partition 4: FirstTrack : 40
Partition 4: FileSystem : 4 (MS-DOS 16-bit FAT)
Partition 4: LastHead : 31
Partition 4: LastSector : 1
Partition 4: LastTrack : 127
Partition 4: StartSector(L) : 83200
Partition 4: TotalSectors(L): 412416 (211156992 bytes)
Total Number of Logical Sectors: 495614
Total Size of Image in bytes: 253754368
Writing uldr.bin
Writing xip.bin
Writing imgfs.bin


Thanks Da_G for all your hard work.

X2D
15th August 2009, 03:41 PM
Great work nice addition to the tools.

adwinp
15th August 2009, 05:04 PM
@adwinp:

I think you misunderstand, when I say it doesn't need nbsplit I mean as a seperate program, it has algorithms to handle the 'nbsplit' process internally, without generating intermediate files :) and, it automatically detects the 'extra' data so you don't need to feed it parameters like -kaiser, -hermes, etc. :)


Yes I did.
Just tested. Very nice piece of work. Except that xip size doesn't match.
Dumps fine, but is bigger than original.
I might've screwed my partition signature.

Anyways, the natural path to follow would be to write
uldr+ xip + imgfs header + imgfs (+extra) --> nb?

Apart from nbh support, you might want to ADD the code into the nbimagetool instead of coding a separate tool.
Why 2 tools when we can have 1?
Everything can be managed via switches, for example
nbimagetool -o outfile.nb(h) -x xip.bin -u uldr.bin -i imgfs.bin ...
;]

If you're really bored, you can also add other sections, like radio, splash.
It's basically the same code, except for different offsets (0x600)

Da_G
15th August 2009, 07:54 PM
What was the difference in xip.bin's? (Aside from the size) - was it just free space at the end (FF's evenly divisble by sector size) - if so, the existing toolset strips free space from things. I can make the -c switch strip it from xip.bin as well if necessary (although xipport.exe dumps fine with free space left at the end...)

Re: .nbh/.bin support, yeah, I plan to add it into the tool rather than a seperate tool :)

adwinp
15th August 2009, 08:00 PM
What was the difference in xip.bin's? (Aside from the size) - was it just free space at the end (FF's evenly divisble by sector size) - if so, the existing toolset strips free space from things. I can make the -c switch strip it from xip.bin as well if necessary (although xipport.exe dumps fine with free space left at the end...)

Re: .nbh/.bin support, yeah, I plan to add it into the tool rather than a seperate tool :)


Yes, it's just free space.
I've checked every file's hash and it's consistent, so no worries.

X1iser
16th August 2009, 04:22 PM
I try to use this tool with OS.nb :confused:

OS.nb from X1i official rom

nbImageTool.exe OS.nb
CreateFileMapping() error: 5
Press the enter key to exit.

CRACING
16th August 2009, 05:02 PM
@CRACING:

You tell me! :)


Works perfect for Wizard's official OS.nb ( Extracted both imgfs.bin and XIP.bin ) but as of protected OS.nb, only the XIP.bin will be useful. :)

Extraction of imgfs.bin worked fine using ELF(in) Hybrid Kitchen ( My Fav ).
Extraction of XIP.bin worked fine using bepe's XIP dumping tool.

Thanks....

Best Regards

Da_G
16th August 2009, 06:58 PM
X1iser:

Are you running in vista/windows 7 with UAC on? It sounds like the OS isn't allowing my app access to the file in the location you have it in. Try running it in administrator mode :)

X1iser
16th August 2009, 08:01 PM
It work in administrator mode thanks:)

Simple question: do you planning to create a multidevice kitchen ?

+ Que PPC
17th August 2009, 12:18 AM
Hehehe I dont think so, i think he is trying to make things... easier (modding the actual tools in kitchens) maybe Ervius will delete the old tools and change to Da_G tools

Da_G
17th August 2009, 08:02 AM
Updated with version .2, added .nbh dumping support :)

!Aman!
17th August 2009, 08:08 AM
Updated with version .2, added .nbh dumping support :)
thanks Da_G :) this is what i was waiting for :D

btw, is it possible to show the offsets of radio, spl, os, splash etc while dumping the NBH? this will help to easily build the NBH for new coming devices.

jug6ernaut
17th August 2009, 08:34 AM
Tool works perfectly Da_G, awesome work.

Da_G
17th August 2009, 09:01 AM
updated .3!

verbose output for .nbh added, example screenshot in first post :)

!Aman!
17th August 2009, 09:07 AM
this is great! thanks a lot. worked perfect :)

hilaireg
17th August 2009, 02:06 PM
Hey Da_G,

Seems to produce all the results displayed in the first diagram, of the first post, except for:


}, ->, page icon, construction cone



Awesome job as usual!

:D

DaveShaw
17th August 2009, 02:21 PM
Nice work mate :D

Dave

roney
17th August 2009, 02:44 PM
Nice works as always!

chshrm
17th August 2009, 03:58 PM
Very nice tool! thank u Da_g man!

robertus3d
17th August 2009, 04:07 PM
More thanks, man!:D

CRACING
17th August 2009, 05:59 PM
Sad to know that there is no support for nbf. :(

However, this too will be very usefull if I get any new devices. :)

Best Regards

Da_G
17th August 2009, 10:23 PM
.nbf is a pretty old format, are there not already tools to dump from an .nbf -> os.nb? or .fat or whatever the tool calls it, my tool should be able to interpret that file.

if not, upload the nbf and post a link, i will see how involved the file structure is, can maybe add support :)

Captain_Throwback
17th August 2009, 10:28 PM
@Da_G
Were you going to include *.DIO support as well? I can't seem to get a good xip.bin using the existing tools.

Da_G
17th August 2009, 10:29 PM
yes, i am planning to add .dio and .bin support :)

have to study the formats some though, don't know them well :)

Captain_Throwback
17th August 2009, 10:32 PM
yes, i am planning to add .dio and .bin support :)

have to study the formats some though, don't know them well :)
I think your OP is missing the .DIO - I was wondering what was it was supposed to say in your TO DO list besides .bin :)

Da_G
18th August 2009, 05:00 AM
Hmm, if you have a .DIO it doesn't work with, can you upload it? I just tried one and it dumped straightaway.

chriscsh
18th August 2009, 05:03 AM
yes, i am planning to add .dio and .bin support :)

have to study the formats some though, don't know them well :)

great to heard you planning to support dio format:D
that useful for my atom life

CRACING
18th August 2009, 05:58 PM
.nbf is a pretty old format, are there not already tools to dump from an .nbf -> os.nb? or .fat or whatever the tool calls it, my tool should be able to interpret that file.

if not, upload the nbf and post a link, i will see how involved the file structure is, can maybe add support :)

Ya, there are some tools to dump. like hypercore but they aren't working in windows 7 and some are too lengthy. :(

Nbf format looks old but not so coz I'm there to keep it new. :D

Here (http://forum.xda-developers.com/showthread.php?t=435228) are some offline releases inwhich the ROM isn't protected.

Best Regards

Captain_Throwback
18th August 2009, 06:40 PM
Hmm, if you have a .DIO it doesn't work with, can you upload it? I just tried one and it dumped straightaway.
I had one and it dumped okay, but when I ported the xip.bin, I got a non-booting device. Maybe that's not the fault of the tools after all . . . I can post you the file if you still want to check it out.

Da_G
18th August 2009, 06:57 PM
Were you able to dump the resulting xip.bin/imgfs.bin without issue? if so, the tool must have worked ok..

Captain_Throwback
18th August 2009, 08:06 PM
Were you able to dump the resulting xip.bin/imgfs.bin without issue? if so, the tool must have worked ok..
I just checked, and no, I was not able to dump the xip.bin after using the tool to extract it from the dio file.

Da_G
18th August 2009, 08:31 PM
okay, post the .dio and i'll check it out :)

Captain_Throwback
18th August 2009, 08:47 PM
okay, post the .dio and i'll check it out :)
Thanks. Here it is:

FLASH.7z (http://rapidshare.com/files/268838735/FLASH.7z)

It could just be user error. I really don't know what I'm doing when it comes to dumping stuff.

Da_G
19th August 2009, 02:55 AM
Thanks for the upload Captain Throwback :)

.dio and .fat are now supported!

.dio actually wasn't even dumping xip.bin, because it was an XIP ROMIMAGE (xip.bin for NOR device) and I wasn't looking for those, fixed now. The resulting output dumps fine in XIPPort.exe, so is a valid xip.bin :)

Note that automatic XIP porting tools might take issue with this xip.bin because it looks like it's an emulator xip.bin, and i've seen them choke on that before. But the one produced by version .4 should be valid :)

tom_codon
19th August 2009, 03:08 AM
Thanks for the upload Captain Throwback :)

.dio and .fat are now supported!

.dio actually wasn't even dumping xip.bin, because it was an XIP ROMIMAGE (xip.bin for NOR device) and I wasn't looking for those, fixed now. The resulting output dumps fine in XIPPort.exe, so is a valid xip.bin :)

Note that automatic XIP porting tools might take issue with this xip.bin because it looks like it's an emulator xip.bin, and i've seen them choke on that before. But the one produced by version .4 should be valid :)


Thanks for update bro :D
Nice works !

Tom

Da_G
21st August 2009, 11:16 AM
Work on .5 is coming along, i'm working on adding support for the -r switch to rebuild os.nb from the various bits that make it up (uldr.bin, xip.bin, imgfs.bin)

To facilitate saving the bits of data needed to reconstruct the .nb, i'm creating an .ini file at dump-time to be read at rebuild-time. Here's what the .ini's looking like right now:


[ROMINFO]
extraChunk=0
dataChunk=512
TotalROMSize=61672448
[PARTINFO]
Partition2FS=37
Partition2=imgfs
Partition1FS=35
Partition1=xip
Partition0FS=32
Partition0=uldr


There's no partition 3 on that particular ROM, so it's not showing in the .ini :) (it's an excalibur ROM)

Here's the output for a raphael ROM:


[ROMINFO]
extraChunk=8
dataChunk=2048
TotalROMSize=494792704
[PARTINFO]
bIsLastPartitionEmpty=1
Partition3FS=4
Partition3=msdos16bitfat
Partition2FS=37
Partition2=imgfs
Partition1FS=35
Partition1=xip
Partition0FS=32
Partition0=uldr


When called with -r, nbImageTool would read the .ini, check for existence of the various bits (uldr.bin, xip.bin, imgfs.bin), and then create an .nb from scratch with the partitions in the order specified. If the last partition is physically empty when dumping (like on the raphael rom) the partition header will be written but no actual data stored there (just like on the original ROM) - this should cover all cases I can think of at the moment for .nb creation. (except non-HTC .nb's, which, if striped with metadata, use a different method of storing that metadata, so i'll need to add a flag for that, but first i'll need to find a non-HTC & non-MSFT .nb that doesn't dump to analyze.. havent run into one yet! it might be that HTC is the only one that mongles the .nb format.)

This current method should work for 90% of cases :)

Added bonus: "reducing" uldr should be as simple as filling the uldr.bin with 1 dataChunk worth of FF's (2048 bytes of free space in the case of raphael)

Another added bonus: removing the uldr partition entirely should be as simple as removing the partition from the .ini entirely. For example:

Normal ROM:


[PARTINFO]
bIsLastPartitionEmpty=1
Partition3FS=4
Partition3=msdos16bitfat
Partition2FS=37
Partition2=imgfs
Partition1FS=35
Partition1=xip
Partition0FS=32
Partition0=uldr


After ULDR Removal:


[PARTINFO]
bIsLastPartitionEmpty=1
Partition2FS=4
Partition2=msdos16bitfat
Partition1FS=37
Partition1=imgfs
Partition0FS=35
Partition0=xip


Attached is .5-pre, no rebuilding support yet, but please test the .ini output for sanity :)

Also, this version supports dumping all possible .nbh and .nb types (unknown too!)

pak1to
21st August 2009, 11:59 AM
Can anyone think of any data i'm missing to rebuild the .nb? :) (non-HTC .nb's use a different method of storing metadata, so i'll need to add a flag for that, but first i'll need to find a non-HTC .nb that doesn't work to dump to analyze)

This current method should work for 90% of cases :)

view pls. this ROM Asus P835, http://www.mediafire.com/download.php?netytkm4unn
Im converting bin to NB0 "osnbtools -sp flash.bin"
next step
view flash.bin.BIN.NB0 in nbImageTool v.4 - wrong start sections to dump xip, uldr, imgfs
thx

12aon
21st August 2009, 12:44 PM
I have been following this project great interest (always nice when new and better tools get created) but a question which maybe stupid since I'm not fully aware of what the other tools do.

As I understand from the thread you are basically updating the tools to meet current standards and making a dumper for most format's of rom. Will this tool end up being the only tool needed to dump almost any of the rom's floating around here, I mean is that the goal? It looks real good, keep it up and more other words of encouragement, 12

ervius
21st August 2009, 04:07 PM
waw, DA_G, the game starts finally, we all wait your all_in_one tool!!!!! ;)

Alexx~
21st August 2009, 10:45 PM
What NB0 supported?
When I tried to make a dump of NB0 for Asus P525, I got this message

ROMGalaxy.nb0 opened for reading, size 73926660 bytes.
File is not an NBH!
Checking for. Nb
Error reading MBR!
Press the Enter key to exit.


However, if I use prepare_imgfs ROMGalaxy.nb0-nosplit, then imgfs_raw_data.bin is created.

Used nbImageTool.exe v4 and 5 pre

Da_G
21st August 2009, 11:26 PM
@pak1to:

Is this an official ROM or a cooked one?

My tool is reading out the partition table correctly, and doing all calculations on it correctly (verified by doing the math by hand) - but it appears the partition table is damaged. xip.bin does not appear to be as large as the partition table specifies, and imgfs.bin is also off by this amount. I am thinking that this must be a cooked ROM - or osnbtool is stripping some bits it should not be. But i'm following the data in the partition table correctly, and it does not match the actual contents of the partitions.

12aon: the ultimate goal is to replace the entire imgfs toolset, dumping and rebuilding, and perhaps also nbh dumping and rebuilding, although the imgfsto/fromdump parts will be the hardest by far, that will probably be the last bit :)

Alex~: please post this rom, also is this a cooked ROM or a stock ROM?

Alexx~
21st August 2009, 11:58 PM
This is the latest official 6.0 ROM for Asus P525.
Full ROM is CAP file. ROMGalaxy.nb0 this Extract NB0 OS image from CAP update package.
ROM uploaded here - http://rapidshare.com/files/269980923/ROMGalaxy.7z

12aon
22nd August 2009, 12:09 AM
@pak1to:

Is this an official ROM or a cooked one?

My tool is reading out the partition table correctly, and doing all calculations on it correctly (verified by doing the math by hand) - but it appears the partition table is damaged. xip.bin does not appear to be as large as the partition table specifies, and imgfs.bin is also off by this amount. I am thinking that this must be a cooked ROM - or osnbtool is stripping some bits it should not be. But i'm following the data in the partition table correctly, and it does not match the actual contents of the partitions.

12aon: the ultimate goal is to replace the entire imgfs toolset, dumping and rebuilding, and perhaps also nbh dumping and rebuilding, although the imgfsto/fromdump parts will be the hardest by far, that will probably be the last bit :)

Alex~: please post this rom, also is this a cooked ROM or a stock ROM?

Wow, so I guess this in the end will replace platformbuilder.exe as well. You don't do small do you :). I guess this is rom making history in the making then, do you ever sleep? Good luck buddy, I don't know what else to say :), 12

pak1to
22nd August 2009, 12:34 AM
@pak1to:

Is this an official ROM or a cooked one?

My tool is reading out the partition table correctly, and doing all calculations on it correctly (verified by doing the math by hand) - but it appears the partition table is damaged. xip.bin does not appear to be as large as the partition table specifies, and imgfs.bin is also off by this amount. I am thinking that this must be a cooked ROM - or osnbtool is stripping some bits it should not be. But i'm following the data in the partition table correctly, and it does not match the actual contents of the partitions.

Da_G
yes,its taken off.ROM Ship_WWE
Your tool is very nice, tested on several ROMs, are correct, many thanks, look forward to development, but with ROM ASUS P835 problem
...confusion with dumped xip sections & starting imgfs signature section found in xip.bin:D
Im upload now flash.bin,pls. locate where trick
Alexx~ Hi!:) del bootloader to the your ROM? Without Boot Loader correctly process of reading sections. Dumped ROMs ASUS P535 partitions correctly, with ULDR or without ULDR
udp. http://www.mediafire.com/file/rltztqwnhud/flash.bin.7z

Alexx~
22nd August 2009, 01:03 AM
pak1to, привет.
А я думаю, что за фигня, какой такой NB0 поддерживается, а оно вот где собака порылась :)

Yes, without BLDR works well. Includes ULDR and without ULDR. Even without XIP and IMGFS works :D
Thank you for helping pak1to and Da_G for the great tool.

Da_G
22nd August 2009, 01:17 AM
@pak1to:

Ok, i'll check it out soon, thanks for uploading :)

twopumpchump
22nd August 2009, 06:48 AM
sorry didnt know about this thread till last last night :o just dumped stock kaiser rom it worked perfectly :D great work man can wait when its all done.

bigix1
22nd August 2009, 09:07 AM
Great. Thanks man.

Da_G
23rd August 2009, 04:58 AM
I've been studying the ROM's provided, and it looks like in addition to the normal partitions, there's a provision in the .nb for a "Reserved" section that doesn't get counted in the offset calculations - i'll need to do a bit more research to determine how to get the offset and size of the "Reserved" section, and factor it into the calculations. Once I get that i'll also dump it as reserved.bin - that should take care of the asus compatibility issue (and any other roms that have a "Reserved" section)

pak1to
23rd August 2009, 10:05 AM
I've been studying the ROM's provided, and it looks like in addition to the normal partitions, there's a provision in the .nb for a "Reserved" section that doesn't get counted in the offset calculations - i'll need to do a bit more research to determine how to get the offset and size of the "Reserved" section, and factor it into the calculations. Once I get that i'll also dump it as reserved.bin - that should take care of the asus compatibility issue (and any other roms that have a "Reserved" section)
Da_G
thank you for the hard work , Im waiting positive results such compatibility asus & other ROMs with FAT section in nbImageTool

bgcngm
26th August 2009, 11:20 AM
Hello, Da_G.

Do you plan to add support for .dat files (ACER/ETEN devices)?

At0mAng
26th August 2009, 12:05 PM
Hmmm this just dumped ROM from Leo test EXE and it gave me no errors :)

The future does look bright.

Thanks for the tool!

And of course your help :D

WoZZeR999
27th August 2009, 04:20 PM
Hey da_g, not a big deal, but thought you may want to know for non-HTC devices. The omnia IMGFS.bin extracts fine, but the xip isn't extracted correctly. The XIP is 2.5 megs, where the original stock is 3.4 megs. I can't get any files or modules from xipport when I dump it. I'm not sure if it matters, but to extract the xip correctly, osnbtool 1.55 and above had to be used, 1.54 could not extract it.

Our Omnia tools work well enough, but I was just letting you know incase you were interested how it worked on other devices.

Da_G
27th August 2009, 07:44 PM
Hi again,

Here's .5 pre (number 2)

This one should support dumping ASUS .nb and any other .nb that has some leading data before the first sector (reserved sections, etc)

Also cleaned up the programs output a bit and made it more verbose (more info about the rom displayed)

http://img164.imageshack.us/img164/5476/point5pre2.png (http://forum.xda-developers.com/attachment.php?attachmentid=221275&d=1251395030)

@WoZZeR999:

Can you post this .nb so I can examine? (try .5 pre 2 first)

WoZZeR999
27th August 2009, 08:15 PM
I tried .5.2 and it crashed while writng the uldr. It got to about 150 megs before crashing. I'm uploading a stock i910 nb image. I ran the original through osnbtool -sp twice to get this.

On a side note, I was trying to play with a lg incite rom, but it had the 4th dos partition. How do exctract those?

RS Link: http://rapidshare.com/files/272256673/i910.rar.html

Edit2: Figured a log might help

Da_G
27th August 2009, 08:35 PM
Size of Data Chunk: 9415357 bytes


Whoops, should be an easy fix :)

pak1to
27th August 2009, 08:52 PM
I tried .5.2 and it crashed while writng the uldr. It got to about 150 megs before crashing. I'm uploading a stock i910 nb image. I ran the original through osnbtool -sp twice to get this.

On a side note, I was trying to play with a lg incite rom, but it had the 4th dos partition. How do exctract those?

similar situation with RОM ASUS p835
tried to flash.bin and .OS.NB :(
In first case right to dump only uldr partition,xip and imgfs not valid start sector
In the second case, get a dump uldr 180mb :eek: xip and imgfs no writing
third log as it should be, but is not available for nbImageTool

Da_G
28th August 2009, 01:53 AM
Attached is .5 pre 3, dumping imgfs.bin from asus rom fine now (make sure to use -c to strip compaction blocks)

Fixed the datachunk bug i introduced earlier (i think!)

crashes when dumping the last partition (ms-dos 16 bit fat) because it's really not as big as the partition table says it is.. i'll have to add some code to check that and recover gracefully.

chshrm
28th August 2009, 03:00 AM
a very good tool! thanks Da_g, a man!

Da_G
28th August 2009, 07:53 AM
@bgcngm:

If you can provide a .dat I will look into it :)

Laurentius26
28th August 2009, 09:00 AM
Nice work Da_G, thank you. :)

pak1to
28th August 2009, 10:36 AM
Da_G
wow,".5 pre 3" excellent job,i wait for support for correct interaction with *.bin
avoiding extra action with osnbtool

alncool
28th August 2009, 06:13 PM
Hey Da_G,

Thanks for this great tool !
Can we expect also a linux version in the future? :D
AlnCool

-MyHTC-
29th August 2009, 06:19 AM
I would like to make a request for the .nbf format
Although typho5.exe dumps most .nbf ROMs it doesn’t extract both of the extended ROM partitions.
In the Cingular 3125 Wizard ROM, the G3 has a 10mb partition and the G4 has a 5mb partition in the same ROM.

I’ve posted this link for your consideration (http://rapidshare.com/files/17618972/RUU_Wizard_225111_22511102_022511_CWS_WWE_Ship.exe )

CRACING
30th August 2009, 08:41 PM
I would like to make a request for the .nbf format
Although typho5.exe dumps most .nbf ROMs it doesn’t extract both of the extended ROM partitions.
In the Cingular 3125 Wizard ROM, the G3 has a 10mb partition and the G4 has a 5mb partition in the same ROM.

I’ve posted this link for your consideration (http://rapidshare.com/files/17618972/RUU_Wizard_225111_22511102_022511_CWS_WWE_Ship.exe )

I had already asked this to da_g but got only one reply. :(

But in the other hand, why we need nbImageTool to support for nbf? aren't there any tools for dumping/extracting nbf?

Of course if we ask the same for nbh ( like; why we need nbImageTool to support for nbh? aren't there any tools for dumping/extracting nbh? ) then? :D

So @da_g, please make support for nbf too. I hope it isn't so difficult or hard work.

Best Regards

heineken78
16th September 2009, 07:43 PM
Hi Da_G,
First of all Big thanx for your great work.
Im trying to make multilngual boot as example i have one firmware from samsung. Could you tell me if Lang files are not found in img, they can probably be in DOS partition. i create 3-d parttion (DOS) bin, but how can unpack and repack files in? imgfs doesnt help

erickwill
8th October 2009, 01:12 PM
Hello Da_G,
First of all, THANK YOU for your great work! Without you XDA or the PDA world does't be the same, because you ever contribute with great stuffs!
I am writing to you because I had tried all ways to get my deal, but without sucess.. so please, I really believe that you can help.
I have a Pharos Traveler 117 device and since I bought it, I am trying to cook a WM6.5, but the big problem is to extract and organize the OEM, XIP and other need files. I had tried, I guess, all tools that I found to extract this files from the original rom.. but I couldn't.. BUT I SURELY BELIEVE THAT YOU CAN GET IT! :)
So please, if you can help me would be much apreciate! I believe that there is a lot of users like me that wanna use WM6.5 on his Pharos Traveler 117 but till this time couldn't do that because there is no option to do it.
Follows the link to download the original rom:
For Windows XP:
http://www.pharosgps.com/support/downloads/get_binary2.asp?fname=Pharos_Traveler_117_0409_1.0 .25.2_20090520_XP.exe&cat=drivers
For Windows Vista:
http://www.pharosgps.com/support/downloads/get_binary2.asp?fname=Pharos_Traveler%20117_0409_1 .0.25.2_20090520_Vista.exe&cat=drivers
Since now, thanks a lot!
Cheers,
Erick

yonn1981
9th October 2009, 06:12 PM
Hello Da_G,
First of all, THANK YOU for your great work! Without you XDA or the PDA world does't be the same, because you ever contribute with great stuffs!
I am writing to you because I had tried all ways to get my deal, but without sucess.. so please, I really believe that you can help.
I have a Pharos Traveler 117 device and since I bought it, I am trying to cook a WM6.5, but the big problem is to extract and organize the OEM, XIP and other need files. I had tried, I guess, all tools that I found to extract this files from the original rom.. but I couldn't.. BUT I SURELY BELIEVE THAT YOU CAN GET IT! :)
So please, if you can help me would be much apreciate! I believe that there is a lot of users like me that wanna use WM6.5 on his Pharos Traveler 117 but till this time couldn't do that because there is no option to do it.
Follows the link to download the original rom:
For Windows XP:
http://www.pharosgps.com/support/downloads/get_binary2.asp?fname=Pharos_Traveler_117_0409_1.0 .25.2_20090520_XP.exe&cat=drivers
For Windows Vista:
http://www.pharosgps.com/support/downloads/get_binary2.asp?fname=Pharos_Traveler%20117_0409_1 .0.25.2_20090520_Vista.exe&cat=drivers
Since now, thanks a lot!
Cheers,
Erick

I think Da_G might be interested in flash.bin of this ROM :

http://rapidshare.com/files/237288218/Pharos117_exe_extracted.7z

Any hope Da_G? :p

erickwill
9th October 2009, 11:12 PM
I think Da_G might be interested in flash.bin of this ROM :

http://rapidshare.com/files/237288218/Pharos117_exe_extracted.7z

Any hope Da_G? :p

Please Da_G,
Help us with this Pharos Traveler 117 rom..
I have tried out all to create a WM6.5 rom for this device.. and till this time nothing ..
Here is a new link for the official rom:
http://www.4shared.com/file/139597535/450f58bf/Pharos_Traveler_117_0409_10252_20090520_Vista.html

The big problem here is to extract from .exe and to get the OEM / SYS / XIP..
Actually I don't know it a bootloader in needed to flash after..
Well, your help would be awesome cuz I have sure that you can figure this out.
Give us a light please! :o

erickwill
9th October 2009, 11:23 PM
Hello Fellows,

Anyone have any idea about how to extract from amss.mbn file?
Do anyone have any tool?

Regards,
Erick

anryl
13th October 2009, 08:35 PM
dumping last DIO leaks the xip.bin first 2 bytes must be changed manualy to FE 03 after that dumpxip works fine again :cool:

mpx220
19th October 2009, 09:53 PM
Hi Da_G!
good utility but as usual am a few but ..
If nand.nb is truncated that nbImageTool.exe utility takes off with an error.
Some sections go in NB file with offset
imgfs, I so understand, searched on a signature (not adress in MBR record) and other sections for example fat16 ?

I am sorry for bad English

Привет
хорошая утилита но как всегда есть несколько но ..
Если образ обрезан то при разборке утилита вылетает с ошибкой
Некоторые разделы идут в прошивке со смещением
тмгфс я так понимаю ищется по сигнатуре а другие разделы например фат16 ?

alncool
29th October 2009, 11:45 AM
Hey Da_G,

I tried your tool on a samsung rom (.MST file) and it does not work. Well the samsung ruu-like tool is very strange. It has many config files along the rom in order to select rom language, radio etc and then you can flash the device. This MST seems to be a all-in-one package that contains everything, i mean different languages/configuration/installed program but with selected config file, it create the rom with right country configuration...

I tried also on .enc file for Toshiba devices. Same issue.

Will you add support for these rom ?
AlnCool.

winderp
30th October 2009, 04:40 AM
Thanks Da_G

HardMaster2000
28th November 2009, 12:17 AM
Thanks !!!!!!
Cool works.

HD_VIET
7th December 2009, 11:03 AM
Thank all
How to dump the files FLASH.DIO

zakengen
22nd December 2009, 05:21 PM
Hi Da_G!

your tool is great like all stuff we used to have from you .

your tool was the only tool could break down the rom im working on perfectly

put as usual we cant stop asking you more and more pleas Da_G

Kan you tell me how to put your tool inside any kitchen so i can do a build dos your new

kitchen use this tool . any kitchen pleas

l3v5y
25th December 2009, 05:11 PM
I had some trouble dumping flash.dio files with 0.4 and the -c switch, using 0.5pre3 worked absolutely fine though, so not sure what has changed...

adrianh85
30th December 2009, 07:11 PM
this works great!!! thanks

l3v5y
31st December 2009, 12:47 PM
Just wondering whether there's any way to use this in reverse, to get a NB file from ULDR.bin, IMGFS.bin and XIP.bin. Would be a great alternative to the 4 tools needed to do the same operation!

frantic
31st December 2009, 01:41 PM
Thank you very much.
Its working. ;)

Nokser
29th January 2010, 07:23 PM
Very Goooood Tool
Thanks Da_G ;)

This tool is compatible for Image system Samsung - Smartphone.... and New relase SDK WM from MS :)

Kubuś Puchatek
9th August 2010, 09:43 PM
Sorry for digging out an old post, but nbImageTool not working on my nk.fat file. The file is from Magician's ROM. I've got an error: "Error reading MBR."
Any ideas?
Best regards. Kamil

Sorry for my english...

tobbbie
4th January 2011, 01:05 PM
Stumbled in this thread via searching for tools that handle the various file formats. It took me some time to dig out the following I want to share with you:


.BIN files are not all the same by their nature (of course not by content). There are

.bin that are used to identify the bare binary content of the various partitions (you mostly see those)
.bin that are used to flash a ROM to the device. This looks somehow historic though, the format is already described by itsme at: http://www.xs4all.nl/~itsme/projects/xda/wince-flashfile-formats.html. (http://www.xs4all.nl/%7Eitsme/projects/xda/wince-flashfile-formats.html) It seems to me that some non HTC devices are still using this format.


Hardly any tools exist to extract from a flash-able .BIN or to repack a .nb kitchen output to that format. As I am searching to do some old device rebirth, I have summarized the findings at: http://forum.xda-developers.com/showthread.php?t=819835 - required tools attached there as well.