yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] Topogigi:
Hi Buzz,

I'm sure that some .dll.mui are not loaded neither at boot time neither at runtime, cause I manually copied the italian .dll.mui extracted from a dump in the \Windows directory. Then I launched the correponding application and tried to delete the .dll.mui when the application was still alive and running. When the .dll.mui is loaded in memory, you simply cannot delete it (it's in use).

So, my problem is: Why some .dll.mui extracted from a dump do work and some others do not work even if they are injected into the rom?

My answers actually are:

1) Some .dll.mui are dumped from the \Windows directory not correctly and they are not exactly the same as the original.

2) Some .dll.mui are modules and they have to be modules to be correctly recognized from the related application. If you load them in ROM as files, they are simply ignored by the OS.

What do you think about it?

Thank you very much for your answer!
[Windows Mobile Software Development] baniaczek:
@Topogigi

I think your MUIs are not perfect from technical point of view.

I'm trying to do the same, but using polish localization.

I've got *.0415.mui from buzz_lightyear [many, many thanks, buzz]. I think, they are extracted from Wm5 PLK emulator.

They are good enough to put them into \windows, but nothing more.

I cann't edit them. Only "Resource Hacker" and "eVc [open as resource]" are able to open my MUI. Other resource editors fails.

Nor "Resource Hacker" nor "eVc" can properly edit and save MUI.

Even modified and saved - MUI files are destroyed.

Try this: open MUI, edit any string from any

stringtable

, save, deploy and try it. I've got a lot of garbages.

Do the same with MUI extracted from CAB. For example "WirelessMgr.exe.0409.mui (2.0.0.0)" from http://wiki.xda-developers.com/index.php?pagename=BA_ERK_Patches_142 - no problems.

I've decided to rebuild all MUIs from scratch, using [old] extracted MUIs as a template only.
[Windows Mobile Software Development] gimpdog:
@efjay everything looks good. the only thing i see is that your -so and -sl are backwards from the editfix.bat example but i don't think it should matter. sorry i couldn't be of more help.
[Windows Mobile Software Development] efjay:
@gimpdog, yeah i think im just out of luck with this. Thanks for the help anyway.
[Windows Mobile Software Development] mamaich:
If you add new modules to ROM (which are dumped as directories), you should check that they don't overlap any of the other modules - look into dump_MemoryMap.txt. Otherwize the behaviour is undefined, in the best case the DLLs would not load, in the worst - the device would not boot. You can try to reconstruct directories as normal DLLs, this is possible, but I never had time to write such tool. Or you can dump MUI DLLs with my "TestWM5" tool posted somewhere on this forum. It would produce invalid modules (they would not load on device), but they can be opened in any resource editor, resources can be extracted correctly and placed to working DLLs.
[Windows Mobile Software Development] KTamas:
I have a few questions...

1. What happenes if i change the ROM version from XDA3NbfTool with -sv? A different version appears at the bootscreen and at device information and that's it?

2. Do I have to use -sd -so -sl when i re-make the cooked ROM?

3. Can I edit the registry of the dump somehow?
[Windows Mobile Software Development] Topogigi:
Thanks, Mamaich, for your reply. But the .dll.mui I tried to insert into the new rom I cooked were already extracted with "TestWM5" form an original italian device. So I added them to the ROM as files and not as modules.You do confirm what i supposed, i.e. some of the .dll.mui extracted are not good (probably the ones that were modules on the original device). I'll try the resource editor way and report the results...
[Windows Mobile Software Development] Asukal:
ya ya! thanks! mamaich, it was not crashed and can be replaced file on my universal rom!

and i am trying to flash it to mime!

split nk.nbf to nba file with alpinenbfdecode.pl as Mamaich's recture.

then proceed ROM Editor to replace wince.nls(original 240kb and rplaced to 1.5MB)

but it can boot! miracle! thanks mamaich! this rom will help many asian poeple, such like a Chinese / Japanese / Korean /Thailand!

I wanna kiss you mamaich very much! :D :D :D :D
[Windows Mobile Software Development] Topogigi:
Thank you very much, I'll try this way!
[Windows Mobile Software Development] zohaer21:
is there any chance i can end up screwing my device up (harm the bootloader) with these tools...i wanna experiment but dont wanna end up in a situation where i cant flash the original rom onto the device via usb method
[Windows Mobile Software Development] mamaich:
More info is here - http://xdaforums.com/viewtopic.php?t=34560
[Windows Mobile Software Development] mamaich:
My tools don't touch bootloader. But something can go wrong in a modified OS and it can trash everything on your device. The worst case I had - my DOC was completely destroyed (it was a fault in a trueffs driver). I cannot guarantee that you would not destroy your device with ROM images produced with my tools! Even the official ROM upgrade can potentially kill bootloader.
[Windows Mobile Software Development] TofClock:
hello mamaich , very good work ...

