yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] WoZZeR999:
I've got the i910, and I've been trying to get it booting. The kitchen the omnia uses, has a imgfs.src file, which I can hex to use XPR or LZX. I had tried cooking 2 different roms, and there was about a 10 meg difference between the 2, so I know it was compressing it in LZX. I also put the cecompr.dll module in the XIP, with some quick and dirty editing. I didn't see any overlapping address spaces out side of problems that the stock rom had.

The cecompr.dll with LZX didn't have the imageinfo.txt, and for my archahic method, I needed it. I replaced the cecompr.dll module in the /rom folder, and used buildXIP to build a new XIP. I used the imageinfo.txt from that build (which shouldn't only use the .bin's), to use for my method. I'm stuck at the first boot phase, where it's normally either a XIP, or low level SYS problem. Is there a cecompr.dll that does both XPR and LZX so that I can test if it was my IMGFS LZX method, or the cecompr.dll in my XIP?

Here's an little peice of my build log:

ImgfsFromDump ..\ROM\imgfs.src imgfs.new

ImgfsFromDump 2.1rc2

Using compression type 'LZX'!

Sector size is 0x800
[Windows Mobile Software Development] Ameet:
Thanks brother :D But I request you to break it down right from how to open the file, edit and then save in IDA :D I'm a total total total noob in IDAing :(
[Windows Mobile Software Development] xdmcdmc:
Can't convert nk.exe from module to file using RecMode.exe

Nk.exe is from diamond.

It returns the follwoing error: Error! ProcessCase0: bit 5 is zero!

Another tool or a solution to convert it to file?

Thanks

View attachment nk.exe.zip
[Windows Mobile Software Development] mac_es:
dumprom, some post above
[Windows Mobile Software Development] xdmcdmc:
I'm afraid I already tried that and I get the module directory and not the file.

I need nk.exe file and not the nk.exe folder (module)

Regards
[Windows Mobile Software Development] mac_es:
dumprom (128 KB not the 32KB one) and xip.bin I get the nk.exe file correctly
[Windows Mobile Software Development] xdmcdmc:
Thanks for info, I finally succeded :)
[Windows Mobile Software Development] ivanmmj:
What kitchen are you using? Does the kitchen automatically change the module's addresses?

I don't think you can use the same imageinfo.txt. Unfortunately, the module was meant for kitchens that did the memory addresses for you.
[Windows Mobile Software Development] giorgosm:
using stzupy's kitchen for i900. SYOK
[Windows Mobile Software Development] anryl:
u do not save it with ida u just analyze it and then change it manualy with hexeditor on s000 in module nk.exe :cool:
[Windows Mobile Software Development] béotien:
perhaps it is the one which you are looking for ( posted by Ameet )
[Windows Mobile Software Development] Ameet:
hey anryl :) understood this part but what do we change that value in hex to? i mean, how to calculate or translate that 0x85C00000 into hex?

originally posted by ivanmmj, i simply reposted for someone ;)
[Windows Mobile Software Development] anryl:
if u change to 85 to 86 its showing in ida 86 as well :o
[Windows Mobile Software Development] CRACING:
Yeah I got it too. Not yet the diamond but the one told by anryl and others in nk.exe of diamond. :D

Screenshots are here :

Seems very easy though..... :p

Thanks & Regards
[Windows Mobile Software Development] ivanmmj:
Hmm... I can't find any instances of =aL2dsize0xX on the Herald.
[Windows Mobile Software Development] ervius:
yes!!! ;)

