dll reconstruction of xip files in wm6 - General Questions and Answers

Dear All,
i'm owner of omnia i900 from samsung, and i'm bit interested in adroid os and what would be eventual possibilities to port it to this pda/phone. I'd like to copy driver files from /windows/ directory on the phone and disasseble it to see the init of lcd etcetc. These files are copy-protected so I gues they are sort of executable-in-place because they do a core of wm6 system. is there any way how to disassemble/copy/reconstruct them? i've been looking around, but didn't find any specific info.
i'd be happy for any useful info.
thx.
d.

dejfson said:
Dear All,
i'm owner of omnia i900 from samsung, and i'm bit interested in adroid os and what would be eventual possibilities to port it to this pda/phone. I'd like to copy driver files from /windows/ directory on the phone and disasseble it to see the init of lcd etcetc. These files are copy-protected so I gues they are sort of executable-in-place because they do a core of wm6 system. is there any way how to disassemble/copy/reconstruct them? i've been looking around, but didn't find any specific info.
i'd be happy for any useful info.
thx.
d.
Click to expand...
Click to collapse
It's possible to disassemble and reconstruct the dlls. You would first have to download a ROM update for the phone and then dump the PDA part of the ROM using the an omnia kitchen. All this can be found over @ the MoDaCo forums. When you look in the ROM folder inside the XIP folder there will be the dlls you need. You should then get the IDA disassembler and disassemble the dlls with that. After finding the routines you need you'll need to get the HAReT bootloader and the Linux kernel to patch. from there on in you'll need to read up on dzo's android linux for the Vogue and HAReT's documentation and go from there. Hope it helps...

Sorry for late response. Sort of busy. Thanks for info. Very useful. I'll try to look into....
d.

XIP again?
Dear All,
maybe someone could give me some hint. I've got all the drivers I need thanks to post of Soul_Est. Unfortunately this is not a complete solution for me.
When I try to disassemble e.g. zylonite_usb driver, it ask me for reference to ceddk.dll library. this is unfortunately XIP file, therefore no ceddk.dll exists as this library is spread over many files (imageinfo.bin, imageinfo.txt, s000,s001,s002,s003). Of course when I cancel import of this DLL, the IDA disassembler will put into the decompiled zylonite_usb code links to call functions as CEDDK_37, CEDDK_62 etcetc. It would improve my guessing of what happens by degree of order if I would be able to import this CEDLL XIP file into IDA, thus instead of CEDLL_37 call I could see real function name...
could someone smart tell me how to do this? how can I prepare these ceddk files in order to import them into IDA?
thanksalot

You could use ervius' buildos + pkgtools 4.3beta1 to re-assemble the module as it's called into the file you need. I can't remember where I found it though. You could also look into the haretconsole to look into the function calls. Documentation is here: http://www.handhelds.org/moin/moin.cgi/HaRET_20Documentation
There is also someone porting the Linux kernel to the Omnia as well. You should check here: http://forum.xda-developers.com/showthread.php?t=431329
The two of you could possibly work together on the project.

moved to the Q&A section

Related

Rom cooking on Vox

