yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] cruzzmz:
i have tried extracting xip.bin but still no avail could somebody help in teaching me how to do it

C:\Documents and Settings\Administrator\Desktop\RUU_Rose_Orange>RomMaster.exe -w 5 os.nb.payload -x -o xip.bin
[Info] It is a common ROM.
[Error] File is damaged, end address small than start address.
[Error] File is damaged, end address small than start address.

TIA
[Windows Mobile Software Development] boggsie:
credit to dcd, vetvito, ababrekar, gguruusa, lennysh

If you are starting with an RUU/WWE, then use WinRAR or WinZip to get the input.nbh file out of the RUU/WWE.

1) Goal is to break input.nbh into pieces that can be used.

nbhextract.exe input.nbh

The result is the following files:

00_SPL.nb
01_MainSplash.bmp
01_MainSplash.nb
02_SubSplash.bmp
02_SubSplash.nb
03_Unknown.nb
04_OS.nb

The XIP is in 04_OS.nb

nbsplit.exe –kaiser 04_OS.nb

The result is the following files:

04_OS.nb.extra
04_OS.nb.payload

The XIP is in 04_OS.nb.payload

Here is where things get tricky. In some cases, you can successfully and reliably use imgfsfromnb to get the start address for the XIP:

rename 04_OS.nb.payload to OS.nb.payload
imgfsfromnb OS.nb.payload imgfs.bin

output from a vogue rom:

Then you can use the address from imgfsfromnb.exe as part of the input to RomMaster:

RomMaster.exe -x -w 5 -s 0x00320000 -e 0x006c0000 04_OS.nb.payload -o xip.bin

However, I am led to believe that this method does not always work reliably. However, if you manually extracting the xip.bin with a hex editor should always work reliably.

Imgfs usually starts with:

F8 AC 2C 9D

XIP usually starts with:

FE 03 00 EA

So, you open the 04_OS.nb.payload in a hex editor and search for F8 AC 2C 9D. At that point, you delete everything following. Quite a bit before that point should be FF FF FF FF.

Then, you go to the beginning of the file and search for FE 03 00 EA and delete everything before it.

What remains should be the XIP, so save this file as XIP.BIN.

Best regards,

-boggsie
[Windows Mobile Software Development] cruzzmz:
Cool man

nice info indeed .... i have successfully extracted the with the 1st method ... but i think it is a lill bit odd since i have some crap files inside it when i do a xipport.

will try the 2nd method & c how it goes

BTW what should i delete? F8 AC 2C 9D ... meaning start from F8 or after 9D?

update: after doing it seems like the xip is corrupted ... get only 1.2M of file since the ori is 3.1M???
[Windows Mobile Software Development] boggsie:
Hopefully my seriously lacking graphic skills won't interefere with this attempt to visually depict the xip.bin as part of the os.nb file.

image attached

IMGFS usually begins with F8 AC 2C 9D so you would include this with the portion that you delete.

XIP.BIN usually begins with FE 03 00 EA so you would delete everything before that.

What remains should be the full XIP.BIN.

Best regards,

-boggsie
[Windows Mobile Software Development] mosfet:
Your method doesnt' work with my shadow ROM because for instance XIP begins with

D9 19 00 EA

I think it's better to assume that Xip starts at 0x320000.
[Windows Mobile Software Development] Ameet:
I would suggest the best way to find out the start address for each partition would be from the LBA in MBR region
[Windows Mobile Software Development] c_shekhar:
No pl dont assume that way. The XIP can change places. Many a times it is at 0x1000 sometimes at 0x20000 and at different addresses.

Normally use the method to find the way @boggsie explains.

AND of course the most accurate way is what @ababerakar mentions....
[Windows Mobile Software Development] mosfet:
I have a question about your signature, the My Hima ROM 7.0c.40CS (WM6 build18508) is a WM 6.0 or a WM 6.1 ?

(Sorry I post a PM but no answer).
[Windows Mobile Software Development] Ameet:
It is a WM6 not a WM6.1 build. Hopefully we will stick to the original topic of discussion now :)
[Windows Mobile Software Development] mosfet:
Hum I think your are going to hate me and you will answer me : Read the fxxking book but how can I extract xip from a nbf ? It seems different from all you teach me ;-)

In one XDA thread they are talking about dumprom so I tried on My Hima ROM 7.0c.40CS (WM6 build18508) but cpu is 100% and it doesnt't seem to extract something. Once I have my nk.exe from this WM6.0 I won't bother you again ;-)