I found it the 1st time, but changeing something, the the diamond stucks in screen calibrations..... :(
[Windows Mobile Software Development] ervius:
pass me the xip.bin in mp, I can try to find something for U ;)
[Windows Mobile Software Development] Ameet:
Same problem with my Diamond ROM. But Aman has agreed to experiment something on this weekend, maybe I'll try and contact him tomorrow :)
[Windows Mobile Software Development] seatone:
same here...:(
[Windows Mobile Software Development] MAFoElffen:
OK Anryl and Ervius... I'm using IDA Pro Advanced 5.2.0.908 32bit. I am looking at a dumped nk.exe from a Hermes. Like Ameet and ivanmmj- I cannot find the string "aL2size0xX" nor can I find the sequence of bytes "B0 05 95 15" (which would be the ASM translation in hex of that instruction set... at least in the instances where others "have" found it).

Answered myself on this by looking at Anryl's EXAMPLE nk.exe. "aL2dsize0xX" was a "named" subroutine in your nk.exe... but not "named" in our devices nk.exe's.

Just still trying to find this for Hermes... which is similar to Kaiser. Here's the nk.exe I'm searching....
[Windows Mobile Software Development] CRACING:
Hello,

I have a problem with ROM date in nk.exe. Its very simply but also very hard to make it possible.

The date format in nk.exe ( S000 ) is M/DD/YY so there is only one hex ( don't know the exact word ) for month and I cannot write 10 or 11 or 12 digits. I have verified some of the nk.exe of different device but thay are in MM/DD/YY and I think only my wizard has single M ( damn developer or creator ). :(

Here is a screenshot :

My query is; Is it possible to create a new hex ( don't know the exact word ) for the M to make it MM? However any other suggestions are requested.

btw; I was to make this work one for the deviceinfo which reads the ROM date data from nk.exe. However I can use the latest deviceinfo ( which it reads ROM date data from reg ) but the call duration don't work or shows "0 hr. 0 min. 0 sec". Its something like cross problem and I must say I'm alone to face this trouble. :(

Best Regards
[Windows Mobile Software Development] CRACING:
No one knows? :(

atleast how to increase the nk.exe and/or S000 of nk.exe? Coz I just want 2 hex to place M.

Please... !!! Spare a little time for solving my issue !!! Please...​
[Windows Mobile Software Development] MAFoElffen:
nk.exe

Edited my last post...

Seems that the nk.exe is more elusive that we first thought... After looking at the nk.exe that ervius and anryl were working with and comparing it to the same file for my "Hermes"- there are some differences.

"aL2dize0xX" is a "defined" pre-named subroutine within

their

nk.exe. It seems that it is not

"named"

in our device's nk.exe... so we can not search by that string of the subroutine- because it is different.

I guess I have to look at how their found subroutine named "aL2dsize0xX" is defined and compare it to what the defines in the Hermes nk.exe I have- to find "that" define... then trace it out (or search) to find that memory address???

I even find differences in the "Date Formats" that someone here (on this page) is having for their Wizard... My Hermes nk.exe has a different "Date Format."
[Windows Mobile Software Development] Duron23:
Hi,

sorry if I am asking the wrong question in the wrong thread,

But, can this LZX compression technique be used in GENE rom cooking.

I mean will it work in GENE ROM cooking.
[Windows Mobile Software Development] ivanmmj:
It can be used for ANY device as long as you do the XIP porting so that the XIP can read the compressed volume.

umm... huh?
[Windows Mobile Software Development] CRACING:
yep, lindary.zhan must be banned coz he/she is post this url all over the site. :mad:

Best Regards
[Windows Mobile Software Development] Ameet:
Thanks. Banned him for life ;)

Let me know if you guys find any more of such spam instances

Now get back to work and let me know how to edit the endRam on Diamonds :D:P
[Windows Mobile Software Development] Duron23:
@ ivanmmj

can you please shed some more light on

"You do the XIP porting so that the XIP can read the compressed volume"

or point me to a direction.

Sorry I am new to ROM cooking, just started the basics and trying to learn by reading and asking.
[Windows Mobile Software Development] tonio94:
I'm quite a beginer too but as I'm facing the same issue than you I'll try to explain what I understood, maybe we will have more luck working on that together.

In fact ROM compression use a dll that can do either XPR or LZX compression (or both depending on the dll you use). This dll is cecompr.dll.

On some ROM, it seems to be enough to drop that file in OEM\OEMXIPKernel but in some other, you need to replace the file directly in the XIP and to make a full XIP porting as described in the first or second post of this thread (extracting XIP/Dumping XIP/Replacing the cecompr.dll file/Reallocating/Rebuilding XIP).

This process needs several files to work : the cecompr.dll folder (with S000, s001, ...) but also cecompr.dll.txt that is supposed to hold some adresses.

My issue is that that every cecompr.dll files posted here were posted without this cecomor.dll.txt file.

I tried every cecompr.dll files posted here with the original cecompr.dll.txt but it's not working (cannot decompress=>stuck on boot).

What device are you working on ?

If you have more success or if you want to try to exchange some informations about that, feel free to mp
[Windows Mobile Software Development] Duron23:
@ tonio94

Thanks for the update and the offer to help me.

I have just begin to ROM cooking, so I don't know much. But very much determined to learn ROM cooking.

Not yet even managed to cooked my first ROM

I am working on HTC GENE (P3400i)
[Windows Mobile Software Development] ivanmmj:
This very thread is the answer. It's the very essense of XIP porting. But I do suggest you also read the articles for your device's forum. I'm a Herald cook. My kitchens do the xip porting mostly automatic. I can help you with the LZX process but you need to know how to cook and port xip firsts as it's somewhat device specific.
[Windows Mobile Software Development] tonio94:
Hi ivanmmj,

Do you know why with some ROM it just need the cecompr.dll files to be dropped in OEM\OEMXIPKernel folder and with some other, it needs a full XIP porting ?
[Windows Mobile Software Development] ervius:
some news on uldr removing/payload resizing/imgfs moveing on xip inserting size!

to automate process, attach the implantxip (for help execute it without parameters by a dos prompt!)
[Windows Mobile Software Development] Ameet:
Hi Ervius. Thanks for the update brother :) But I suggest to also post the command line which the users need to give for executing with your implantxip :) That way it will be easier to understand :) I'll also link this to the first post after your command line clarification :)
[Windows Mobile Software Development] ivanmmj:
Because some kitchens do the XIP porting for you, some don't. Unfortunately, there isn't a tool that does it all for all devices. (Although platform builder and visual kitchen come close.)
[Windows Mobile Software Development] Zecanilis:
Implantxip & Payload Resizer v. 1.1 by ervius!!!

Usage: implantxip -XIP <xip.bin> -PAYLOAD <.nb.payload> [-ImgStart<hexvalue>] [-uldr [tryremove] ] [-PP <MbValue>] [-NoCert]

--------------------------------------------------------------------------------

<xip.bin> xip to insert into payload

<.nb.payload> payload target

Optional [-ImgStart <hexvalue>] *hexvalue* can be: 'Omitted:' (set as default value of IMG start on payload);'0' Reduce IMG Start Section just after XIP-size inserted; '0xXXXXXXXX' Value, set the IMG Start at that Min Value!

Optional [-uldr] if exist, reduces ULDR Part on MBR otherwise, leave the Found Value ON MBR!

Optional [-uldr [tryremove] ] if present (tryremove) try to remove COMPLETELLY ULDR Part on MBR

Optional [-PP <Mbvalue>] if exist, Changes actual PP Value <MbValue> from 0 to 128 (In Mb)

Optional [-NoCert] if exist, Fix ROM For Nocert

--------------------------------------------------------------------------------
[Windows Mobile Software Development] CRACING:
Hello,

I tried to remove uldr part on mbr using implantxip by ervius but I haven't understand what is this ( SORRY to be a n00b ). However here is the report after uldr part removed form mbr.

The total RAM decreased by +/- 1 MB.

RAM usage has reduced by +/-1 MB.

Page Pool changing, works fine.

XIP import to payload, works fine.

Btw, what is nocert? ( SORRY AGAIN to be a n00b ).

Thanks to ervius

Best Regards
[Windows Mobile Software Development] DaveShaw:
NoCert == http://xdaforums.com/showthread.php?t=384137

Dave
[Windows Mobile Software Development] inertiax3:
XIP gurus, another question if I may :)