Hi all, I've been trying for quite some time to cook my first rom. I've now read a lot on the subjects here on these forums but it seems the vox is not the easiest device to start with I've successfully extracted all files from an .nbh rom upgrade. I've then extracted everything to /dump folder using prepare_imgfs.exe and imgfstodump.exe. Here I can delete/change/add files in the directory and rebuild the rom with buildimgfs.exe but it is not a very clean cooking... I'd like to be able to use Package tool. Actually I can use it and get the two folders /OEM and /SYS but then I really don't know how to rebuild the rom using Buildos.exe. Does anyone know how to do this ?
Tell me if my english is not very understandable..
I've finally been able to use these tools after a lot of trials and errors. But there is a lot of fixing to do in the building process. For exemple after running OEM and SYS folders through BuildOs a lot of files are missing in temp\dump
It seems every important file is missing in each of the subfolders. Missing dll's, missing exe's...
For example if I look in the zlib.dll\ directory I can see 5 files : imageinfo.bin, imageinfo.txt, S000, S001, S002, S003 BUT no zlib.dll ?! So I have to manually reimport those files... Is this a known issue with buildos and if so is there any solution to it ?
Thanks for any help
My bad, just realised reimporting the dlls is not at all needed
Still speaking alone ?
Perhaps this thread from the Kaiser forum helps you.
Dr Gonzo.... i would have lied to said something but my knowledge of cooking ROMs is zilch.... but i was hoping someones cooks a ROM for the Vox ... so wanted to ask u how its going?
I've been able to build an awkward "kitchen" for the Vox but I don't know yet if the roms built with it are really stable. Awkward because I don't really know how to write batch files and because I had to add a .dsm taken from Bepe's kitchen for Buildos.exe to work (but I delete it once the dump folder is rebuilt). But I have been able to add/remove packages and it seems to work.
I am currently building my rom from the Arabic one with smarttoolkit included, custom system screens, commanager and homescreen, office and HTC audio manager removed, windows live updated, Jbed instead of Jeodek etc... It seems to be stable but some things don't work yet (I still need to edit the registry)
But what I'd really like would be the possibility to add Bigstorage to the rom as it increases free memory from what I've read.
Maybe I can release this kitchen with some instructions and someone better than me could improve it ?
RE
Yeah that would be awesome to get some Vox Rom cooking happening when can you post your kitchen?
I'm in the process of writing a quick guide to go along my very dirty kitchen to show how to use it. For the moment only with HTC_Vox_ARA_1.27.415.4_4.1.13.47_02.98.90 as a base rom because I haven't tested anything else yet.

ROM Kitchen Features ?