I tried typho5 tool but it doesn't work then I tried NeoKit easy2use rom cook/modding tool(http://xdaforums.com/showthread.php?t=357893)

but same result.
[Windows Mobile Software Development] Ameet:
Guys, please dont feel coz bad I'm asking you to continue this discussions on PM. The only reason for that is, I dont want learners or someone who wants to ask questions related to the guides would have to go through 2 pages of Q&A of xip extraction, which can be tough :)

@Mosfet. I dont hate you nor anyone else :) I'll tell you what, I have created a temp social group here (Extract XIP): http://xdaforums.com/group.php?groupid=30 where we can continue this discussion and once done, shall remove the group (or keep it if you want) :)

Also while joining there, post the screenshot of your MBR region and your boot.rgu file. Will try and find out some things
[Windows Mobile Software Development] Blackdragon_860:
Sorry, but where i can see how mutch the ram has increased?

greets
[Windows Mobile Software Development] Ameet:
The space between ulRamFree and ulRamEnd is the amount of RAM that you have as free during boot and for use

To know the exact in MB check this value in the MAP.txt at the last region and calculate using windows calculator ;)
[Windows Mobile Software Development] Blackdragon_860:
but on the phone i dont can see that right?
[Windows Mobile Software Development] Ameet:
On the phone you can compare between earlier and newer by looking at the memory applet
[Windows Mobile Software Development] Ameet:
Has anyone porting XIP to Diamond ROMs found a way to exclude the WinceNls from XIP and use it in SYS? Tried it many times, but the ROM is non bootable :(
[Windows Mobile Software Development] :
I got it to work, what i did was also deleate the txt files. So in the folder all i had was the DSM and the winc.nls. And then it seem to work for me. I have it set up that was on my touch pro and on my diamond.

That is with the following xips. 19972, 19974, 20759, 20764. and it works on all of those.
[Windows Mobile Software Development] spocky12:
Hi everybody :)

@ababrekar: the same goes for me with ks20 roms : no ability to boot with WinceNls moved from xip to sys.
[Windows Mobile Software Development] Ameet:
Hi brother. Can you post a more clear guide on how you got it working for Diamond? I used to do that for Elfin too and it worked there but not on Diamond :(

I guess we need more clear guidance on how this is to be done
[Windows Mobile Software Development] :
Try using this tool by Ervius. It is used to port xip by itself. A lot like the tool lennysh is working on. But ervius already has it work. This one will also show you where to include it in the payload file. Also able to use patch the xip. Give it a shot, and see if it helps.

All credit goes to Ervius for this tool though. Works on my Diamond and Touch Pro.
[Windows Mobile Software Development] Ameet:
Hmm. Tried with using this tool too :( But lately I'm facing a very unusual problem. I cant port the XIP later than 20757 build :( Will try again this time fully with this tool
[Windows Mobile Software Development] :
It ported 20759, 20764, and 20940 just fine for me. Let me know if it works. I then extracted the xip, and took out the files i didnt want in there. Once had all those out. I rebuild the xip_out.bin. Rename it to xip.bin. and then placed that in the Old_xip folder. Then ported over new xip.

To verify then you can use xipport. and decompile and rebuild maps. and check for any overlapping. I never saw any though. So I stop checking. Once you take out a file. it will even reorder that so that everything is in working order.
[Windows Mobile Software Development] lennysh:
I've had 0 issues with having WinCE.NLS in SYS for the Touch Pro. I also removed the txt files as they aren't needed when the folder is in SYS.
[Windows Mobile Software Development] ervius:
can you update that file from your mediafire account???

there is a never version online!!! update your account.

and xipporterex can work for all devices, not only on diamond or diamPro.....

here revision 3 included into my kitchen!

http://rapidshare.com/files/170359322/buildos_5_3_xipporterex.rar
[Windows Mobile Software Development] ervius:
I ported 199xx at 20924 with my tool, and all works well.....
[Windows Mobile Software Development] :
will update it has soon has i get it updated. once again thanks for this wonderful tool. It does wonders.

Like i said all credit goes to ervius for all of these great tools. and for the great contributions that he provides to everyone.

Great new kitchen has well. I love it.

New Link, Will delete my other link. Mirror for Ervius newest Kitchen

http://www.mediafire.com/?sharekey=2b929b56e588b991d2db6fb9a8902bda
[Windows Mobile Software Development] ervius:
thanks, important is to have ever the last tool ;)
[Windows Mobile Software Development] ervius:
thinking about:

ULDR removing; xip moving from 3xxxxxx to 20xxxxx, space from xip and IMGFS reducing, all automated by my tool......

see you later ;)
[Windows Mobile Software Development] KMFM$:
w00t!! Ervius, that would be awesome! Hopefully, it will come to fruition soon. :D
[Windows Mobile Software Development] c_shekhar:
Hey bro ervius! I have been looking around for you tool testing. But, unable to lay hands on it. Can you post the possible link for that?...respects..c_shekhar
[Windows Mobile Software Development] Ameet:
Now, that is determination my brother :D Eagerly waiting for this update ;)
[Windows Mobile Software Development] cruzzmz:
ervius is in the house :D