So I have my XIP.bin ported, it boots nice and all.. but what if I want to replace NK.EXE and all I have is only the new NK.EXE file (not module)?

First thing to do would be to "reversmode" it I guess so I get a module. But how do I create the accompanying txt file (nk.exe.txt) containing info similar to this:

Module name: nk.exe

dwFileAttributes: 00000007

ftTime: 01C99977218FCD00

nFileSize: 0005A4AC

lpszFileName: P+0006FFF0

ulE32Offset: P+0017EF34

ulO32Offset: P+001A0F70

...So that I can use XipPort to realloc and see if there are overlaps?

THANX in advance for any tips ;)
[Windows Mobile Software Development] CRACING:
Hello,

As I know,

1st. nk.exe is device specific and you cannot use new nk.exe.

2nd. You cannot convert nk.exe file to module using reversmode if not the device won't boot.

I'm sure there is a technique to convert nk.exe to module but no one replied to I asked too ( Few posts back ). :(

Best Regards
[Windows Mobile Software Development] inertiax3:
Thanx for the reply ;)

1st - yup, I know.. but I have a newer NK.EXE specifically for my device but not in module format, just a file..

2nd - I hope someone will enlighten us on this one.. PLEEEASE
[Windows Mobile Software Development] CRACING:
1st. Sorry, I was not knowing coz you wrote "new nk.exe" so I got confused. ;)