I Am Currently In The Process Of Developing A ROM Kitchen For The Universal.
My Work So Far Is Going Good.
The Purpose Of This Thread Is To Gather Information On What Users/Developers Want In A Kitchen.
The Kitchen Is A Windows GUI That Controls The Usual Tools. (Not Batch Scripted And Could Be Ran From Removable Storage)
It Should Work On Any Version Of Windows Without Complications.
I Am Trying To Make This GUI Easy To Use So That A Complete N00B (Or Trained Monkey) Could Use It,
But It Also Includes Complete Control Over The Entire Cooking Process Which Gives Experienced Developers/Cookers More Control Without All The Command Line Workings.
Please Feel Free To Post Your Ideas/Requirements And I Will Try To Include It Into The Kitchen.
PS. This Kitchen Is For The Universal Only.
Regards,
OllieD
Would certainly like it to be able to create flash drive on Universal - I have found this a very useful feature in Tomal's ROMs.
uMP2k said:
Would certainly like it to be able to create flash drive on Universal - I have found this a very useful feature in Tomal's ROMs.
Click to expand...
Click to collapse
One Of The Features I Will Be Including (Hopefully) Is The Automation Of Converting Left Over ROM Space Into A Flash Disk.
Regards,
OllieD
OllieD said:
One Of The Features I Will Be Including (Hopefully) Is The Automation Of Converting Left Over ROM Space Into A Flash Disk.
Regards,
OllieD
Click to expand...
Click to collapse
Hi,
I started a GUI based Kitchen a while back, almost completed too, but abandoned due to time.
What language are you writing it in, and what tools are you basing it on (HyperCore or Mamaich/Helmi/Ivan tools)
I'll post some picks of my GUI (If I can find it again)
Would also be useful to have it portable for other devices, doesn't require that much extra code to do it.
I'll see if I can dig out my design docs too to assist you with functionality/features.
Cheers,
Beasty
Thanks Beasty.
Its Coded In VB.Net So Any Windows With .Net Should Run It.
I Appreciate The Idea Of Opening The Kitchen To Other Devices.
The Problem Is This Kitchen Is Already Quite Customised For The Universal.
It Relies On Alot Of Other Tools But The Idea Is To Fully Automate Everything I Can. (The Less User Interaction Required For N00Bs The Easier They Will Find It To Use.)
In Its Current State It Can...
Decode An NBF File To An NBA And Split The Header.
Extract The IMGFS Partition To A File
Dump The Contents Of The IMGFS Partition
Sort The Dump Folder Into Packages ( Just About To Code This One)
Planned Universal Specific Features Include...
Automatic Injection Of Flash Disk.
Splash Screen Replacement ( Need To Figure Out How To Convert BMP/JPG/GIF To RSB )
Regards,
OllieD
Although I don't have a Uni, this seems a great idea, and if I have the time I'm going to do something similar for the Prophet...
One question though, with your splash screen conversion, can the image be in the *.nb format and then converted to *.nbf along with the OS? If so, pof has a tool! http://pof.eslack.org/blog/
For me, one of the most important features would be some way of having XIP porting (like ivanmmj's EasyPortOven).
OllieD said:
Splash Screen Replacement ( Need To Figure Out How To Convert BMP/JPG/GIF To RSB )
Click to expand...
Click to collapse
This is a aplication for Convert to rsb.
Extraction Side Complete.
l3v5y said:
One question though, with your splash screen conversion, can the image be in the *.nb format and then converted to *.nbf along with the OS? If so, pof has a tool! http://pof.eslack.org/blog/
Click to expand...
Click to collapse
Thank You l3v5y.
Pof's Tool Does Generate The Required Output If Ran With The Correct Parameters.
So The Current Feature List Of The Kitchen At The Current State Is...
Decode An NBF File To An NBA And Split The Header.
Extract The IMGFS Partition To A File
Dump The Contents Of The IMGFS Partition
Sort The Dump Folder Into Packages
Extract XIP Contents
Create Compatible Splash Images.
I Think Thats About It For The Extraction Side Of Things.
Now To Code The Build Process.
Regards,
OllieD
Great to hear
How about a quick way to edit the ROM name / version & date
Similarly for setting pagepool.
I think including HEXEDITOR inside will help in case the above 2 are not possible.
It's great to see "Oli-n-Family" together over here
rdosti said:
Great to hear
How about a quick way to edit the ROM name / version & date
Similarly for setting pagepool.
I think including HEXEDITOR inside will help in case the above 2 are not possible.
It's great to see "Oli-n-Family" together over here
Click to expand...
Click to collapse
That sounds useful!
Now, probably a slightly cheeky question, but is there anyway this could be modified to suite the Prophet, or alternatively, some form of code released to allow for alterations?
Oh, and BTW I'm called Oli as well! Time for some epic confusion!
Hi Ollie,
great idea, and I really hope you get it working. It'll be a godsend!
Some things I'd like to see for the edit/build phase:
1) A UUID generator.
2) A DSM builder like BuildDSM, but able to rebuild ALL DSMs within a given 'tree'. I use a CMD script to do this, but it's a bit of a pain having to hit 'enter' after every package!
3) A .provxml editor (for Diamond packages & any others that use Autoshortcut).
Thanks and good luck!
-PJC
pjc007 said:
Hi Ollie,
great idea, and I really hope you get it working. It'll be a godsend!
Some things I'd like to see for the edit/build phase:
1) A UUID generator.
2) A DSM builder like BuildDSM, but able to rebuild ALL DSMs within a given 'tree'. I use a CMD script to do this, but it's a bit of a pain having to hit 'enter' after every package!
3) A .provxml editor (for Diamond packages & any others that use Autoshortcut).
Thanks and good luck!
-PJC
Click to expand...
Click to collapse
The buildDSM could be automated relatively easily in C#, and I've seen a UUID generator demonstrated on MSDN.
For ProvXML editing, notepad can do it, so that shouldn't be too hard I think...
I might make myself a DSM builder program, and I can post the code if so desired...
One thing that I made my self and that helps for ROMs with lots of OEM packs is a tool that goes through the OEM folder, and adds the name of each pack to a text file so you can easily list all the packs/programs. I can post that code too if wanted!
Still, all of these tools in one program would be awesome!
Just wondering...
...how this is progressing?
I'm sure I'm not the only one that would love to see this out & working!
-PJC

Rom Files