havent have the chance yet to try the xip port tool ... since i have done all the latest porting manually.

whoaaa build os 5.3 already ... i am still using the old 4.3

anyway carry on the good job
[Windows Mobile Software Development] ervius:
ok, guys, version 1.2 revision 5:

what about....

new functions:

only click on "xip tools"

a new window will be opened, click on "uldr.....preview" you will be able to see the differences after payload reducing.....

click on write..... and enjoy with new os.nb.payload ready to be kooched and reduced, pratically the tools does:

eliminate uldr partition if exists, reduces xip size, move it on uldr section (if not yet), and reduces unused space between xip and imgfs sections;)

is a beta, so you have to be my betatesters, and remeber before to:

insert you preferred os.nb.payload and your preferred old and new xip ;)

(for payload reducing, only preferred os.nb.payload is needed!)

download tool here:

http://rapidshare.com/files/170775956/xipporterex_ver_1_2_rev_5.rar

bye!!!
[Windows Mobile Software Development] kokotas:
Feedback for xipporterex_ver_1_2_rev_5

Hi Ervius!

This will make cooking so much easier&quicker!

Thanx for all the effort!

Testing the new option "XIP Tools":

I think there is something left to do regarding editing the MBR and MSFLSH50 Regions!

While the ULDR is removed & the xip and imgfs are "moved up",

the MBR and MSFLSH50 Regions didn't change accordingly (as described in the tutorials here)...so manual editing is required too.

Of course I have to say that I tested it with a payload mented for a different device than yours.

Is this confirmed or am I missing something?:D

Best Regards!
[Windows Mobile Software Development] Ameet:
Wow1! All this discussion in my thread :D I'll beta test this one too for you my brother :D These days I'm not able to work with the IMGFS & ULDR thingies on ym ROMs :( Maybe something's wrong with the calculations or with the kitchen I'm using
[Windows Mobile Software Development] ervius:
on my diamond, manually, only have edited:

uldr size to 0 (same does the tool);

xip moved from 3xxxxxx to 20000 (same does the tool)

exediting xip size and imgfs start/end (same does tool)

hexediting at offset 8xx the byte that indicates the imgfs start section, (same does the tool), now, if someone tests it and then, finally by hands make (if not yet, after tool) the rom booteable, tell me what to do again.....

bye!
[Windows Mobile Software Development] ervius:
maybe us all, are sometimes betatesters for others!!!!! ;)
[Windows Mobile Software Development] Ameet:
Unfortunately, you cant delete the ULDR partition entirely :( Coz the IMGFS start has to be devisible by 20000 :( So the max you can go is 300000 = 18
[Windows Mobile Software Development] ervius:
yes, 300000, pratically, "3E 06" became "3E00"

repeate, replicate what I've done manually, and the rom booted!
[Windows Mobile Software Development] Ameet:
Awesome :D I'll try this out on my payload and see if this works well :D You converted the resulting payload to OS.nb using -conservative or without it?

EDIT: I just obseved the resulting payload is only 3.5MB in size :( Care to explain brother? :)
[Windows Mobile Software Development] ervius:
non conservative so, bigstorage mode and works well!!!

yes, it cut all imgfs section, (it can be also 100 Mb in size), after this operation, you have to rebuild rom using resulting os.nb.payload, no problem it worked modifying it by hands, only hve to check if my tool work better. ;)
[Windows Mobile Software Development] abusalza:
hi, bro.

tested on kaiser. device booting at maximal imgfs start at 5e0000
[Windows Mobile Software Development] ervius:
yes, important is that it boots, on mine imgfs starts at offset 320000, instead of xip section start ;)
[Windows Mobile Software Development] Ameet:
I know too much work :D Been on it since last 3 days. I'll test Ervius's method although sometime later. He believes since the XIPPort tool only uses the imageinfo.txt files, we can delete the .bin files all together and build the xip_out.bin directly. That way then you wont have to reloc through Mreloc
[Windows Mobile Software Development] jcespi2005:
Of course, i was talking about unported XIPs ;) Much ppl find difficults of finding good XIPs to take as base for porting, this is why i think is a good idea a repository...