2nd. Yes, I'm also waiting for this. :)

Best Regards
[Windows Mobile Software Development] Ameet:
Guys, you get the nk.exe as module while dumping the ROM. There's a post somewhere in this thread, which mentions that the dumprom tool gives you the nk.exe as file. Or you can also choose to convert the file to module through misar's reversemode tool :) It does work, I am using my nk.exe converted through this tool
[Windows Mobile Software Development] CRACING:
OK, I tried to do this many days back, using reversemode tool but got suck at boot time. However I gonna try again later since at present I don't need this or xip dumping tool by bepe does it all. :D

Best Regards
[Windows Mobile Software Development] xuandung11a2:
How to Port XIP for Blue Angle?

I have a kitchen rom and now i want config Build information.So i trial port XIP.bin for BA from Xip.bin of HTC Kaiser's ship rom.I dumped ship rom of Kaiser and i had a file name:Xip.bin.NOw I have to use what tool to have Xip.bin from rom of BA.And then how to port xip by what tools?Will I do something to add XIP.bin (new-ported) to nk.nba ?

Hope someone help me,thanks a lot of all and goodluck!!!

I love building rom and I want a Blue Angle kitchen rom to port XIP and Sys for BA .Can you send for me a wm 6.1 kitchen,please?

I hope you help me.

Thankyou.

I love building rom
[Windows Mobile Software Development] akty123:
？？？？？？

hi!!i download a rom from Da_G kitchen!!I use hex edictor to have a look at the os.nb.payload,from 1D0 i found the xip start:24400000,but it was wrong......because it is start at 20000..not 4024*800=2012000!!!why???????:confused::confused::confused::confused:
[Windows Mobile Software Development] inertiax3:
Dear Ameet,

I have acquired the NK.EXE in form of a module (not by using reversmode). It is an updated version specifically for my device. The NK.EXE module directory contains the following files:

imageinfo.bin

imageinfo.txt

S000

S001

S002

S003

S004

Now, can someone PLEEEEASE tell me how to integrate this new NK.EXE module into an working XIP dump?

BTW, running m'reloc_nk.exe on the above NK.EXE module does absolutely nothing - whatever value I type in and press modify it IGNORES it.. also, I cannot enter characters A-F at all in the boxes.