It appears , when i use viewimgfs.exe , a file called "dump_MemoryMap.txt" that contains offset of modules in rom , isn't it ?

but not all modules ...

i've tried to do this in 1.62c.07 (XDAII) and replace module "bbres.dll.0804.mui" directly by "bbres.dll.0409.mui" ....

but there is a problem ....

0.409 is bigger than 0804 and if i use DelFile>AddFile , begin of 0409 file is in place of 0804 file (offset #DDxxxxh in .nba) but the end is at #18CxxxxH .....

if i try to change directly the module , with viewimgfs ... how to change offset or modify the module sizy in rom ?
[Windows Mobile Software Development] buzz_lightyear:
hey TofClock!

where have you been?

:o)

buzz
[Windows Mobile Software Development] KTamas:
Just finished my very first cooked WM5 ROM :) Worked very well, althought i have just removed some stuff from the ROM for the first step...step two, adding custom stuff, coming up...
[Windows Mobile Software Development] Asukal:
Surprised! 10MB files can be injected and f;lahsable!

i tired to make many vesions of ROM,

Biggest one is 8.4MB font and 1.5MB wince.nls can be injected and

able to flash to rom. of course my Universla could be bootable.

The Total Storage and Program memory was 43.72MB and around 50MB.

Just same as before.

The free momory also same. this means the ROM has very wasted space

in it.

Now spurprised! so much!
[Windows Mobile Software Development] KTamas:
WARNING: It seems that this tool is not perfect yet...serveral files in the cooked ROM were damaged...for me, it was:

instmsgrresources.96.dll (this causes that MSN messenger can not load at all...I manually extracted this .dll from the Pocket MSN install CAB and copied back to device, now it works)

PACE_3GPDEMUX_FILTER.DLL

PACE_FileDump_Filter.DLL

PACE_MP4VEncoder_DMO.DLL

PACE_NBAMRDec_Filter.DLL

PACE_WBAMRDec_Filter.DLL

(I assume these PACE* stuff some sort of codecs for the OS, but i have tried to play mp4 files with TCPMP and it worked)

Edit: I found this about PACE:

http://www.pace-softsilicon.com/products/Products.htm

...and two files I've added. I had something like this at the first cooked rom too (this was my second).
[Windows Mobile Software Development] Asukal:
difference security revel in ROMs

i have found follows

i injected same Japanes font into 2 different ROM image.

Qtek900 and O2,

And also i placed cab files which can edit fontregistry automatilay,

also small aplications from ExtROM

But result was different.Of course used same edited Extrom.

On the Qtek, the registry and small aplli can enable,

But on O2 ROM, everything ignored at all!

Tried to many times, got same result!

SO i think O2 has heavy security in Defaul.

This was one of reasons that mui or some dll can not used , ???
[Windows Mobile Software Development] mamaich:
It contains only "modules". I.e. files that are fixed in memory and are dumped as directories. Im 2003SE they were called XIP, I don't know how they are called in WM5.

KTamas

Probably these files overlap some other files in dump_MemoryMap.txt

Dump your modified ROM and look for the output of viewimgfs. It would write "Ram Address: %08X (%s) overlapps '%s'" in this case.
[Windows Mobile Software Development] Topogigi:
Re: difference security revel in ROMs

Qtek rom ships with security prompts disabled by default. All the other ROMS i used need the tool attached to this post to load .mui correctly.
[Windows Mobile Software Development] TofClock:
A lot of work buzz , and no time to play with my phone :)
[Windows Mobile Software Development] Asukal:
Re: difference security revel in ROMs

@Topogigi

Thanks! but i already have it.

on The O2

the problem is, the CAB of my original Registry from Extrom / Appli CAB i located from Extrom will be not allowed to install or reconizedafter hard reset

no chance to use this program amoung the time after hard reset.

(some of them can installed, but once i try to excute that, the eror will come, but i install same cab manualy, those cab can be usefll on the O2)

Exaple, i injected Japanese FONT into OS ROM, then font registry to register this as SYstem font is from ExtRom.

on the QTEK ROM i can see the DATE on Today in Japanese perfectry.

