Setup.dll editing what it does on install... - Windows Mobile Development and Hacking General

Ok so I have been missing around with an app. and found out that its setup.dll on install adds a shortcut in the programs menu and messes with the default today items settings. I have used ResHacker to look @ it but it doesnt seem to show the shortcut or anything else, it simply has the EULA accept info as far as I see with ResHacker. So my question is, is there a way to stop it from doing so? Would I need to just try and create my own Setup.dll for it? Or is there a better dll editor?
Thanks for any help,
Mike

No such thing as "DLL editor". Resource hacker only shoes resources, that is dialogs bitmaps icons and any text the writer chose to put in a string table so it would be easily changed. I guess the shortcut is hard-coded.
Now I am not sure what your background in programing is, so don't be offended if this explanation is too basic.
DLL is basically a program, only it isn't started by itself but called by another program.
You could try removing it from the CAB all together, but it could be performing other functions critical to program installation. You would need to know about them and be able to code in c / c++ to write a replacement.
There is a powerful disassembler called IDA for ARM code but you need to know assembler on a good level to do anything with it.

Thanks so much for the reply. Well im not that new to .cabs, roms, and what not but c+ or c# im a complete n00b. Didnt know there wasnt a dll editor, my mistake. You learn something new everyday. That being said...I removed it before posting and should have said that. This setup.dll is needed and wont work without it. But I figured what you said a new one would probably be the only way. But you mention disassembler....so since im new which would u suggest would be easier? I do have the tools to write one....but i dont have anything for the disassembler method.
Thanks,
Mike

Writing an app is much easier than disassembling one, since reading assembler is no joy (at leas for normal and semi normal people, some consider it their second / first language).
But like I wrote before you face one basic problem: What is it that this DLL does that the program won't run without?
If you know that, writing a new one will not be a problem. People on the forum could help you with the C++ code if you have basic knowledge of the language. C# won't work for this.

be aware that the dll that dose the installation is normally stored in the windows directory for performing the uninstallation at a later time. Modifying it could prevent propper removal of the program.
If the shortcut is hard coded into the dll it is probably visible as readable text in the dll (as long as the author did not try to obfuscate it). If so you may be able to just replace the string. I gave it a try on a similar dll but just editing the text screws up the dll. Someone else may be able to tell how to do it properly (please).

I think I figured out what the issue was and why it wouldnt work without the setup.dll. Its just a reg edit that the setup.dll does and thats what was missing when its removed. When I added it to the .cab everything worked smoothly! Thanks for the replys guys and I appreciate the help! BTW thanks for being so nice about it levenum. I would have responded sooner just been busy.
~Mike

Related

Question about registry entries in the Kitchen (PHP help)