Please I am desperate.. can this even be done?!
[Windows Mobile Software Development] Ameet:
There's nothing to integrate. Simply replace the current nk.exe module with the new one in your xip folder

For editing the value in mreloc_nk tool, simply

copy and paste the new value excluding the last digit it in the Mreloc_nk text box overwriting everything and manually type the last 0 ;) Then click DoIt :D
[Windows Mobile Software Development] inertiax3:
Believe me I'd love to but any value I type in and press "DoIt" it - it reverts back to the previous value with this new NK.EXE module... using Mreloc_NK on the old NK.EXE works fine :confused:
[Windows Mobile Software Development] utak3r:
AFAIK auto-porting won't work with BlueAngel... you have to do it fully manually, so get reading from the start of this thread ;)
[Windows Mobile Software Development] MAFoElffen:
"end ram address" nk.exe hacking/porting changes into the nk.exe...

Hey- Ameet, ivanmmj, anryl, ervius, mac_es, xdmcdmc... Has anyone have any luck with this in any device other than Kaiser or Polaris? Is anyone still trying this for their devices (other devices) or did you all just go on to other things?

Seems like you guys were interested like "wild fire" for 2 days... then nothing. I'm still interested and curious to work it out for Hermes! Seems to me that a 5mb to 20mb RAM gain in a device is worth a little investigation... Just Me.
[Windows Mobile Software Development] Ameet:
It started with a BANG but when we found out this doesnt work on Diamonds yet, I quit out :D
[Windows Mobile Software Development] anryl:
i just got mine diamond so first have to get used to it then later gona hack it :D
[Windows Mobile Software Development] mac_es:
No luck :( it is very dependant in nk.exe. I

have changed the ram address in romhdr but whithout any result. I think that there is no way in Trinity, to obtain more ram the ram must be there. I think that Kaiser/Artemis get this ram because it was reserved for graphics driver.
[Windows Mobile Software Development] xdmcdmc:
And this should work also for Diamond and all other devices that have part of RAM allocated to graphics driver.
[Windows Mobile Software Development] mac_es:
Yes, but you will need the driver whithout that memory claim...
[Windows Mobile Software Development] MAFoElffen:
end ram address

I'm still looking in to it.

cmonex said that the nk.exe is device specific and that the "end ram address" is device specific. She also told me that HTC made this more complex by "wasting" this RAM for various (not just one common) stuff.

In the Polaris (and as it sounds, the Kaiser) this RAM was reserved for 3D drivers. On the Titan, mentioned 8MB that was wasted for a <bleep> camera driver (that said there was a similar patch for)... and that other devices may be wasting RAM for other stuff.

Tips from cmonex to me were "examine the specific device model first. it may need some work to find out where the RAM can be saved and how much of it." My own impression (after reading her pm on this) on the End RAM Address is that that each device's End RAM Address also may effect the device specific drivers that they reserved this reserved memory for... Such as, didn't anryl say that for Kaiser he had to use an older graphics driver?
[Windows Mobile Software Development] Nixeus:
Hello my friend,

Just a question.

Is the method for porting xip on wm6.5 the same as on wm6.1 ?

Thanks a lot,

regards,

Nixeus
[Windows Mobile Software Development] ivanmmj:
Yes, it is.
[Windows Mobile Software Development] MAFoElffen:
+1 Yes... Currently running build 21731 and working on build 21806. I think porting and building in 6.5 is a little easier in 6.5 vs. 6.1 (and more fun...)

You still have to look out for overlaps... This is more of an issue with the 6.1 kernel since the 6.5 has two new virtual memory slots were as 6.1 has one. Touch Pro for instance:

But the tools and knowledge available now (such as here), make things much easier!
[Windows Mobile Software Development] Nixeus:
Thanks a lot my friend for your good answers !

I need to investigate becasue my wm6.5 roms don't boot :(

I cook with plateformeRebuider for an HTC Touch ( ELF).

I have already cook a lot of wm6.1 roms, but, i have difficulties with wm6.5 :(
[Windows Mobile Software Development] c_shekhar:
The cecompr.dll module posted here does not have imageinfo.txt . cannot put this inside the XIP using XIPPORT.

Can I have the module with imageinfo.txt?
[Windows Mobile Software Development] utak3r:
well, we need something more than just "don't boot"... on which splash screen it hangs? Did it initialized power driver (you can observe it)?...
[Windows Mobile Software Development] utak3r:
here you go, my friend :)
[Windows Mobile Software Development] c_shekhar:
Grateful to you my old friend. let me too taste the LZX compression of my ROMs now.. :)
[Windows Mobile Software Development] utak3r:
you'll love it, I'm pretty sure :)
[Windows Mobile Software Development] c_shekhar:
Wow! bro! It saves 12 MB of storage space on my Diamond. Great!!!:)