Every XIP.Bin file in the list must include the origin (Device extracted from), version, and .... any other interesting info?

Thanks.
[Windows Mobile Software Development] itje:
impressive work as always my friend(s)

cheers
[Windows Mobile Software Development] ark666:
Hi, understood the coffe thing, :D

Excelent work, thanks for sharing your knowledge.

Cheers :)
[Windows Mobile Software Development] abusalza:
finally you did it, brother...

but i'm not realy have contribution on it. you as a real contributor coz understanding with my bad English:D:D
[Windows Mobile Software Development] Noonski:
Something like this:

http://xdaforums.com/showthread.php?t=430197

Over at the Wizard Forum

Yeah we can always use a bit of Sharing, a Special Peace Corps wouldn't do, no one, no harm. ;)
[Windows Mobile Software Development] Ameet:
:) Your english is perfect my brother ;)
[Windows Mobile Software Development] Ameet:
WOW!! Cool catch brothers :D

I love SPC :D
[Windows Mobile Software Development] jcespi2005:
Yes, bro, this is a great starting point ;)

I should not have sold my loved Wizard jejeje

Many thanks...
[Windows Mobile Software Development] !Aman!:
Cmonex, why the imgfs signature in diamond is at different offset than the imgfs starting offset?
[Windows Mobile Software Development] Ameet:
Wow. Feedback from the expert herself :) Thanks C. I'll update the first post accordingly. Thanks again for the heads up
[Windows Mobile Software Development] Laurentius26:
Congratiolations my friend,

I know how hard you worked on this one. :D

Very nice work, your a Pro! :cool:
[Windows Mobile Software Development] Ameet:
As the thread suggests, for all devices :) Will include this in the first post ;)
[Windows Mobile Software Development] cruzzmz:
Xip Addr Tool a gr8 tool to be shared

1 more gr8 tool to add to do a xip porting XIPAddr Tool

DOWNLOAD HERE

this tool actually will compare the new xip with the old xip for porting and will automatically do the MReloc of each modules dll just by clicking the spacebar.

Then u can compare each modules at respective tabs to see any conflicts or not (shown by red lines)

I usually use this tool 1st to recalculate the modules between port xip & old xip. Then ill use XIPPort.exe to undo, Reloc P & write map. Then see Map.txt & as shown in the XIPAddr Tool ill do manual MReloc of each modules like suggested here.

Cool cool tools lying around here & there :D
[Windows Mobile Software Development] Ameet:
That tool is actually found to be buggy (although nothing against the author, great hard work ;)). I had major issues with this tool. After relocing the addresses in the tool and writing new MAP.txt I found that the the overlaps still remained

This was one of the PMs I had sent to Ervius and all others asking for their help in the matter
[Windows Mobile Software Development] Ameet:
Hi C. Here's the imageinfo.txt from FLASHDRV.DLL module. These are the values I was talking of

o32[1].o32_realaddr: D=01FCC000