XDA-dev guys, We need help.
Ok, We have right now, a Kitchen working with a couple of cool enhancements, we have acomplished to install, from the kitchen, some commercial programs, like Resco Explorer 2003, SPB Pocket Plus, and others. And we want to make this kitchen available to the public, so everyone can download their custom ROMS with these cool programs, but of course, for legal purposes, we can't just post them like that, already registered versions of programs.
We have an idea, basically what we want is a the text field provided under each program, (kind of the same as thing as the "NBF header string" that is at the bottom of the regular kitchen). This text entry would be each user's own serial (entered by the user). This would create a registry entry file which will put the fields in and then merge it into the rom, in that way the user would be able to use the programs and would not have to worry about the Serials anymore.\
In short, A text field in the webpage, under each program choice, so the user can enter his/her own serial number. With this text, it will generate a registry entry automaticly in the ROM generator, so The program is registered from the ROM, and the user is free to use its own program directly from the ROM
We have the progs working fine from the ROM, but we are using our own serials, we want each user to enter its own, so everyone is happy, and we don't get in trouble giving away software that is not ours for free.
Any help would be appreciated.
So what exactly do you need help with?
i'm a webdesigner with knowledge of php so maybe i can be of asistance.
Rico
exactly what I want is how to create a text field where people can enter their serial and this entry will generate a registry file that will go to the creation of the ROM, and to register the programs installed.
Sounds like you need a form with multiple text-fields targeting a page where these textfields are converted to registry entries.
maybe we could mns about this. that would probably speed things up.
or mail me @ [email protected]
Rico
The textbox feature in the current kitchen can put the literal typed string anywhere in the registry. Have you looked at how it works?
If you need more, you could write some php to do that. You'd still need permission to distribute the included programs though. Easy way to get this permission is to become a point of sale: you would point people to the place to buy it if they did not already have a serial. Could even make you some money through these affiliate programs.
Thanks guys. kenofalte, i might need ur help with php. I'm not a good programmer. I'll try to do it myself but in case i get lost.
alex
Most SPB and Resco programs come with the Trial versions that you can use for 14 days etc. that can later have a registration code entered... can't you setup your custom kitchen ROM with these different Trial versions instead and then whoever burns their own ROM can pick and choose what they want, burn it, and when setup and finished, they can enter their own code then? Just a curiousity. I am not sure about the permission to distribute the programs then? Either way, just a thought.
Regards,
mS
that's another option. i just wanted to make it so that they can register it during the "cooking" process. otherwise everytime they do a hard reset they have to re-register the product.
alex
Alex
just mail or msn me at the previous mentioned e-mail.
We will make it work.
Rico

decomiling and recompiling - newb question

