yashsingh1/xdaforums huggingface dataset:
[Windows Mobile] pupakota:
so, when it will be?

i mean - i have difficulties in understanding usefullness of this tool, what exactly it can help with?

do not understand me wrong - i am fanatic of optimisations - my goal is to make lowest possible ram usage(from os side mainly) and i am succesful, tbh, but i just cannot get idea of this soft regarding my goal in further search for moarr.
[Windows Mobile] ultrashot:
ok, your request was added to mythical TODO list.
[Windows Mobile] pupakota:
i did not have "request", so skip it.

i'll leave it for elite.
[Windows Mobile] illi:
My DHA Report

I get a "very good. No actions are required." report:cool: See attached screen capture.

What I did was, I reversemod all modules that has a null in my health report; except rsaenh.

I'm not sure if this has any effect on gwes. But I think I have memory leak. At hard/soft reset my gwes is around 3MB. I will then open as many apps as possible. At one instance the gwes was around 12MB. Even after closing most of the apps it is still around 12Mb. However, I didn't notice any lag on the device's performance.

A few modules still have null in the report; keypad.dll, htmlnote.dll and a few others. For the keypad.dll probably because I also recmod it.

I am still puzzled. Should I not recmod those that are to be reversemod?
[Windows Mobile] ultrashot:
Reversmodding doesn't cause any leaks. In most cases you will have more free memory after reversmodding as modules will be paginable. It means that module won't be loaded fully - only some pages will be in memory, others will load by application/system demand. You treat it as memory leak but it isn't.
[Windows Mobile] illi:
Thanks ultrashot for the clarification. So with the "very good" report, I should be doing fine, I suppose.

Thanks
[Windows Mobile] Farmer Ted:
The big killer for GWES is the 6.5 lockscreen. Once you load it after a reset, you get a 5-6MB RAM tax on GWES. Also, the 6.5 start screen eats a crapload of ram out of GWES.

Personally, I use the lockscreen because it's cool, but I ditched the start menu for XTask a long time ago.
[Windows Mobile] illi:
I still use both though. But by recmod keypad.ddl and then reversemod it; does it mean I am doing it "round the bush way"? Should I only reversemod the keypad.dll?

Thank F Ted
[Windows Mobile] Farmer Ted:
I think if you recmod the module, then reversmod it, you oughta get right back where you started. Shouldn't you, lol? I have had a few weird cases, though, where I did similar things and then ended up with a file or module that was significantly bigger than what I started with, I think. There must've been padding added, or something like that.

I would just leave the keypad as a module. It's loaded all the time, so you're not wasting anything.
[Windows Mobile] illi:
Very good advise:cool: I'll do that.

Thanks
[Windows Mobile] ultrashot:
Yes, sometimes recmod seems to be buggy with shared r/w sections. Not always...
[Windows Mobile] illi:
My FileExplorer is buggy. Sometimes it took more time to list the files & I am not talking about the \Windows folder. It effects even the SDCard main directory. Like you said.. Not always...:)
[Windows Mobile] Farmer Ted:
Is there a list anyone's put together of modules that work fine when the r/w flags are switched to shared? It's pretty easy to switch the flags, but I'm not really sure where I want to start. I imagine this will cause plenty of headaches, lol.
[Windows Mobile] ultrashot:
Most of services and drivers (those that have entries in HKLM\Services and HKLM\Drivers\BuiltIn\) could be shared if they don't have some extra exported functions (something different from XXX_*).

Manila files

can't

be shared. Don't even try...
[Windows Mobile] Farmer Ted:
So, I'm looking at the exported functions for swmgmtservice.dll, and there are 5 of them. They're all named 'SWM_Close', or similar things. You're saying it's probably ok to share this dll? And the thing to do is to look for services that have additional functions that have different naming formats. For instance, with USSD_service.dll, there are some functions named something like '??0USSD_Service@@QAA@XZ', but then there are a bunch like 'APP_Close' and another one named 'PreProcessDialRequest'. I guess I should avoid sharing this one, then. Is that about right?

Thanks!

Edit: I guess the driver that would give the biggest bang-for-the-buck is cif.dll. That one uses 168 pages of virtual memory. Somehow, it seems too good to be true to me that I can just tweak the shared flag and that will all go away, and the camera will still work properly. Has anyone tried setting cif.dll to shared? These are the exported functions:
[Windows Mobile] ultrashot:
yes

That's was the first library I've made shared during tests. Works well.
[Windows Mobile] Farmer Ted:
Ok, I've done a quick test with cif.dll. The first thing to note is that it has 2 r/w sections (s001 and s003), at least in my case with a raphael. And you're right, the darn thing still works when the module is set to shared, and it saves a lot of VM in slot 0 high, which is impressive. (Edit: forget comment about lost ram; had another issue-this works real, real well).