o32[3].o32_realaddr: D=01FD4000
[Windows Mobile Software Development] cmonex:
that's not the payload file is it?
[Windows Mobile Software Development] cmonex:
was that the unmodified original txt?
[Windows Mobile Software Development] !Aman!:
that was from the payload of shipped 19965 build
[Windows Mobile Software Development] Ameet:
Well, what I meant was, the original os.nb.payload was 65MB before editing. After using you tool to remove ULDR, shift XIP & move IMGFS the os.nb.payload became only 3.5MB :( If I use conservative mode on this file then it wont cook and if I use bigstorage mode on this file then the ROM wont boot :( Also the MBR & MSFKSH regions didnt change sao have to do it manually :(

My new XIP starts at 20000 and IMGFS starts at 340000. ULDR starts from 1000 to 1FFFF
[Windows Mobile Software Development] abusalza:
wow!!!

imgfs start at xip start? so xip start at uldr start? that's mean you have deleted uldr partition?

i 'll start with your tool today:D. thanks bro...
[Windows Mobile Software Development] itje:
awsome tools, but im falling abit off here somewhere...when I try to run nbmerge to make a os.nb from my new os.nb.payload (created by thye new tool) then nb.merge give a error and shut down?

or should I edit my kitchen to use os.nb.payload instead? (how to?)

cheers
[Windows Mobile Software Development] ervius:
if you use os.nb instead of os.nb.payload, onlyhave to merge the payload before koock new rom ;)

but....

new version: revision 6: more space reduced between XIP & IMGFS sections:

download here:

http://rapidshare.com/files/170990570/XipporterEx_version_1_2_revision_6.rar

bye!

P.S.: tonight finally tryed the apps, and works very well, xip starts at 20000, imgfs starts at 320000, saving a lot of space, and moved Rom start from 83xxxxxx to 84xxxxxx (into romldr.txt and .vm's imageinfo.*) waw!!!! ;)

bye!
[Windows Mobile Software Development] Ameet:
Hi Brother. 1 bug I found is when you select to shift the IMGFS at 340000 it actualy starts at 340001, delete the 1 byte manually in hex :)

Trying out this tool with bigstorage mode ;) Also have to manually correct the MBR IMGFS LBA
[Windows Mobile Software Development] Ameet:
I can confirm it doesnt work on my Diamond :(

I ported new XIP

Reduced the ULDR, IMGFS size and got the 3.38MB new payload file. nbmerge wont run since the MBR & MSFLSH region LBA are incorrect. So manually corrected those bytes. Then used nbmerge (without -conservative) to get OS.nb for cooking

But the resulting ROM wont boot past the splash screen :(
[Windows Mobile Software Development] abusalza:
tried on last week to reduced uldr size. but my kaiser not booting at finished. "error code bla...bla..." and stuck at 3 colour with those text on screen and on kaisercustomRUU.exe:(
[Windows Mobile Software Development] Ameet:
I've started to face this problem lately. I cant reduce the ULDR, shift XIP and make ROM bootable even after following my own guide :( Guess I'll have to go full manual cooking and try again
[Windows Mobile Software Development] !Aman!:
:D thats interesting :rolleyes:
[Windows Mobile Software Development] :
How Do we know if ULDR has been removed? My os.nb.payload file went from 7900kb to 4400 kb. everything booted fine using this tool. But will I notice anything on the phone to know that it has been removed? Available memory before and after was the same. So I am not sure. What do i need to look for? So that I know It has been removed?
[Windows Mobile Software Development] !Aman!:
u will gain more storage memory (not RAM/program memory), approximately 3 MBs, after removing the ULDR.
[Windows Mobile Software Development] :
okay thanks for clearing that up. next question then, removing pagefile? how would I do this to get more program memory? I know I need to hex edit something out. But does anyone know what I need to do?
[Windows Mobile Software Development] ervius:
strange, becouse the structure is followed by adresses showed into textboxes, so if imgfs starts at 320000, it really starts at 320000, like xip, if it ends at 31ffff, it really ends there, but investigate more, tonight I reduced original diamond 1.97 payload, and it finally was identical mine made by hands previus, so it means that it have to boot, if mine boots ;), but, I investigare more about!!!!!
[Windows Mobile Software Development] abusalza:
bro the problem is even if i changes the imgfs start at 5d0000 or below it will not boot up my kaiser. as i said the maximal offset for kaiser has 5e0000. or something i'm forget:confused:
[Windows Mobile Software Development] abusalza:
oh yaa! @ervius, if i'm using your tool for kaiser should i changes the imgfs and imgfs start as for kaiser reference???
[Windows Mobile Software Development] itje:
yeah I know, but problem is that nbmerge shuts down and gives me an error has occured (not specified what error)
[Windows Mobile Software Development] !Aman!:
do u mean pagepool :confused:? if yes, then for which device?
[Windows Mobile Software Development] :
CDMA Diamond. The stock for this device is 204.09. I asked Calcu over on ppcgeeks how he did this. He said that by deleating the pagefile, he was able to get that amount. That is in increase of 12 mb. Not sure how or anything.

Any Idea about this? Or am I just blowing smoke?

"deleating pagefile, paging file size you have to hex edit out"

EDIT: Sorry I was a complete retard, That is just going to be a 0mb dyamic pagepool, and I was told paging file, so got confused. Now I understand though.