on the O2 ROM i couldnt see the date in Japanese.and check the registry,

no regsitry was imported from ExtRom.
[Windows Mobile Software Development] TofClock:
Hi Mamaich

I want to inject a new boot.rgu in a rom file , how to do this ???
[Windows Mobile Software Development] buzz_lightyear:
boot.rgu is not enough. it is just used to generate boot.hv which is then used at boot.

So you need to have both on your device.

boot.rgu is a plain text file, which you can edit to your liking.

boot.hv is a 'hive' file in some new database format and must be generated.

I can generate boot.hv for you out of your boot.rgu file on monday.

mamaich can do the same for you, if he has time to.

also bare in mind, that boot.hv is just for initial boot phase.

once boot phase 0 is completed and some basic set of drivers are loaded + compressed filesystem is mounted, there is default.hv loaded and this can (and it will) override your settings from boot.hv

buzz
[Windows Mobile Software Development] KTamas:
How can I re-generate default.hv with rgucomp.exe? I'm able to export it ("rgucomp.exe -o dump\default.hv -nologo > default.rgu"). I even put "REGEDIT4" in the first line of the file, but RGUcomp gives me the following error:

Microsoft (R) RGUComp Version 1.0.000
Registry file processor and hive builder.
Copyright (C) 2004 Microsoft Corporation All Rights Reserved.
built: Nov 19 2004 15:17:13
ExtractPackageFiles: (RGUComp) !ERROR unable to find packages matching ".\Packages"
GenerateDefaultHives: (RGUComp) !ERROR unable to extract all .rgu files from packages
wmain: (RGUComp) !ERROR failed building DEFAULT hives

I've also tried to put default.hv/default.rgu/boot.hv/boot.rgu into a "Packages" folder; same error.
[Windows Mobile Software Development] zohaer21:
hi

what command should i use to convert nk.nbf into nk.nba using xda3nbftool.exe

thanks
[Windows Mobile Software Development] KTamas:
xda3nbftool.exe -x nk.nbf nk.nba 0x20040521

Then fix your country/device/language code, dump, edit, etc., but before you convert back your nk.nba to nk.nbf, do this:

xda3nbftool.exe -c -u nk.nba

then do

xda3nbftool.exe -x nk.nba nk.nbf 0x20040521
[Windows Mobile Software Development] bepe:
is there any chance to dump Windows Mobile 5.0 Emulator Images
[Windows Mobile Software Development] TofClock:
I know how to change boot.rgu file and how to generate the boot.hv file , but i don't know how to inject it on nba file ....

Another thing ... when we flash the phne , how is generated the registry ??

i've think that the registry is generated by all the rgu file :

0cf44-112-44-....rgu and other ....

i've tried to modify them and reinject in nba file , but after flash , the file in /windows are changed , but not the registry ....
[Windows Mobile Software Development] buzz_lightyear:
try to rename default.rgu to boot.rgu.

Then run it through rgucomp to get boot.hv.

Rename boot.hv to default.hv.

hmm..maybe it will work...

buzz
[Windows Mobile Software Development] bepe:
is there any chance to dump Windows Mobile 5.0 Emulator Images

(B000FF)

D:\prepare_imgfs.exe D:\PPC_GER_GSM_VR.BIN

returns: Searching for IMGFS start... Not found!

D:\viewimgfs.exe D:\PPC_GER_GSM_VR.BIN

returns: Unable to load compression DLL!

and after splitrom.pl the same

dumprom.exe works but I need the modules

or is anyone in possession of a German ROM(WM05)? I cant finde one :cry:

Is it posible to convert .hv to .rgu

the other direction is simple -> thanks to mamaich
[Windows Mobile Software Development] TofClock:
try this in a dos prompt :

rgucomp.exe /?

you have 3 options for rgucomp

-b to generate a .hv file with a .rgu file

-nologo is to not display the copyright of rgucomp

-o is to extract the rgu file of a .hv file ...
[Windows Mobile Software Development] KTamas:
I've done this...Gonna try what buzz said.
[Windows Mobile Software Development] bepe:
:oops: ok that is simple too

now the same question: How to inject

I think you allready know

RegistryHiveROMDependency

but it was interesting for me

I cant find anything about .rgu files
[Windows Mobile Software Development] KTamas:
Okay, renamed default.rgu to boot.rgu, then ran rgucomp -b, and got this error:

Microsoft (R) RGUComp Version 1.0.000
Registry file processor and hive builder.
Copyright (C) 2004 Microsoft Corporation All Rights Reserved.
built: Nov 19 2004 15:17:13
importing registry file ".\boot.rgu"...
InitRegistry FAILED in file ".\boot.rgu" within a few lines of line 1.
BuildBootHive: (RGUComp) !ERROR failed importing ".\boot.rgu"
wmain: (RGUComp) !ERROR failed building BOOT hive
[Windows Mobile Software Development] KTamas:
How can i make the ROM perform an action after a hard reset? I mean executing a specified file (it is importing a .reg file via TRE via command line options, but i want to do it after a hard reset, automatically)
[Windows Mobile Software Development] bepe:
@KTamas

your .rgu format is wrong

MS-Editor "Save As..." and select Unicode
[Windows Mobile Software Development] KTamas:
So i need them in unicode...thanks.

Edit: YES! Finally working! Thank you very much :) I can now integrate everything straight into the ROM, the patches, the apps...anything! woohoo! :)
[Windows Mobile Software Development] bepe:
@KTamas

how did you dump your .hv files

and how to put them back?
[Windows Mobile Software Development] KTamas:
To dump:

rgucomp -o dump\default.hv -nologo > default.rgu

Put "REGEDIT4" into the first line, then add your registry keys, etc.

rename default.rgu to boot.rgu, then:

rgucomp -b

Then rename the generated boot.hv to default.hv.
[Windows Mobile Software Development] bepe:
sorry,

how did you get them out of the nba image

and how to put them back
[Windows Mobile Software Development] KTamas:
With mamaich's tools:

(From the readme)
The typical process should be:
prepare_imgfs.exe nk.nba
viewimgfs.exe imgfs_raw_data.bin
...modify "dump" directory as you need...
BuildImgfs.exe
make_imgfs.exe nk.nba
[Windows Mobile Software Development] KTamas:
Right now I've finished building a ROM with almost all patches included and serveral applications, edited initflashfiles.dat and registry, gonna flash it now.

(gosh, i hate reinstalling my PDA every day...but it is worth it for playing with ROMs, lol)
[Windows Mobile Software Development] bepe:
:roll: Ok the file was hidden

I'm still searching a german WM5 ROM or a way to dump Emulator Images
[Windows Mobile Software Development] buzz_lightyear:
what exactly do you need from german wm5?

buzz
[Windows Mobile Software Development] KTamas:
Whoops, I guess i messed up my initflashfiles.dat file somehow, cause the rom I've flashed had some, uhm, problems (read: initflashfiles.dat was not executed, no welcome screen, etc., empty start menu with only "today" and "coldinit" items, etc....). Flashing again :roll:

Edit: okay, now it works, restored the original initflashfiles.dat. Now, time to reinstall some applications :roll:
[Windows Mobile Software Development] KTamas:
Okay, now i have a ROM with 98% of the patches (everything except midi, currently) and some additional software. If i figure out what went wrong in initflashfiles.dat, i will have some custom shortcuts in the start menu as well.
[Windows Mobile Software Development] bepe:
I nead all german files (.mui, .htm, .txt, .dat, .hv)

and a working TranRecoDeu.dll v2.0