So, does the code get loaded into one of the late slots, like around slot 40-60? I know some of those slots are designated 'Shared'. That's where wmp dumps code, when it uses an insane amount of RAM (like >140 MB at times).

Edit: This is a really, really awesome tweak. Thanks, Ultra!
[Windows Mobile] ultrashot:
my SE X1 (HTC Kovsky) is a very similar device, so everything is nearly the same :)

as far as i remember code is being loaded into 60, 61, 0 slots.

Btw, my manila 2.5-based rom (full of htc crapware, unusual services and so on) consumes less than 5 megabytes in slot 0. Nice for such a big rom.
[Windows Mobile] Farmer Ted:
Have you tried putting the shared flag on .exe's? Would it do anything good?
[Windows Mobile] Farmer Ted:
Hey Ultra, funny thing: so, I had cif.dll set to shared (both the soo1 and soo3 binaries), and the camera worked ok, except playback of videos on my device was buggered. I couldn't open videos with wmp, and with Core Player (which I normally use), the videos would only show the first 2 seconds, then they'd repeat. They played fine on a pc, though. So, I removed the shared flag from the soo3 binary, which is only one page in size, and now the camera works fine. Have you noticed anything similar on your device? I guess not; someone would've pointed it out by now. Setting the soo1 binary to shared is the big winner, though. I'm not sure I'll test out the other drivers/service. I'm already under 5 MB of usage in slot 0 High with this tweak.
[Windows Mobile] ultrashot:
No, I don't have such issues in my ROM. S001 and S003 are shared.
[Windows Mobile] ypsmav:
Thanks to Ultrashot, AndrewSh and all contributors for this great thread that allows to understand why some of ROMs have performance problems.

I have alot of work to free up my VM and I have some questions about the DevHealthAnalyzer tool and the actions to be performed. Pls bear with me if the questions are too stupid.

1) when I analyze the Module report, I've noted that there are some modules in grey and some in white. (pls see image below). What is the difference?

2) I'm a bit confused about the effect that Recmod have on the dlls located in the slot 0. In several threads people say that Recmoding a module will move it from slot 0, but as per your previous explanations the modules have to be hex edited and sharing r/w sections.

Would have recmod a module or package reduce the use of the slot 0?

3) In the case of the CIF.DLL I have as a file, so the procedure would be to reversmod and then change the flags? or better to use LordPE directly on the file?

4) Just for a starting point, besides CIF.DLL, which other dlls have you relocated with good results?

5) On Manila Dlls/packages, any suggestions of which can be relocated?

I've noted some big eaters are:

- Phone canvas.

- Social Network.

- Manila core.

- contacts.dll

6) does make any sense to rellocate dll from OEMXIPKernel?

Thanks in advance.
[Windows Mobile] ultrashot:
ypsmav,

1) size.

2) this information isn't really valid for wm6.5 since no modules eat up slot 0 place here. They can, but you have to fullfill too many slots for that. RW sections eat slot 0 space even if they their libraries are recmodded.

3) lordpe

4) Hard to say. Most of services and half of drivers that have _IOControl-like functions.

5) No manila files can be shared. Don't try. phcanhtc.dll can be. Regarding social networks - don't know.

6) No. Anyway they almost don't influence on VM status.
[Windows Mobile] Farmer Ted:
I shared the first r/w section of cif.dll and I also found that I could share the dll's from Resco Audio Recorder, which I use instead of the HTC voice recorder. That was awesome, because there are 3 dll's in the Resco package that use ~1.6 MB of shared r/w space. I couldn't use them as modules before, but can now without any issue.

I tried sharing the two dll's that come with SK Tools, but that was a disaster, lol. It's pretty easy to test most dll's out. You don't need to re-cook or flash. Just over-write the file you have in rom with the modified (shared) one, then try to run the application. You may have to poke around a bit, as weird bugs might appear. With SK Tools, the database editor didn't work properly. If things are working ok, test with devhealth to make sure that the modified dll is loaded, and not the rom file.
[Windows Mobile] ypsmav:
I shared the R/W section of CIF.dll using LordPe and got the camera problem. After checking I've noted that the dll was not loaded into device.exe.

Do I need to do anything else after modifying the file? Signature?
[Windows Mobile] ultrashot:
Yes, you should sign it unless you use patched nk.
[Windows Mobile] ypsmav:
results of my trials

Hi Ultrashot,

Thanks for the tip of the signature.

I've tried to share the R/W section of many files with no positive results:

CIF.dll not loaded, wavedev.dll crash device, phcanhtc.dll+phcanImages.dll+phcanImages2.dll+cameraalbumservice.dll, worked but no improvement on virtual memory after sharing, phcanoverbmp.dll not loaded, notificationres.dll crash notification enhacement.

The good part is that I've noted that I have noted some fixes/tweaks which i have to avoid, E.G.: Neos video drivers, coloured task icons, etc.

You managed to reduce significantly the dll on slot 0 and improve VM, would you let us know which files/packages have you modified or post them here?

Thanks in advance.
[Windows Mobile] Farmer Ted:
Post up your un-modified cif.dll; are you using the file? You may be better off converting it to a module, and just share the s001 binary. If you get it to work, it will give you the bulk of the slot 0 high savings.
[Windows Mobile] ypsmav:
CIF.dll

Hi Farmer Ted,

Attached my original CIF.dll (blackstone 1.59).

I've tried reversmode the file, but I couldn't find the hex values mentioned (Probably need to learn more about HEX files...).

Thanks
[Windows Mobile] ultrashot:
shared drivers:

oemdrivers - recmodded ones (note that some of these drivers are present in EXT but in reversmodded form)

cif.dll

disptools.dll

fms.dll

htccamera1.dll

htcservices.dll

keypad.dll

n5ledmgr.dll

nullcam.dll

ojdrv.dll

qtv.dll

sdhc.dll

tnetw1251.dll

oemdrivers - reversmodded

hard to say without further comparison.

rpack them.
[Windows Mobile] CRACING:
List of dlls which I reversmodded to save vm slot space and so far no issues:

OEM/EXT:

MS_Voice_Command -

enu_g2p.dll

enutstpp.dll

lhcom02w.dll

ttscore.dll

enut3s51.dll

spcacheaudio.dll

sapi.dll

sapiwavstr.dll

vcbthag.dll

vcosshim_ppc05.dll

spsreng.dll

Social Networks Engine -

youtubeproxy.dll

htcaccountmanagersvr.dll

microblogutil.dll

twittercore.dll

HTC Geo Service -

htcgeoservice.dll

HTC Messaging Client -

MsgSettingDll.dll

mms.dll

BTSAP -

salib.dll

Connection Setup -

connsetupdload.dll

Manila Message -

manila_messaging.dll

Manila Music-

audiomanagerservice.dll

Manila Photo -

cameraalbumservice.dll

Start Icon Loader -

launcherservice.dll

Contact Picker -

contactpicker.dll

m Hub VO -

voamrnbenc.dll

OEM Drivers -

tiwlnapice.dll

biotouch.dll

serialusbfnmodem.dll

CameraBayerServices.dll1

CameraCoreServices8650.dll1

VencDriver.dll

SYS:

BaseAppsFiles -

pimdlg.dll

MediaOSFiles -

msdmo.dll

Shell -

softwaredisable.dll

lap_pw.dll

Thanks...

Best Regards
[Windows Mobile] Farmer Ted:
Here's the cif.dll with the s001 binary shared; I left the s003 as it is; it's small, and only uses one page. I included the module and the file. You can probably just test the file by over-writing the one in rom with total commander and resetting your device. I'd use the module for cooking.
[Windows Mobile] illi:
I copied the file to my Topaz and it looks good.

Thanks Ted.
[Windows Mobile] AndrewSh:
CRACING, buddy, as usually - your reversmode list is well-sorted :) Good job!

Just to add some more info for enthusiasts - below is my reversmode list:

audiomanagerservice.dll

cameraalbumservice.dll

camerabayerservices.dll1

cameracoreservices8650.dll1

camimgcustomtransform.dll

connectionsetup.cpl

connsetupdload.dll

dald.dll

default_d3dm.dll

defaultextension.dll

documentindexerdll.dll

facebookproxy.dll

fbservice.dll

fmradiosdk.dll

gpsid.dll

htc_d3dm.dll

htc_flashlite.dll

htc_flashsnddec.dll

htc_si_impl.dll

htcaccountmanagercpl.cpl

htcaccountmanagersvr.dll

htcfl.dll

htcflextension.dll

htcgeoservice.dll

htcgeotos.dll

htcyoutubeservice.dll

httpsourcemapi.dll

ipstreamsourcefilter.dll

jsrhandler.dll

lap_pw.dll

lap_sky.dll

launcherservice.dll

leoclocklib.dll

libgles_mn.dll

libopenvg.dll

livelocation.dll

manila_messaging.dll

mms.dll

mp3dmod.dll

mp4encoder.dll

mp4gen.dll

mp4parser.dll