Every thing works great..

I can even rum XPR ROM with this cecompr.dll in my XIP.

Only irritant is the slowew dowm PC while compressing it in LZX :(

Thanks a lot bro!!!
[Windows Mobile Software Development] CRACING:
Did you used the patched cecompr_nt.dll?

Best Regards
[Windows Mobile Software Development] utak3r:
well, it has nothing to do with a speed ;) The patch is for not ending your RAM pool ;) But the speed of LZX compressing is really, really lower, than XPR compressing.
[Windows Mobile Software Development] CRACING:
Yeah, you are right. :)

@c_shekhar; how is the speed of OS ( In your device )? I heard that the device slows down when we use LZX compression and I have faced a lil slowly on my wizard.

Best Regards
[Windows Mobile Software Development] utak3r:
maybe try enlarging your storage manager caches (various entries under HKLM\System\StorageManager in your boot.rgu). On my Hermes I can't see any slowdown - but I'm using high caches for the best performance.
[Windows Mobile Software Development] CRACING:
Ok thank you. I gonna try soon. :)

Best Regards
[Windows Mobile Software Development] utak3r:
My Oxygen, which has Omap850 and 64MB of RAM - the same specs as Wizard - runs on LZX really smooth :)
[Windows Mobile Software Development] CRACING:
Cannot understand which entry on HKEY_LOCAL_MACHINE\ System\ StorageManager. :confused:

Can I try advanced config?

Performance -> File system cache size and/or File system filter cache?
[Windows Mobile Software Development] MAFoElffen:
This statement is vague and got me curious... "Here" is the place to work this out- Please explain more... Where is it hanging? ...But previous to that, what are you using as files to port "from/to", what sys, what base oem. Some builds of 6.5 are dependant "other files" and are a mix of different build's files for a working sys for a particulr build's XIP. Other peculirities are that some 6.5 modules are large in size and are better converted to files before cooking- to make it easier to prevent memory overlaps... etc. Working out some memory overlaps "are" still an issue- But once you get those worked out...

Yes --- The most important part of all this "is" your XIP. This will make or break you.

Old or New style PlatformRebuilder? This makes a difference on what files you need and how they're setup. ...Like whether you need a .Rom folder or not... And what the template format for your XIP needs to be in before cooking in your kitchen.

What build are you trying to get up? I've got quite a library of past builds, with access to Elf specific files... If you need help on build, "here" is where to ask... And the people "here" are the ones to ask.
[Windows Mobile Software Development] utak3r:
Yes, it's one of them - but not the only one.

Some few more to try:

[HKLM\System\StorageManager\FATFS]

[HKLM\System\StorageManager\Filters\fsreplxfilt]

[HKLM\System\StorageManager\FATFS\Filters\CacheFilt]

[HKLM\System\StorageManager\Profiles\FLASHDRV\FATFS]

and if you want to:

[HKLM\System\StorageManager\Profiles\SDMemory\FATFS]

plus of course the page pool.

BTW, somewhere about 2 years ago I had try it on my Wizard and it was running ok :)