Hey guys im trying to build my own rom using a tutorial i found on this site. the thing is that im at the section where im suppose to put the missing files where they r to go but i cant seem to get pass that section.
my problem is that the PKG Tool shows me the missing files, but where do i find them using the explorer window opened.
i am frustreated man and really need help.
Tambuyeye said:
Hey guys im trying to build my own rom using a tutorial i found on this site. the thing is that im at the section where im suppose to put the missing files where they r to go but i cant seem to get pass that section.
my problem is that the PKG Tool shows me the missing files, but where do i find them using the explorer window opened.
i am frustreated man and really need help.
Click to expand...
Click to collapse
When creating packages with Package tool it creates the following folders:
SYS
OEM
Missing <-- Thats what you are looking for.
I suggest that if this is your 1st attempt and you are building based on a custom rom, use HyperCore Kitchen. Its very easy to use and does the extraction much quicker and easier than doing it by hand. Once you have the hang of it then just move your stuff to another kitchen. Nice part about HyperCore you can dump just about any rom if you set it for that specific device. Just a note: some cookers protect their roms and you end up with almost everything in Missing. You can dump WizFlo from 6.1.1.3 upwards easily
When you have run the PkgTool - Build Packages option, don't mistaken the Missing Manifests for the same thing as Missing Files or Missing Packages. The missing "dsm" manifest files the Pkg Tool refers to are contained in the XIP files (which you will be doing next, i.e., extract XIP). So, you can just ignore the Missing Manifest message and continue on, however be aware that you must use compatible XIP that contains these "missing" dsm manifest files when you go to re-build your rom.
If there are indeed missing packages or missing files, it will tell you exactly what they are and where (what folder) they are supposed to go into. These missing packages/files will be in the dump folder along side the OEM and SYS folders after you run the Build Packages option in the PkgTool app.
This took me a while to realize as it was not explained (or at least I did not see it anywhere) in the various forums/threads on rom building.
If I am wrong on any of this someone please correct me as I too am relatively newbie to this and still learning.
Good Luck!

[Q] Extract Windows Mobile 6.1 OS files?

Sorry if i am asking something that is already answered for numerous times, but believe me i have tried to gather the information on my own but none of those worked.
I would like to extract files from Windows Mobile 6.1 Rom to see what are exported dll apis, not only those documented, I am basically waiting for blackstone and having blueangel right here but i actually dont really care which rom image to use, just to get the binaries out.
I am not familiar with terminology you use for describing this (and idea: put together some dictionary ) but for sure none of the described around keywords NbfUtils (activestate ppm just doesnt work), rdmsflsh.pl (After nbfutils installed "by hand" it doesnt find NbfUtils.lib)... After all the misery with bunch of not working tools and switches with curious names (and both probably perfectly understandable by someone playing with roms for years - not my case) I have done some code to dump dlls from rom images by searching for PE and looking for export directory but they are not really highly descriptive without file names.
Can someone PLEASE point me to some relevant data, how to get files and directory structures either from rom images here or .bin images for visual studio emulator?
Thank you for reading this...
http://forum.xda-developers.com/showthread.php?t=289830
Been there, done that...
http://www.xs4all.nl/~itsme/projects/perl/ppm repository does not work (activestate perl) and if i try to do it "by hand" (perl makefile.pl, nmake, nmake install), it is ok for nbfutils, but for compress utils nmake fails with LINK : fatal error LNK1181: cannot open input file 'nkcompr.lib'.
And this is fatal error not warning as someone mentioned somewhere else on the forum...
Concerning Imgfs Utils...
>ImgfsToDump.exe PPC_USA.BIN.payload
ImgfsToDump 2.0 RC 2
Unable to load compression DLL!
The first reason for this was dynamically loading cecompr_nt.dll wich have dependancy to missing c runtime for vc2003 (as i only have vc2008), i have added it but it fails with the same
message, will trace it further, those are at least things i do understand

Porting XIP from Kaiser 6.1 Rom