msdmo.dll

msgsettingdll.dll

mycpl.cpl

onlinealbumsdk.dll

phcanimages.dll

pimdlg.dll

pluginmanager.dll

qc_ipl.dll

qc_omxvidenc.dll

rtpmapisource.dll

scarddriver.dll

serialusbfnmodem.dll

sio.dll

softwaredisable.dll

testapisethookdll.dll

twittercore.dll

uploaderagent.dll

uploadercpl.cpl

uploadertaskagent.dll

utaskhook.dll

utasksrv.dll

vencdriver.dll

voamrnbenc.dll

voicetagcpl.cpl

wma9prodecoder.dll

youtubeproxy.dll

zlib_mn.dll

It's not sorted - just alphabetic order as my kitchen shows it. I also wanna add that I usually cook empty roms with minimum manila tabs and other services so the list is for basic rom. And of course most of this libraries are r/w shared....
[Windows Mobile] illi:
@Ted

I just discovered your cif.dll gave problem on the camera. I reverted back to the original cif.dll and the camera now works:confused:

Thank you.
[Windows Mobile] CRACING:
@AndrewSh

Thanks for your list.

I have compared with mine and most of them I have are files. So these files placed in slot when used? If so I will reversmode them.

I have sorted the files according to there packages:

OEM:

-------

Camera -

camimgcustomtransform.dll

MS Facebook -

fbservice.dll

HTC Geo Service -

htcgeotos.dll

Youtube -

htcyoutubeservice.dll

HTC Messaging Client -

jsrhandler.dll

My Phone -

lap_sky.dll

LeoCPUSpeed -

leoclocklib.dll

LiveLocations -

livelocation.dll

Connection Setup -

connectionsetup.cpl

My CPL -

mycpl.cpl

uTask -

utaskhook.dll

utasksrv.dll

Flash Lite Share DLL -

defaultextension.dll

htc_flashlite.dll

htc_flashsnddec.dll

htc_si_impl.dll

pluginmanager.dll

htcfl.dll

htcflextension.dll

Social Network Engine -

uploadertaskagent.dll

uploaderagent.dll

uploadercpl.cpl

onlinealbumsdk.dll

htcaccountmanagercpl.cpl

facebookproxy.dll

OEMDrivers -

libopenvg.dll

qc_ipl.dll

qc_omxvidenc.dll

rtpmapisource.dll

mp4encoder.dll

mp4gen.dll

mp4parser.dll

httpsourcemapi.dll

ipstreamsourcefilter.dll

default_d3dm.dll

fmradiosdk.dll

gpsid.dll

htc_d3dm.dll

dald.dll

scarddriver.dll

sio.dll

SYS:

------

MediaOSFiles -

mp3dmod.dll

MediaOS -

wma9prodecoder.dll

Unknown Files/Modules:

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

testapisethookdll.dll

voicetagcpl.cpl

zlib_mn.dll

libgles_mn.dll

documentindexerdll.dll

BTW; could you provide the list of those libraries r/w shared please?

Thanks...

Best Regards
[Windows Mobile] Farmer Ted:
The cif.dll was for a Blackstone; I know they're similar to the Topaz, but it could just be a compatibility issue. You should try sharing your stock cif.dll, and see how it works.
[Windows Mobile] illi:
I've tried to make the changes but am not too confident. So, attached is my stock cif.dll. If you have the time, may be you can help me with it. I am on OSBuilder Kitchen by Barin.

Thank you very much Ted
[Windows Mobile] CRACING:
Hello guys,

I have some problem in my ROM vm and I'm confused.

I have attached slotmap files. One is of my new ROM and other is from my old rom. In between these roms I haven't checked the map so haven't noticed the mistake.

The problem is, new ROM taking lot of slot space whereas old rom isn't. i.e spsreng.dll. It is as module on both roms but its reserved about 152kb (38) in new and just 8kb (2) in old.

Also please try to explain more about what is Null space and how to reduce or clear it. I know its the memory being kicked off but how can I clear that space? vm space in my rom is going too low and no idea why it happened.

BTW; AndrewSh, After I reversmode'ed those dlls (you listed), the vm space gone too low. About 11mb free. No idea why it happened so. :confused:

Please help me.

Thanks...

Best Regards
[Windows Mobile] ultrashot:
Seems like you have too much modules, higher slots became fullfilled and some libraries were put to slot 0.

Null is an unknown area - if you have osbuilder's dumpmap then you can wipe out all nulls (it provides all necessary info), but if you haven't - treat them just as temporary unused memory blocks (but this memory

is reserved

).
[Windows Mobile] CRACING:
Glad you responded. Thanks...

