PDA

View Full Version : imgfsfromnb gives 0 byte imgfs? [hotfix]


poly_poly-man
28th September 2008, 03:29 AM
Okay... after my failed first post, I did some more searching (seriously, tho.. it should be easier to find some of this information :P ).

I have an AT&T Tilt... since I'm unhappy with all the roms I've tried so far for some reason of another, I'm making my own.

I'm using these instructions (http://wiki.xda-developers.com/index.php?pagename=Kaiser%20ROM%20Kitchen%20Tutori al) for cooking the rom... using the emo radio .nb file, the htc 3.03 rom folders, and the HTC stock rom as a BaseROM.

Looks good so far, except I also want some of the applications from the official tilt rom - which I have (and have extracted).

The program seems to have a package_tools side (which seems to be a frontend to other tools).

I gave it 03_OS.nb as a .nb file for it to read... it split it, ran ImgfsFromNb, and errored out on ImgfsToDump - playing around on the commandline shows that ImgfsFromNb gives a 0 byte imgfs file.

What is wrong with this?

I can give you any information you need to help me... this is the first time I've done anything like this, so I don't know what's important ;)

some info:

C:\kaiserkitchen\test>..\Tools\ImgfsFromNb.exe 03_OS.nb.payload imgfs.bin
ImgfsFromNb 2.1rc2
ImgFs partition starts at 0x00000000 and ends at 0x00000000
Dumping IMGFS at offset 0x006eb530 (size 0xff914ad0)

Done!

C:\kaiserkitchen\test>dir imgfs.bin
Volume in drive C has no label.
Volume Serial Number is B417-2713

Directory of C:\kaiserkitchen\test

09/27/2008 10:10 PM 0 imgfs.bin
1 File(s) 0 bytes
0 Dir(s) 7,097,519,104 bytes free

C:\kaiserkitchen\test>

poly_poly-man
28th September 2008, 12:44 PM
got around this issue by using the HTCFlasher set of tools on my main box (running gentoo linux)... now have a decent-sized imgfs.bin

Running imgfstodump gives me dll errors still - a popup says that msvcr71.dll cannot be found (even though I installed the .net framework last night), then the commandline says that cecompr_nt.dll can't be found (even though it's in the same folder as the executable)... any idea as to how to fix the problem?

thanks.

austinsnyc
28th September 2008, 01:37 PM
look in the hermes upgrading thread for the sticky on the imgfs tools.... i know the tools work since i use them everyday :) and also beta tested them last year with TAZ just for the kaiser :)

poly_poly-man
28th September 2008, 04:00 PM
put the program, all the dlls, and the imgfs into the same directory, made a dump.

Used package_tools on the dump, it rearranged the folders into something useful

Creating oem packages now :D

BrianPAdams
29th October 2009, 07:39 PM
I ran into this exact same error on the Sprint TP2. I ran NBHUtil and got the os.nb part. I also tried the HTCFlasher set and the 04_XXX file was the same as the os.nb. I pulled down the source code for ImgfsFromNb and compiled it. I found the error was in a loop near line 104. There is a comment above the loop that states "assumption: MSFLSH always starts at a sector border, and sectors size is always a multiple of 0x100." As it turns out, in the os.nb file that I had from my TP2, the MSFLSH50 string marking the beginning of the Flash Layout Sector was located at position 0x808. Since the loop assumed it would appear at a sector border that started at a multiple of 0x100 it never found the FlashLayoutSector. For my specific os.nb file I just hardcoded the starting position and it ran fine from there. If anyone is interested I can modify ImgfsFromNb to accept a third argument which specifies the offset where it can find MSFLSH50.

It should be noted that I didn't write ImgfsFromNb and am just beginning to understand how these tools work. Perhaps I'm missing something else here?

Brian