Hi,
Can someone assist me with how i might go about decompiling or viewing a dll, making changes to it and recompiling it? What tools can i use to do this?
I have tried copying some of the dlls from my device over to my local pc, however most of the time i get an "access violation" message.
Further, i realize i can use idlasm to disassemble .net files, but it seems most of the more interesting dlls and files may be standard c dlls. How can i take a look at the code in these and modify if wanted?
thanks much.
farseer: what level of experience do you have?
V
I'd like to think i am decent developer, but that may be in my own mind
However, i do not do a lot of "hacking", i.e., have not had the need to do much reverse engineering. I have been coding ground up apps for over 10 years however, uisng C++, Java, C#, VB, etc. You name the language, and i've probably done something in it .
vijay555 said:
farseer: what level of experience do you have?
V
Click to expand...
Click to collapse
was that the wrong answer?
farseer said:
I'd like to think i am decent developer, but that may be in my own mind
However, i do not do a lot of "hacking", i.e., have not had the need to do much reverse engineering. I have been coding ground up apps for over 10 years however, uisng C++, Java, C#, VB, etc. You name the language, and i've probably done something in it .
vijay555 said:
farseer: what level of experience do you have?
V
Click to expand...
Click to collapse
Click to expand...
Click to collapse
The correct answer should be "I know ARM assembler language, the structure of Win32 PE files, I know what is XIP DLL and why I cannot modify them directly, and I have read the WM5 source code".
In this case the process is simple - you decompile a DLL with IDA (www.datarescue.com), find the place you need, modify the code to suit your needs - and that is all. In most cases there is not enough place in DLL for your code, so you need to use virus-like techniques, my prefered method is to patch the code so that it loads my DLL and run it instead of original code. Or use some other hooking methods so that my code is executed instead of original.
Ah, thanks much, this was helpful. I do have a few follow up questions:
1. Is "Arm assembler" different than standard assembler? If so, any suggested readings?
2. There are some dlls that cannot be copied to my local pc (i get an access violation i believe). How does one extract an image of such dlls?
3. Where is the WM5 source code? and why would i need to read this to be able to hack/patch dlls?
thanks again.
mamaich said:
The correct answer should be "I know ARM assembler language, the structure of Win32 PE files, I know what is XIP DLL and why I cannot modify them directly, and I have read the WM5 source code".
In this case the process is simple - you decompile a DLL with IDA (www.datarescue.com), find the place you need, modify the code to suit your needs - and that is all. In most cases there is not enough place in DLL for your code, so you need to use virus-like techniques, my prefered method is to patch the code so that it loads my DLL and run it instead of original code. Or use some other hooking methods so that my code is executed instead of original.
Click to expand...
Click to collapse
Hi farseer!
I am nowhere near the level of mamaich or vijay555 but I have some experience in this and I believe I can give you some basic answers:
1. ARM is a different architecture then x86 processors and the assembler is different to accommodate it. There are some basic similarities like mov add and such, but even the registers are different (R0 - R15 if I am not mistaken). Sorry, I don't know any books on it, but if you google you will quickly find the list of commands with basic explanation.
2. Since the OS is in ROM you can't just copy and paste it's DLLs and EXEs. Look for ROM dumping tools on this forum, or already extracted images on the ftp. Keep in mind MS did some tricks to save memory and make it harder to get at the files, so like mamaich said, you need to learn about XIP and the ROM structure in general to understand whats going on.
3. Hmm... MS does have a program for sharing most of WM source code, but it's not for common people like us. (check out their site to see what I mean) I suspect there are other sources of getting the parts necessary to understand DLL hooking, but I have no idea what they might be.
Well that's my two cents until an expert can answer you. Hope this helps.
farseer: you gave a perfectly good answer IMHO, just needed to get an idea of what level to pitch a response without talking up or down to you!
It's well documented that I'm a self confessed newb to c++, and would say that your programming skills should certainly hold you in good stead. However, having a good knowledge of the Win32 API is certainly beneficial.
For decompiling, basically IDA. There is an IDA demo available on their website that should get you going, it's pretty much 100% functional other then it won't save, and closes itself (or crashes itself) after a reasonable, random period of time. IDA is "the daddy" for pretty much all mainstream reversing, although you could write your own decompiler/debugger.
Recompiling - that's a toughy. IDA won't permit recompiling on ARM AFAIK.
You'll have to hexedit into the target and patch directly. Otherwise you get into the exciting world of code injection, hooking etc, as Mamaich says.
For that area, read everything he's ever written, before you start reversing
Oh, and a helpful hint to all. Don't just read what Mamaich's written on this board, his posts on other boards are even more useful!
It's worth getting a good familiarity with reversing on x86 first, get used to how IDA works etc (and Soft Ice is very useful to give a good insight into x86, although AFAIK it's not available for WinCE). ARM assembler is different, but just grab a list of the opcodes and read through a few CPU developers' guides (online).
There are a number of tutorials on reversing ARM stuff online. In the usual places for that kind of stuff.
For getting access to the ROM files, easiest way is to grab a rom update file and decrypt it. Mamaich is once again your man, his romtools do the job. He also has a "live" rom grabber, that'll grab all the files/modules out of your running phone for your perusal.
Platform Builder is available free to give you (some) WinCE source code. Not all, but enough to give you years worth of reading.
V
Thanks all...very kind of you to respond in such detail. I look forward to dabbling a bit with IDA and some of mamaich tools. I suppose the first order of business is to do a lil more research and then just dive in! It's been a while since i wrote any assembly code (not since college!), but i am a bit excited at having an excuse to do so again.
thanks again.
Just remember that unless you really luck out and the developer left the symbol table intact, you're going to end up with garbage for the names of variables and subroutines.
I hate reading decompiled code.

Today Screen: How to rename no unread messages?

