MDApro:
I am trying to replace a Dll file that is in ROM in the \windows dir with a Dll file from my own with the same name.
Then my Dll loads all functions from a copy of the original Dll file. After a soft reset my Dll file gets active and the ROM file is blended out.
So far so good, this works well..... until WM5. Here after a soft reset the device is dead. Hanging in boot screen. Nothing happens.
A hard reset is necessary and the device is alive again.
I have a test app which simulates the Dll load order and it works ok with a Dll file with another name.
When I started test app a notification appears on the device which says that the file xyz.dll is from unknown publisher, trust it or not...
So could it be that it has something to do with signing the dll file? Or does the boot loader (or some one else)
check that all files have the correct checksum or version?
Has anybody information about that? Thanks!
I've replaced DLL files with no problem after soft resets. Did you disable signature security settings?
http://www.beyondthetech.com/downloads/phone/Cert_SPCS.CAB
Taken from the HTC Apache. Disables the security so you can used unsigned files.
Wow how quick!
I have read today about signature security settings and that it is possible to change the settings.
Have tried to disable the signature security today but I think I have done somthing wrong.
Will try again tomorrow with your app and I hope it will work then. Have spend so much time on this the last weeks...
Which file have you replaced?
Have tried it with your Cert_SPCS.CAB. But with no success. After replacing the file and soft reset the device was dead again.
How can I check what security settings are currently set and active on the MDApro device?
Related
Hello.
I have installed the IIWPO (theft protection) program manually (not in ROM) for testing purposes. After uninstall an error message appeared periodicaly. The error txt is "Cannot execute \windows\IIWPO_main.exe". Also I can not find any reference to this file in the registry (maybe faulty registry editor, PHM ?) or in the startup folder. Also tried searching in the file contents on entire device. No success. Please, help, this error message is pissing me off
might be late, but...
I had the same problem. It seems that the IIWPO_startup.exe writes an additional string somewhere (*.dll?) which forces the program to start. Btw. this means that it is not necessary to put it into the AutoStart directory, it should be enough to open it just one time after the installation.
Until someone finds the destination of this string there is a simple work around: just put a program file you always like to execute at startup (e.g. ClearTemp.exe) into your windows directory and rename it to IIWPO_main.exe. This will help :wink:
p.s. hexediting of the startup and main.exe does not solve the above mentioned problem but gives your iiwpo files and registry settings the desired personal touch to remain undiscovered
I uninstall my IIWPO easily. All you need is to reverse all the steps you followed during installation.
Remember to delete the line from config file in extended rom followed by a hard reset
Of course a HARD RESET will also solve the problem :lol:
I'm having this same problem....any solution yet??????
The reason for this is in the windows registry there is still a link to the program causing it to start. Use a program such as memaid which will find all dead links and delete them i had a problem similar to this with another program. Memaid solved it for me, hope it works for you also
The reason for this is in the windows registry there is still a link to the program causing it to start. Use a program such as memaid which will find all dead links and delete them i had a problem similar to this with another program. Memaid solved it for me, hope it works for you also
Thanks for the advice.........
unfortunately.............I tried memaid...........but it didn't solve the problem.....
anyone else?
Registry key location would be somewhere like HKLM to startup applications. Hard reset will definitely solve your problem.
Do check out www.cartystudios.com
Hello all,
I'm having a problem with my qtek 9000 with latest rom from myqtek.com, some programs can't be opened because they say: "The file "patched-game-file-here" cannot be opened. Either it is not signed with a trusted certificate or one of its components cannot be found. You might need to reinstall or restore this file"
I've tried some files to disable certificate security but no luck, the problem is still there :|
Anyone can help getting over this problem?
Try this.
http://buzzdev.net/index.php?option=com_remository&Itemid=109&func=fileinfo&id=194
This is from the wiki:
Code:
Allow the unsigned app from installing for everything.
HKEY_LOCAL_MACHINE\Security\Policies\Policies] Change value 0000101a from 0 to 1
Do a soft reset.
V
Hello all, tks for your help
vijay555 - i tested your code but no luck, problem still there.
victoradjei - i've tested that app, pretty simple to use an finally it works ! (YES TK U) , for now it's a solution let's hope someone can make a .cab in order to disable this security check for good.
Hi,
I have an htc P3600.
I've downloaded the application for buzddev.
I've also changed the registery but I do not know what to do with that application. There is the signcode.exe, what should I do with that file downloaded?
Could someone shed some light on how to use the app from Buzzdev? Is it supposed to be run on the device?
I ran the EXE file on my PC and a DOS window popped up and closed itself and nothing happened.
Thank you in advance!
Extract the SignCode files into a folder. Then you have to run it from the command line or the "Run" option from the "Start" button and tell it what EXE file to fix. Since this program actually changes the executable file by changing the embedded security certificate, you might want to make a backup copy of the EXE file first.
Here's the syntax:
<path to SignCode files>sign.bat <path to program and filename>
If you extracted the signcode files to your "C:\Program Files\SignCode" folder and are trying to fix your "C:\Program Files\SomeGame\SomeGame.exe" file, here's EXACTLY (quotes and all) what you would type in the "Start" "Run" box or a command prompt:
Code:
"C:\Program Files\SignCode\Sign.bat" "C:\Program Files\SomeGame\SomeGame.exe"
You should notice the timestamp of the file change indicating that the embedded security certificate was changed. Copy the updated file and overwrite the original EXE file on your mobile device and then try running it. This will still pop up an "Untrusted Source" type of security message on your mobile device but you will have the option to install it anyway and it will work fine after that.
This should work too, M$ made a tool for provisioning devices.
http://www.microsoft.com/downloads/...8c-d587-47e0-908b-09fee6ea517a&displaylang=en
victoradjei methode worked perfectly for me on WM6
Does anyone have the info that was in this link?
The forum is their but looks like the link is dead.
http://buzzdev.net/index.php?option=com_remository&Itemid=109&func=fileinfo&id=194
Thanks,
Kenny
I dont know, but could try attached may help. I don't know anything else to help... hopefully someone else will.
Hello I have a problem, I have tried to modify a dll file located in the window folder wich is controlling part of the phone skin on a Artemis. (phcanOverbmp.dll)
The problem is that the phone dosen't recognize the altered Dll file becuase the certificate changes when you alter the file.
How do I solve this?? I have tried to create my own certificate, but Aretemis dosen't except it. and I haven't been able to sign the Dll with anyone of the existing Root certificate already installed in the Artemis. How do you work around this problem??
Both create/install a certificate, and how to sign the Dll
I really need help, Thank you
i have the same problem
if anyone have some advice, just tell for us
You can not edit or change a signed DLL in any way. Once you do the signature is broken and the file becomes unusable, you can not resign it.
You have to remove the certificate first, then make your changes.
I saw a code for this somewhere but I don't remember the link.
Look around, there may be a utility to do this.
In your case resigning may not even be necessary.
levenum said:
You can not edit or change a signed DLL in any way. Once you do the signature is broken and the file becomes unusable, you can not resign it.
You have to remove the certificate first, then make your changes.
I saw a code for this somewhere but I don't remember the link.
Look around, there may be a utility to do this.
In your case resigning may not even be necessary.
Click to expand...
Click to collapse
in my case it is necessary, otherwise the phone will not recognize the dll and display the WM5 original skin. I know you can't resign the DLL with their certificate, but i know that you can add your own root certificat in the phone. And then you must sign the DLL with that certificate, (wich is our own certificate) so the phone recignizes it. Then it shall work. I just don't know how to do it.
Thats relatively easy. All you have to do is create a provisioning XML and put it in a CAB. The WM 5 SDK has a sample.
Here is a link to a sample as well.
By the way if this is considered a system file (I am not sure about that) it needs a trusted, not root certificate.
Intro
Lately I've seen a lot of posts by people who are trying to replace WM internal or driver DLLs, either for hacking/testing or to release. Aside from the possibility they are just doing something that won't work in the first place, I've seen failure a lot of times because files aren't properly signed, or if they are, the certificate in question not being in the right certificate stores for it to have any effect. On some ROMs it will still work due to patched NK.EXE, on others it won't, its just not very reliable.
So, I present you with the correct way of doing this by means of a small tool that will do this for you: DriverWiz. It will take care of most of the stuff, and leave you room for additions. You will however still need some basic knowledge of the command line, if you don't have that, you have no business doing anything like this anyways.
Background
I use this technique myself all the time. When just hacking away, replacing system DLLs to trace calls, etc. It's also the same method used for the HTC-CA drivers and the ICS installer. This method works on most stock ROMs as well, though not on all of them (in rare cases some security policies are set that will prevent CAB installation)
Usage
It's fairly simple to use. Just extract the attached zip file somewhere, open the command promt, and change directory to where the zip was extracted. That's the installation part.
Now when you actually want to build a CAB file from a DLL, you use the DriverWiz.bat file.
DriverWiz v1.0 by Chainfire
Usage:
DriverWiz.bat "Description" "CAB-name" "DLL-name-1" ["DLL-name-2" ...]
Examples:
DriverWiz.bat "New DDI" "ddi.cab" "ddi.dll"
DriverWiz.bat "Two DDIs" "ddi.cab" "ddi.dll" "ddiaux.dll"
Click to expand...
Click to collapse
DriverWiz will take care of signing the DLLs, inserting the certificate, etc, and you will end up with a proper CAB file for this kind of thing. Just copy it to your device and run it to install.
#1. You need to put the DLL files in the same folder as DriverWiz. Do NOT include paths in your DLL names
#2. Include the quotes in the command like in the examples!
#3. The first time you install a CAB made by DriverWiz, your phone may still give you a certificate warning. This is normal, don't worry about it.
Caveats
While this method has never failed me yet, it is possible that some files cannot be replaced this way. Just a disclaimer
Modifying
DriverWiz bases the inf file it will create to build a CAB from on DriverWiz.tpl. If you need to add registry entries to your CAB file, modify DriverWiz.tpl before you run the batch file. You can make other modifications too, add files, etc. Just take care that you don't break it
You can use your own certificates as well, instead of the supplied "Dummy" certificate that comes with DriverWiz. The files you will want to modify/replace are DriverWiz.pfx (used for signing) and DriverWiz.xml (used for injecting the certificate). I'll see about finding a reference for how to do that online and posting the URL here (someday). Creating a new certificate from scratch can be a frustrating effort - make sure you got openssl handy
Changelog
19.03.2009 - 1.1 - Added some file exists checks and attribute changes
Download
Temporary PlaceHolder for more Info.
Whoo this is hot from the plate, looks very promising!
Driver testing withoud cooking! joohie
Well if you replace the wrong files you're still going to need to hard-reset to boot. I advise KITL before you do
Works flawless. You tha man.
Didn't work for me trying to cab up No2Chems Fast Charge battery divers.
ruskiyab said:
Didn't work for me trying to cab up No2Chems Fast Charge battery divers.
Click to expand...
Click to collapse
What exactly happened? Attach the files and such
It made the cab and all, but when I went to install it, the unsigned error message popped up just like when I tried it with WinCE cab manager.
That is perfectly normal behavior. The first time you install a CAB with this certificate it will not know the certificate. However, once you install it, the certificate will be injected in the right place, and the files signed with the certificate (the driver files in the CAB) will be allowed to be run.
It won't happen the second time you try it
So if I try to install it again, it'll work fine? is there aa soft reset required in between? I can replace these drivers manually by renaming the old ones and copying them over, the whole reason I want a cab in the first place is to facilitate the UC process when I flash a different rom
ruskiyab said:
So if I try to install it again, it'll work fine? is there aa soft reset required in between? I can replace these drivers manually by renaming the old ones and copying them over, the whole reason I want a cab in the first place is to facilitate the UC process when I flash a different rom
Click to expand...
Click to collapse
Actually it should just work the first time. Just click OK when the certificate error appears.
Nice nice nice work!
error message
I got error messages when creating a cab from a rilphone.dll. Does it mean anything, or are these errors okay? I guess I'm specifically wondering about the SignTool error. If its okay, then my cab should be good.
EDIT: I think I found the problem. I didn't have UAC disabled in Windows 7. I tried it again, after disabling it, and it works fine now. Thanks for the easy to use tool!
syntax for registry entries?
I was experimenting with creating a cab for the Rogers folks who need a specific rilphone for their Caller ID to work. There are some registry entries associated with this feature, so I was wondering what the correct syntax is for putting the registry entries into the .tpl file. I've tried a few different ways, and I've either a gotten a 'Registry section is empty' message, or a 'Registry has an unsupported registry root key' error. I'm sure its something really simple I'm missing, so any help you can offer is appreciated.
It just seems that since we now have this easy method to sign these dlls, so that they can be used in any ROM, that the Rogers people shouldn't have to jump through so many hoops to get it to work.
EDIT: Nevermind. I'm an idiot that didn't do a little bit of research. All is well now.
Excellent stuff, Microsoft may rant about this way of distributing signtool and cabwiz though.
Chainfire said:
You can use your own certificates as well, instead of the supplied "Dummy" certificate that comes with DriverWiz. The files you will want to modify/replace are DriverWiz.pfx (used for signing) and DriverWiz.xml (used for injecting the certificate). I'll see about finding a reference for how to do that online and posting the URL here (someday). Creating a new certificate from scratch can be a frustrating effort - make sure you got openssl handy
Click to expand...
Click to collapse
Here's an intro to cert stores for WM:
http://msdn.microsoft.com/en-us/library/aa458010.aspx
pfx generation is a 2-liner with openssl:
# Generate a CA certificate
openssl req -new -nodes -x509 -days 9999 -newkey rsa:1024 -md5 -keyout cert.key -out cert.cer -subj "/CN=DriverWiz"
# Convert to pkcs12/PFX format
openssl pkcs12 -export -in cert.cer -out cert.pfx -inkey cert.key
got error messages under vista sp2, any ideas?
I also get an error saying that the latest version of CAPICOM.dll is missing. The ones I can find for download from the internet are version 2.0.0, and the tool requires 2.1.0.1 or later.
Does anyone have the needed version of the dll?
EDIT: Found it, 2.1.0.2 version of the dll is in the attachment.
Time Saver !
Many thanks; DriverWiz /w the CAPICOM.DLL saved me about an hour of troubleshooting.
Cheers,
Thanks for the capicom.dll Even after disabling UAC in W7Rc1 it wouldn't go, so great to have it posted to.
Chainfire, which format should the Reg's be added?
I tried the default .reg formating just under:
[Registry]
[HKEY_CURRENT_USER\ControlPanel\Profiles]
@=""
"ActiveProfile"="Normal"
?
Scrap that i found the .inf format
[AddRegistry]
HKCU,"New Key","",0x00010001,1
Many thanks for this, i'll try to Point Driver replacing Sinners from now on to here.
Well INF files are a regular female dog.
If you rather use WinCE CAB Manager, the trick is easily done as well. I do not have it handy right here (I'm not at dev box), but it goes like this.
Put the DLL's and EXE's that need to go in the CAB into the same folder as DriverWiz
Execute the following command from the command prompt in the DriverWiz folder: signtool sign /f DriverWiz.pfx *.exe *.dll
Open your WCM/CAB with CM
Somewhere is an option for "Pre XML" (main screen IIRC).. click to add/edit, and load the DriverWiz.xml file
Save
signtool sign /f DriverWiz.pfx *.cab
Et voila. I should really make an update to DriverWiz to include CAPICOM and write a proper guide on how to do all this manually (including making your own certificates and such). It's easy if you know how
If you could insert another empty post for me at the top, that'd be great.
I have been trying to follow several XDA threads regarding changing icons on the taskbar. The general order goes like this:
1. Run sdkcerts.cab and icone demarrer.cab on phone
2. Rom Extractor to copy .dll
3. Unsigner to un-sign .dll
4. ResHacker to edit .dll
5. Multiple File Signer to re-sign .dll
6. Total Command to move copy new .dll file into Windows folder on phone
However, after each time following those instructions and performing the soft reset, the phone freezes right when (I think) it is loading the Start Menu Button (I "know" this from watching it boot up without editing the .dll file).
I am using an HTC Imagio, with stock ROM - WM6.5 build 21849. If anyone has had failures/successes altering the taskbar using the method above for the Imagio, I could use some suggestions and assistance. Any help is greatly appreciated.
I have had problems also. Things I have noted are;
sdkcerts.cab appears to still be installing certs that are not what is in the msigner. The msigner certs expired on 12/31/09 and I think the sdkcert cab is based on those. I have also noted that when unsigning a dll from my imagio the files size remains the same, the dll should be smaller after unsigning.
I have looked into making a new sdkcert cab, its admittedly not my specialty. I understand how to do this but havent had time to really try. Along with the fact that the hspl will be out soon so I am waiting for that before playing with the taskbar.
bboyle said:
sdkcerts.cab appears to still be installing certs that are not what is in the msigner. The msigner certs expired on 12/31/09 and I think the sdkcert cab is based on those. I have also noted that when unsigning a dll from my imagio the files size remains the same, the dll should be smaller after unsigning.
Click to expand...
Click to collapse
Well, thanks for the reply. I finally got it to work, using the steps above. The only differences I made were as follows:
.:. I used the old msigner program, with the expired certs. I just changed my computer's date setting to 2009 at the time of signing it.
.:. I installed the Total Commander from my computer, whereas before I was simply copying the .exe to my phone and running it. Not sure if this made any difference.
So for now, I will just use the old msigner and change the date as needed to re-sign .dll files.
And also, the unsigner may not be needed, as I read somewhere that ROM Extractor automatically unsigns the file. Now, having said that, I still used unsigner, but the file size didn't change on mine either.