(@buzz_lightyear: I PM'd you)
[Windows Mobile Software Development] Asukal:
to dump the emu image

you'll need any windows port of perl. I use ActivePerl -

http://www.activestate.com/Products/ActivePerl/

B000F to the NB format with the command:

perl splitrom.pl PPC_USA_GSM_VR.BIN -wo ROM.BIN -oe 0x82000000

and then dump it as a normal rom:

dumprom.exe ROM.BIN -5 -d C:\ROM_DUMP

mr,mamaich teached me in past
[Windows Mobile Software Development] bepe:
dumorom.exe tries to reconstruct .dll and .exe files with a standard part at the beginning, this works to get the resurses.

I tried to transfere the TraRecoDeu.dll, extracted with dumorom.exe, from ENG-emu-image to GER-emu-image, but it didn't work

so I nead them as module
[Windows Mobile Software Development] Asukal:
i did dumped all of mui, .htm, .txt, .dat, .hv from bin-emulator image with this way. chinese emu, japanese, english.

if you couldn't, i will do for you. pls send me a german Emuimage.
[Windows Mobile Software Development] bepe:
mui, .htm, .txt, .dat, .hv are working.

.dll and .exe files are the problem.

but thanks
[Windows Mobile Software Development] Asukal:
i see.
[Windows Mobile Software Development] celiruss:
well.. this is driving me insane...

I've been trying to convert my edited default.rgu back to hv... tried the renaming to boot.rgu, and keep getting errors...

I also made sure it's unicode w/the REGEDIT4 line on top

C:\WINCE500>rgucomp -b

Microsoft (R) RGUComp Version 1.0.000

Registry file processor and hive builder.

Copyright (C) 2004 Microsoft Corporation All Rights Reserved.

built: Nov 19 2004 15:17:13

BuildBootHive: (RGUComp) !ERROR unable to mount hive file ".\boot.hv"

wmain: (RGUComp) !ERROR failed building BOOT hive
[Windows Mobile Software Development] celiruss:
nevermind.. i'm an idiot
[Windows Mobile Software Development] celiruss:
well.. i successfully used these tools and have my nk.nba ready to go, but for some reason, when I try to use xda3nbftool to create the nbf, it gives me an error

xda3nbftool -e nk.nba nk.nbf 0x20040521

WARNING: this does not look like a nbf header

WARNING: checksum is not ok

I personally am very new at this and would appreciate a little push in the right direction.

Thanks
[Windows Mobile Software Development] TofClock:
try to run first :

"xda3nbftool -c -u nk.nba" to update the checksum file

and after

"xda3nbftool -x nk.nba nk.nbf 0x20040521"
[Windows Mobile Software Development] celiruss:
thanks.. that worked great, although the edit I made didn't help trying to get the BA wm5 rom to the cdma version...

anyone happen to know what the .dsm files are? It seems as if they're a binary version of the rgu files in the wm5 dump
[Windows Mobile Software Development] celiruss:
once again, i found my answer... i should really search before posting :roll:
[Windows Mobile Software Development] buzz_lightyear:
to which one of your questions you've found the answer?

THANX

buzz
[Windows Mobile Software Development] celiruss:
regarding the dsm and rgu's.

I edited the rgu w/a text editor, rgu w/a hex editor.

I'm currently backing up my device and am about to try to flash it to wm5 and see if i get the no gsm error *crosses fingers*
[Windows Mobile Software Development] buzz_lightyear:
...and the answer is... ???

thanx and good luck

buzz
[Windows Mobile Software Development] celiruss:
i'm not quite sure what the answer is, but it looks like all the rgu's and dsm's in the windows dir get added to the registry on boot, which is why editing only the system.hv didn't work.
[Windows Mobile Software Development] buzz_lightyear:
i'm asking, coz I have no idea, what the .dsm files are exactly.

but my guess is, that they are some signatures/certificates or checksums of the packages.

well, i'm not quite sure, what do they call packages, but my guess is, that instead of XIP blocks (wm2003), we have now packages, where each package has it's own registry part (.rgu) and can be upgraded independent from the rest of OS/packages over the air (OTA) using imageupdate feature.

but as I said... just guessing...

buzz
[Windows Mobile Software Development] celiruss:
yeah.. i'm just guessing as well..

how long does it take for the white screen to go away after you hit the mail icon?
[Windows Mobile Software Development] buzz_lightyear:
some info regarding .hv files:

http://blogs.msdn.com/ce_base/archive/2005/09/22/472807.aspx

buzz
[Windows Mobile Software Development] celiruss:
yeah.. i already read that... right now i've got the rom loaded, changed the options in the stripe screen, hit the mail icon, i got the white screen, but it seems to be sitting there for quite some time... don't know if it's hung or not.
[Windows Mobile Software Development] KTamas:
I think max. 10-15 secs, maybe 20. If it is still white after a minute, it is definatelly not right. I've created some ROMs not for testing, and one had wrong data in .VM and .ROM (I've basicly combinded the Himalaya-to-BA port ROM with BA WM5 v3's .VM and .ROM), it ended up that it hanged on the white screen forever after pressing the mail icon. So be very careful with .VM and .ROM, also with combining ROMs.

(Of course, i could still get into the bootloader and flash an another ROM)
[Windows Mobile Software Development] buzz_lightyear:
actually the last paragraph of that blog is very interesting...

how about to have empty default.hv and user.hv?

if I got it right, system.hv and user.hv will be generated on coldboot out of the .rgu files.

buzz
[Windows Mobile Software Development] celiruss:
what do you mean by .vm?

I pretty much took the v3 nbf and edited the hv's, and added the rilphone.dll from the alpine ... but yeah.. it took over 2 minutes for the white screen, so i'm back at a 2k3 rom for now