So here is the question, on the today screen is there anyway to make the messaging plugin read "No unread email" instead of "No unread messages"? I also just got the palm mesaging app and love it to dealth, but i would like that plugin to read, " No unread Texts" instead of "No unread text messages". I am guessing that tweaking both of these would be mostley the same process. Could someone help me out. Thanks!
Modify MUI resource file assigned with that plugin.
how would i go about doing that?
Basically you need to find the file pmail.exe.xxxx.mui (where xxxx is language code in hex, 0409 for English) and use something like Resource Hacker to change the string. If the MUI does not exist, search the forum on how to create one. Particularly look for messages by Asukal, he does a lot of localization. And check out www.buzzedev.net
i have no idea where to start on this one! No idea where to even look for the file you spoke of! I seached this site for anything on .mui, didn't pull up a thing not even this thread. So I figured I would try google. Again all i found was stuff on windows xp running in another language. Could someone else help me a little
This is a very long topic to explain but I'll try to give you some more pointers and maybe your research will take off.
First, you need to search for 'language packs' and 'localization'. Use google to search this site (site:www.xda-developers.com) instead of the built in search engine.
If the file exists it is in your windows directory on your device. Since you probably won't be able to copy it out you will have to get a ROM dump.
In short, MUI files are DLLs with no code, just resources, so if you have an empty DLL (or just a small useless one) you can make an MUI file out of that by just adding the right resources.
Unfortunately, to understand all this stuff a bit of windows programing knowledge is required.
Looks like you have a lot of research ahead of you.

Easy way to delete registry key over and over?

I'm after a quick and easy way to delete a specific registry key - preferably from a command line/shortcut.
This has to be done on a number of PPCs for work (always the same registry key) and I need an easy way to distribute it so I don't have to walk users through it each time - ie a single shortcut or executable would be best.
no-one knows? WM5 if that makes a difference..
MortScript
leyton01 said:
no-one knows? WM5 if that makes a difference..
Click to expand...
Click to collapse
If you tell me what key and data you want deleted I can write you a small app that can do it (silently).
-Jwrightmcps
Use MortScript and Autorun.exe on a SD card. Just inserting the card on the device will run the script and change the registry for you.
Other option is to create a cab file with the registry change in it, and then setup a batch script to automatically install it on the users device when their PDA is connected to their PC. Here is something I put together that may help:
http://www.jaml.com/CreateApp/
Jwrightmcps - thanks for the offer, I will PM the details
Markvan - will check out the link. Looks like it will be handy for a couple of other projects I have. KISS principle definitely applies for execs and technology - if I can email them a cab that can run a couple of things offsite users shouldn't be able to screw it up too bad (they will find a way no doubt)

Find dll functions from rom dll

Not sure if I have worded this properly as I'm at the edge of my knowledge but I wish to call a function that I am assuming is in a DLL which is contained in ROM. I know the name of the DLL but how can I get a list of functions available from it when I cannot copy it onto my PC?
Many Thanks
Hi Tailor.
First, what function exactly are you looking for? There may be some documentation on it somewhere.
To browse a ROM dll you need to get a ROM dump. The simplest way for your purpose, provided you have a WM5 device is to search for TESTWM5.exe by mamiac on this forum. It will dump all files to your SD. They won't be workable for coding purposes, but still good enough to use dependency walker to get exported functions from DLLs.
Unfortunately that still won't tell you the parameters the function expects. only its name.
Hi Levenum and thanks for your reply.
Its a Sony Sat Nav Windows CE 4.2 device so unforunately theres not much chance of a ROM dump or documentation. Then unit is sold as a finished product and not intended for further developement.
I have installed TomTom instead of the poor app already installed and was trying to get access to the hardware buttons and Light sensor on the unit and then intended to use the TomTom SDK to recreate their functions.
The keys don't not trigger a key press event but their are DLL's called something like powerbutton.dll and navbutton.dll and so it's a fair guess that they could be used to trigger these events.
Obviously without knowing their exported functions I'm not going to get much further.
Any further thoughts ?
Many Thanks
How exactly are you trying to catch the key events?
For what you describe, you don't just need to know function names, you need to know with what parameters to call them so this is definitely not the way to go.
If you are coding with C++ search for info on SetWindowsHook. I am not sure of its implementation on CE, but this might be what you need.
I'm using VB.Net 2005
I'll have a look at SetWindowsHook, Thanks.
Any ideas for the light sensor, there's a test app that Sony have left on the device, it gives a reading from 0 to 100?
How are they likely to be reading this value?

Categories

Resources