So I should remod unused modules.

Yes I have started to use osbuilder. Lets see how it goes. :)

Thanks...

Best Regards

Edit: Any idea where I can find the option or how to wipe out all nulls in Osbuilder?
[Windows Mobile] Farmer Ted:
Re-attach it; it looks like it didn't go through. I'll patch it for you when it's up (or someone else can).
[Windows Mobile] AndrewSh:
Sharing r/w helps to avoid this.... You have to apply also my sharing r/w list:

battdrvr.dll

bcmsddhd.dll

connsetupdload.dll

customlockscreen.dll

dataconnectionmgr.dll

debuglog.dll

defaultextension.dll

downloadmanagerapi.dll

downloadmanagersrvc.dll

htc_camera.dll

htc_flashlite.dll

htc_flashsnddec.dll

htc_si_impl.dll

htcaccountmanagercpl.cpl

htcapplication.dll

htcfl.dll

htcflextension.dll

htcie6enhancement.dll

htcmidi.dll

htcnavimgr.dll

htcsensorservice.dll

htcservices.dll

htcusbtopcsrv.dll

htcvolumecontrol.dll

htcyoutubeservice.dll

iefavmonitor.dll

intshare.dll

ipnat.dll

jsrhandler.dll

keypad.dll

leoclocklib.dll

messagingservice.dll

microblogutil.dll

mvklib.dll

naviservice.dll

notificationmanager.dll

onlinealbumsdk.dll

operabookmarkmonitor.dll

phcanhtc.dll

pluginmanager.dll

resloader.dll

smarttouch.dll

smd.dll

smd_com.dll

stk_service.dll

touch.dll

uploaderagent.dll

uploadercpl.cpl

vencdriver.dll

windiag.dll

I have about 27,5 Mb free in slot 0 (DevHealthAnalyzer report)
[Windows Mobile] ultrashot:
r/w sharing won't help with higher slots overloading, even opposite - it will make more problems.
[Windows Mobile] AndrewSh:
ultrashot, but still - there is the result of reversmodding and sharing r/w in my case - free space amount in slot 0 is more than acceptable, I suppose....
[Windows Mobile] illi:
Here's the zip again. I sincerely hope you or someone else can help me patch it.

Thanks very much
[Windows Mobile] ultrashot:
His problem is that full modules (not only r/w) are present in slot 0 because of high slots overloading. R/w sharing will not help to eliminate this problem at all.

One more tool. Hope you like it.

DependencyInspector - lists package dependencies.

Three modes:

Kitchen. Helps to detect package dependencies more precisely.

Separate package. Lists all libraries used by package overall and by any module/file.

Separate library/file. App will only show used files/executables. If you want to check module dependencies, choose its imageinfo.bin)

Besides libraries, DI shows graphics files, xml, text files. File extensions are hardcodded inside. Also it make a list of used services/drivers, but you have to check them manually (via registry).

Search is slow; sometimes you can see some wrong-named libraries detected.

Application is optimized to work with OSBuilder. No OSK/EVK support for now.
[Windows Mobile] HD2Owner:
great work ultrashot. thanks alot for this very handy tool.
[Windows Mobile] Farmer Ted:
Here it is.
[Windows Mobile] illi:
I appreciate your help very much. Since I'm away from base, will only be able to recook Monday.

Will revert the outcome.

Thank you:cool:

I have cooked the CIF.dll in and so far looks to be no problem. I have 25280 Kb free in Slot 0 with Empty sectors - 8 (16 Kb). On start up after Sense is loaded I have about 60% of RAM available.

Will revert if problem crops up.

Thank for your help;)
[Windows Mobile] CRACING:
Hello,

Another query.

Why does dlls used by Device.exe reserves more size then its used, even its file size isn't that big. i.e btd.dll, bthuniv.dll, bta2dp.dll, sdc.dll, ipnet.dll, redir.dll and more.

Approx 5mb is reserved (dumpmap.txt) (Green) and just about 200kb is using (mem_x.txt) (White).

By seeing boot.rgu, spaces reserved by these dlls can be used for other modules. If its true, I have reached the almost low used VM task. Same as AndrewSh has, 27mb free in my ROM. :D

Thanks...

Best Regards
[Windows Mobile] ultrashot:
It is true, but it is totally true for full modules put to slot 0 (as you had recently), and plausible for modules with only r/w section in slot 0.
[Windows Mobile] ultrashot:
Btw, if you wonder why little libraries waste slot 0 too much, here is an answer:

Kernels with extended slot support (6.5) put file dlls to extended slots only if

1) DLL is bigger than 64 KB

OR

2) DLL is resource-only.