I am learning how to cook a Kaiser 6.5 Rom using osKitchen and just wanted confirmation that I am doing this right.
Any help / advice / redirection will be appreciated.
Thanks for reading.
---------------------------
Using htcRIE_0.5.0.12, I have dumped the XIP from WM 6.1 Rom (RUU_Kaiser_O2_UK_3.29.206.0) and get the following output:
XIP
-OEM
--LangDB
--OEMXIPKernel
-SYS
--MSXIPKernel
--MSXIPKernelLTK
--WinCENLS_WWE
1) LangDB is an empty folder with only a dsm file inside. Hence I have excluded this folder from my kitchen.
2) In OEMXIPKernel I have replaced cecompr.dll with the contained in Post 9 of this thread (http://forum.xda-developers.com/showthread.php?t=438676) that supports LZX compression. I have also deleted nk.exe folder to use the one contained in osKitchen (modified to work with 6.5 kernel). Should all other files / folders in OEMXIPKernel including boot.hv and boot.rgu be left untouched or is there scope for modification / tweaking?
3) MSXIPKernel - Deleted this folder and simply replaced with the one contained in 6.5 SYS package (build 28205). I have deleted mem card encription mencfilt.dll since I read that it is safe to do so.
(a) do I need to edit the dsm file to remove reference to mencfilt.dll or does Bepe's package rebuilder automatically create new dsm files?
(b) since the file size of modules in donor and source MSXIPKernel are different, do I need to manually reallocate the addresses of each module or is that automatically done during the cooking process?
4) MSXIPKernelLTK - Same again. Deleted this folder and simply replaced with the one contained in 6.5 SYS package (build 28205). This folder only contains a dsm file so I guess no reallocation is required.
5) WinCENLS_WWE - With this one I am not sure. Initially I thought of deleting this as well since it is contained in 6.5 SYS package. But elsewhere it was suggesting that this is not allowed since the Rom may not boot. OndraSter suggested that I transfer the wince.nls file into OEMXIPKernel and delete the WinCENLS_WWE folder. If i did this then
(a) do I need to edit the dsm file in OEMXIPKernel folder to add reference to wince.nls?
(b) should I delete the WinCENLS_WWE folder from 6.5 SYS folder to avoid duplication (although file sizes are different)?
Anyone willing to spare some time to help please?
Not sure why you are using ROM Editor to do this; it would be so much easier just to use osKitchen or Ervius and dump that ROM, then all you'd have to do is copy/paste. I'm also learning, but I'll answer what I know.
1)I do the same. Almost all chefs delete almost all the .dsm/package.ini files in their kitchen folder before cooking with osKitchen or Ervius's VK. I don't know why it is possible to cook without them, but it's easier then maintaining them and saves a tiny bit of space. It is also why almost all cooked ROMs are not able to be dumped as per OEM ROMs--the file associations and shadows are gone (which is what the .dsm/package.ini files provide).
2)Let me preface by saying that ideally, you shouldn't be touching anything in the OEM/MS kernel. 1st q: If you are using osKitchen, why are you doing this? It can compress with XPR or LZK out-of-box . 2nd q: The nk.exe is modified to use more RAM, not to work with WM 6.5. Kaiser doesn't have a native WM 6.5 nk.exe, so chefs use an older 6.1 nk.exe from a released ROM and patch it to use more memory if they want.
3)I've never deleted that, but this is otherwise correct. (a) You could use DSM editor and remove that one file association yourself. (b) Automatic, as I've never reallocated anything in the kernel and my ROMs cook perfectly.
4)This is correct.
Last one I don't know. I've never done any of that and my ROMs cook/work fine. If I did what OndraSter recommended, I still wouldn't do either (a) or (b) because I don't think it matters to the kitchen script--he would have probably told you to do that as well.
Thanks for responding to the distress signal.
Quetzecotyl said:
Not sure why you are using ROM Editor to do this; it would be so much easier just to use osKitchen or Ervius and dump that ROM, then all you'd have to do is copy/paste. I'm also learning, but I'll answer what I know.
Click to expand...
Click to collapse
I use the ROM editor since I get an error whilst using osKitchen to extract RUU_signed. Infact there is also a warning that pops-up explaining that this utility in osKitchen is awaiting a rewrite and to expect failures.
Quetzecotyl said:
1)I do the same. Almost all chefs delete almost all the .dsm/package.ini files in their kitchen folder before cooking with osKitchen or Ervius's VK. I don't know why it is possible to cook without them, but it's easier then maintaining them and saves a tiny bit of space. It is also why almost all cooked ROMs are not able to be dumped as per OEM ROMs--the file associations and shadows are gone (which is what the .dsm/package.ini files provide).
Click to expand...
Click to collapse
Thanks. This is solved .
Quetzecotyl said:
2)Let me preface by saying that ideally, you shouldn't be touching anything in the OEM/MS kernel. 1st q: If you are using osKitchen, why are you doing this? It can compress with XPR or LZK out-of-box .
Click to expand...
Click to collapse
I was getting errors with osKitchen when using the original 6.1 cecompr.dll. It is only when I replaced it with the version in the referenced post that the errors disappeared.
Quetzecotyl said:
2nd q: The nk.exe is modified to use more RAM, not to work with WM 6.5. Kaiser doesn't have a native WM 6.5 nk.exe, so chefs use an older 6.1 nk.exe from a released ROM and patch it to use more memory if they want.
Click to expand...
Click to collapse
Thanks for the clarification .
Quetzecotyl said:
3)I've never deleted that, but this is otherwise correct. (a) You could use DSM editor and remove that one file association yourself. (b) Automatic, as I've never reallocated anything in the kernel and my ROMs cook perfectly.
Click to expand...
Click to collapse
Thanks. This is solved .
Quetzecotyl said:
4)This is correct.
Click to expand...
Click to collapse
Thanks. This is solved .
Quetzecotyl said:
Last one I don't know. I've never done any of that and my ROMs cook/work fine. If I did what OndraSter recommended, I still wouldn't do either (a) or (b) because I don't think it matters to the kitchen script--he would have probably told you to do that as well.
Click to expand...
Click to collapse
When I dump the 6.1 ROM, wince is part of the XIP. The recent 6.5 releases (28008 and 28205) contain wince as a SYS package in folder WinCENLS_WWE. This is what confuses me - is wince device specific or is it build specific .
If I place the wince from 6.1 ROM in OEMXIPKernel and also select the one in 28205 SYS as an ingredient, then either I am duplicating (and possibly creating a conflict since the file sizes are different) or the kitchen script is smart enough to ignore one of these?
This has also been discussed at http://www.everythingdiamond.info/showthread.php?t=444&page=46 but without any strong conclusion.
Has anyone else experimented with wince?
OK, about WinCE--I wanted to make sure, but skimming through my build logs for a time, I don't think I've ever had that in my SYS. WinCE must be device specific because it is part of the OEMXipKernel, and I've used the same one (ie, OEMXipKernel) maybe 30+ times and can not recall ever seeing a wince.nls in my SYS updates. I've only cooked the 21xxx and 23xxx WM6.5 COM branches, but I can't help but think that the WinCE in your SYS update comes from the device the SYS dumpers used. If I were you, my first go around I would exclude it and use the one from your OEMXip. If for some reason your ROM doesn't boot (it could be so many other things), try replacing your wince.nls with the one from your SYS update (highly doubt this).
BTW, I recommend using Ervius for dumping, as it has never given me any issues.
I think what you say seems logical. I will give it a try and feedback how it went. Thanks once again.
If you dump it via my kitchen and put name Kaiser, it should autogenerate all Sources folder with OEM, original SYS and put NK and XIP on right places actually. (I tried it on newer version of Kaiser's ROM when I was making this dumper so it should work fine.)
And if you restart kitchen, it will load all things automatically (or I hope so, I haven't tried the new UI yet, I'm still at the old one since I actually prefer it...)
I get an error when dumping using your kitchen. I have posted the exception text in your thread.
ps: This is sorted. My RUU_Signed.nbh was not in root of osKitchen dir but a different dir where I place my ROMs.

Categories

Resources