Digital Signature PITA - Windows Mobile Development and Hacking General

I have search for about three hours now. On the forums and google. I can not find a way to make this work. Any help would be much appreciated.
I am simply trying to customize "phcanOverbmp.dll" so that it matches my phone pad skin. I use resource hacker to change the images and when I save the new DLL it looses the digital signature (expected).
I am using signtool.exe from the Visual Studio SDK and the certificates from the WM5 PPC SDK.
I tried wizard mode and I get "The Digital Signature wizard did not complete."
I also ran it via command line with the "/f SDKSamplePrivDeveloper.pfx" switch and I get "SignTool Error: ISignedCode::Sign returned error: 0x80070057"
I have tried "signcode_294" with the .bat file, that gives me "Error: Signing Failed. Result = 80070057, (-2147024809)"
I researched this issue and found that if it is XIP you cant sign it, but this .dll was taken from my device, so it should be PE.
I am really at a loss...
PLEASE help me solve this. There are soooo many things I have customized that I cant use cause of this issue.
Thanks, Lew

Ok, the problem is you are trying to edit a signed file. This is a big no no!
The thing is signature has a checksum. Once you edit a signed file it automatically becomes invalid so you can't run or resign it.
You need to find a way (sorry, can't help you there) to remove the signature before editing the file.

lewcamino said:
I have search for about three hours now. On the forums and google. I can not find a way to make this work. Any help would be much appreciated.
I am simply trying to customize "phcanOverbmp.dll" so that it matches my phone pad skin. I use resource hacker to change the images and when I save the new DLL it looses the digital signature (expected).
I am using signtool.exe from the Visual Studio SDK and the certificates from the WM5 PPC SDK.
I tried wizard mode and I get "The Digital Signature wizard did not complete."
I also ran it via command line with the "/f SDKSamplePrivDeveloper.pfx" switch and I get "SignTool Error: ISignedCode::Sign returned error: 0x80070057"
I have tried "signcode_294" with the .bat file, that gives me "Error: Signing Failed. Result = 80070057, (-2147024809)"
I researched this issue and found that if it is XIP you cant sign it, but this .dll was taken from my device, so it should be PE.
I am really at a loss...
PLEASE help me solve this. There are soooo many things I have customized that I cant use cause of this issue.
Thanks, Lew
Click to expand...
Click to collapse
If you run the sdk cab before replacing "phcanOverbmp.dll" it will work. It did for the batteryfix project that i helped jimm98y with
download one of his earlier zips that has the file you need in it. Can be combined all in one cab. edit i attached it
see here http://forum.xda-developers.com/showthread.php?t=267321&highlight=battery+fix

Thanks,
I installed that cab to my TyTN and the dll still is a no go. Any other ideas or ways to digitally sign it? I am really desperate, I have been trying for soooo long to get these to work.
Thanks, Lew

Thats strange can you send me the file to my email [email protected] and i will try to get it to work. I will include it in a cab i made before and see if that does the trick.

Microsoft has problems signing on windows 2000 SP4?
Any chance you're using Windows 2000 SP4, If so you might want to check out this link.
http://support.microsoft.com/kb/829924
Probably not the issue but, I figured I'd mention it just in case.

Sorry, but I am running Windows 95 version C. So I don't think that is the issue.
I just got a chance to check the forums, I will e-mail you the dll.
Thanks again, Lew
P.S. I am running XP sp2

I've got a similar problem. I tryed to edit some dll's from HTC Touch Phone Pad International, but since they are digitaly signed, i can't change the contents without invalidating the digital signature. The goal would be to make the phone pad look more like the dialpad. I've created all the pictures I need, and I know which dll's to change. I'm using PE Explorer to edit the resources from the dll's, but first I need a way to remove the digital signature, and after changes are made, re-sign it.
Advices anyone?

FInixNOver said:
I've got a similar problem. I tryed to edit some dll's from HTC Touch Phone Pad International, but since they are digitaly signed, i can't change the contents without invalidating the digital signature. The goal would be to make the phone pad look more like the dialpad. I've created all the pictures I need, and I know which dll's to change. I'm using PE Explorer to edit the resources from the dll's, but first I need a way to remove the digital signature, and after changes are made, re-sign it.
Advices anyone?
Click to expand...
Click to collapse
Well I got it to work. With some help I was able to rebuild the signature in the changed dll's.

FInixNOver said:
Well I got it to work. With some help I was able to rebuild the signature in the changed dll's.
Click to expand...
Click to collapse
How did you achieve this? I am having the same problem and i guess i need to somehow remove the signature too.

Yes, it'll be great to have some information about achieving this!
Thanks in advance

any more information on how to do this?

Did anyone figure out a way to do this ?

*bump* *bump**bump**bump**bump**bump**bump**bump**bump**bump*

Related

Copy files from ROM ?

Hi,
I'm trying to get around the problem of the quiet sound with the AT&T rom, I have another XDA running the latest T-Mo rom and was hoping to mess around with some dll's from the TMo rom to see if I could sort the problem, but the drivers used for the sound are protected somehow in the rom, so it won't let me copy them to my SD card or PC (which means I can't try it on the AT&T rom)
Is there any way of copying these files out ? and then into the AT&T rom ??
Cheers
Neil
see dumprom
No good for me then, I only have Windows Machines here..
Ok, I have thought of a possible work around, but I need someone with the T-Mobile WM2003 Rom (Pref 4.01.16) & Linux/Unix to copy the wavedev.dll & waveapi.dll from the \Windows folder and send them to me so it can try it out..
I'm sure its not only me that this "feature" annoys. it makes Tomtom especially useless on the voice prompt side of things.
Cheers
Neil
?? I don't see the problem, dumprom is a windows tool.
in case you had not found it yet, I added the link to the binary to the wiki page.
Ah right, excellent.
Sorry I assumed it was the same as the makerom tool which states its unix/linux.
-=edit=- I just tried the link on the dumprom wiki page, and get the dreaded 404 error
Thanks
Neil
oeps. a common wiki error, I forgot to '~'-escape the '~' in the url.
Thanks mate, it seems to be working now
I'll have a play about with it when I get home.
Cheers
Neil
Back again :lol:
The dumprom app crashes (tried on two machines) when I try to execute it. I have tried it with various command line configuations but the little windows xp error box pops up saying that the program must be closed
dumprom crash
Hi Swifty
Yeah I got this too - until I realised that I was the problem. I was omitting the myrom.nb1 filename (or whatever you have called yours) from the command line! D'Oh! What is your exact command line that you use?
it is known to be buggy and crash on certain roms.
I am working on an improved version in perl - dumpxip.pl
but it does not extract files stored as 'xip' yet.
:lol:
Silly me I done the same thing as you and omitted the rom file.. thanks
I have now extracted the AT&T and TMobile roms and compared the files, the AT&T's wavedev.dll is larger in size, I think this is where the modifications were made.. but I can't rebuild the TMo version into the AT&T rom because I don't use linux
Hopefully someone can help me out and we will finally have a perfect WM2003 Rom -=edit=- IF it works :lol: :roll:
Cheers
Neil
Carefull!
i fearbthat just swapping in the new dll may not help... it may have other dependancies that also need changing. The interface / entry points may also have changed and you may need a whole slew of other stuff and some other registry settings too. But pls go ahead and try... let us know!
Carefull!
i fearbthat just swapping in the new dll may not help... it may have other dependancies that also need changing. The interface / entry points may also have changed and you may need a whole slew of other stuff and some other registry settings too. But pls go ahead and try... let us know!
Swifty said:
:lol:
Silly me I done the same thing as you and omitted the rom file.. thanks
I have now extracted the AT&T and TMobile roms and compared the files, the AT&T's wavedev.dll is larger in size, I think this is where the modifications were made.. but I can't rebuild the TMo version into the AT&T rom because I don't use linux
Hopefully someone can help me out and we will finally have a perfect WM2003 Rom -=edit=- IF it works :lol: :roll:
Cheers
Neil
Click to expand...
Click to collapse
Neil,
Use CYGWIN it's an excellent "Linux running as a command line in Windows" environment. It's easy to install, start and run commands. It comes up as a DOS box-like interface and Voila! You have Linux, stable, clean and fast, including the ability to build ROMs.

Custom Setup After Hard Reset

Guys, Have been searching the site for a couple of weeks now and cant find a solution to my problem.
I work for a company that deals with alot of XDA2 units, so far I have managed to develop a custom extended rom that works fine, but have not been able to find a way to remove links from the start menu and the program menu. seen several threat on the site but no solution. The links have to be removed if a hard reset occurs. At present It has to be done by cloning an image onto the unit (1600 in total)
Any help would be appreciated.
popeye
I would love a program which based on a txt file would "delete","rename"... files and/or registry.
Something that could be executed from config.txt
there was a thread about a .bat interpreter but i don't think they got it working.
M4io said:
I would love a program which based on a txt file would "delete","rename"... files and/or registry.
Something that could be executed from config.txt
there was a thread about a .bat interpreter but i don't think they got it working.
Click to expand...
Click to collapse
I'm using Restorator utility (search through the forum) to do the aforementioned things and much more. Works flawlessly with new Second Edition rom
thx, I completely forgot about that utility. I will defenitely give it a try
http://forum.xda-developers.com/viewtopic.php?t=9333&highlight=restorator

CAB file version issues

Hi everybody!
(hi doctor nick)
I'm having a few little issues with CAB files on my pda2k.
maybe this should be in the blue angel thread, but it's to do with application development, so i put it here. I also tried the forum search, with no results.
i'm wanting to use all my customised cab files that i made for my XDA2, and use them on my new device, the PDA2K.
all of the cabs work, and all of my applications run.
however, upon installing the cab, a message comes up on my pda and says "the program you have installed may not display properly because it was designed for a previous version of windows mobile software"
i've checked the version nifo in all my .inf files.
i've compared them to newer cab files that don't give me that message.
the inf files look fine.
is this a registry setting perhaps, that i could change?
like i said, all the apps work, i just want to stop it from giving me that warning.
does anyone have any ideas?
thanks !
The warning is just about what it says: You are trying to run older (ie now specifically designed for SE) software.
Noithing to worry about when thing work as supposed.
You can get rid of the message by setting the OS verion inse the CAB files higher (but you need ie. WinCE Cab Manager by OCP Software for that) .
i know there isn't anything to worry about. the apps work.
it's just that for the purpose of creating an SOE, i don't want customers to have to click "ok" everytime they reset their device, all apps must install without prompt from beginning to end.
I have winCE cab manager, and have set the version and build number higher in the inf file, yet i can't seem to get rid of the message.
any other ideas ?
you have to set the lower version number to th version of WinCE youre using now.
Set some 'very high' value to the higher version number
There is another thread on this somewhere . . .thats where I got this info from
yeah, tried that too
i sset my version details like this:
[CEDevice]
ProcessorType=0
UnsupportedPlatforms="JUPITER","HPC"
VersionMin=3.0
VersionMax=10.00
BuildMin=0
BuildMax=100000
still no good.
anyways, i'll keep searching for the related thread. i new there would be such a discussion in here, just a matter of finding it.
I think it was versionMin=4.21
http://forum.xda-developers.com/viewtopic.php?t=15761
M4io said:
I think it was versionMin=4.21
http://forum.xda-developers.com/viewtopic.php?t=15761
Click to expand...
Click to collapse
thanks M4io,
that's the link i was looking for
ok, there seems to be something wrong here.
either that, or i'm doing it wrong (highly unlikely :lol: )hahha.
anyway, i've tried all different versions, i've tried all different build's.nothing. still won't work.
so i downloaded the latest operator settings for my device.
that cab ran no problems, so i extracted the inf, then i copied all the version info from that one, and dumped it into the inf that i'm trying to package. ran the cab on the device, and i still get that error !!
how can that be?
there must be something else in my cab, that governs version conflicts.
anyone
Hi Twinair,
please try to set it as follows:
[CEDevice]
ProcessorType=0
UnsupportedPlatforms="JUPITER","HPC"
VersionMin=3.0
VersionMax=4.21
BuildMin=0
BuildMax=-536870912
buzz
I've tried with the above settings buzz, but it still doesn't work.
does the CEsetup.dll, or setup.dll have anything to do with version control perhaps ?
could be, that you should use your own setup.dll
I really don't know now... I've never made a cab which was not complaining about the older version... (
Looked for it also in internet, but found nothing...
But if you download the trial ver of OCP CabManager, you can unpack cabs for SE and take a look there... my trial period is expired now...
Maybe you can try to use setup.dll out of such cab...
buzz
damn, still not getting anywhere.
i've put in the correct version info, i've used a setup.dll file from a known working cab file, i have the latest full version of cab manager.
i'm fresh out of ideas
back to the drawing board.
if i figure it out, i'll let you know.
This is what MSDN says at
http://msdn.microsoft.com/library/d...dnwm2k3/html/screen_orientation_awareness.asp
Installation Warning Messages
When a legacy application is installed on a Windows Mobile-based Pocket PC capable of screen rotation, the warning message will appear
This dialog is to advise the user that the application they are about to use may not be aware of square screens or screen rotation, and may not display properly in landscape mode. This dialog will only appear if the VersionMin value (which specifies the lowest OS revision number your app supports) file is less than 4.21.
Since setting VersionMin to 4.21 will prevent your application from installing on older Windows Mobile-based Pocket PCs, it is recommend that you disable this warning message by setting the BuildMax value (which is typically unused) equal to the following values:
BuildMax values
0xA0000000 Application supports square screens (240x240 pixels).
0xC0000000 Application supports screen rotation.
0xE0000000 Application supports square screens and screen rotation.
These parameters can be changed by editing the [CEDevice] section of the INF file which cabwiz uses to generate your CAB file.
so
[CEDevice]
VersionMin=4.21
VersionMax=4.99
BuildMax=0xE0000000
Should do the trick[/b]
@Shikra
...perfect man, let me test it... )))
THANX
buzz
GREAT!!! it works!!!
THANX
buzz

HTC Home Today Plugin

Hi,
I’m trying to make the HTC Home Today plug-in on WM5 to work. With many try and a lot of will I was unsuccessful because ROM upgrade was not an option.
After many hours and days, I found out that there is an error when doing installation from the cab file. I was able to intercept the error. I found out that the HTCHome.dll doesn’t register on WM5.
I think there is maybe a reference in the DLL that looks to see witch version of windows mobile it’s on, and if the reference is ok then the file get registered, if not it doesn’t and fails to register.
Here I’m boys and girls, I need good soul that can help us (I say us because there is others that is dreaming) to get a workaround!
I’m at my limit knowledge to hack this DLL that’s why I writing this today.
Regards,
My phone is a HTC TITAN (P4000) with WM5
PS: the problem is not the phone model but the OS version…
Requirements to have this pluging working:
Windows Mobile 6 ( PocketPc).
HTC HomePlug: Today screen plug-in (Displaying Time/messaging notifications/Launcher), allowing quick changes of various options, such as weather, missed calls, sms/email notifications, time/alarm changing & program launcher.
Link to the current file:
http://www.megaupload.com/?d=8ZGSK4EE
http://rapidshare.com/files/36863085/HTC_Touch_Home_Plugin.cab
I didn't have time to look at this and don't know when or if at all I get the time, but if the problem is with the registry the solution should be easy:
Get a reg editor, got to HKLM\Software\Microsoft\Today\Items and manually create a key for the plugin. Check to see how other plugins are listed there and you will know what values to create (key name is what you see in the settings menu).
Other possibility is that the DLL is compiled with WM 6 SDK. Though I have not made many attempts with this it seems files compiled this way are not recognized as valid by earlier OS version.
This might be resolved by tweaking the DLL header.
levenum said:
I didn't have time to look at this and don't know when or if at all I get the time, but if the problem is with the registry the solution should be easy:
Get a reg editor, got to HKLM\Software\Microsoft\Today\Items and manually create a key for the plugin. Check to see how other plugins are listed there and you will know what values to create (key name is what you see in the settings menu).
Other possibility is that the DLL is compiled with WM 6 SDK. Though I have not made many attempts with this it seems files compiled this way are not recognized as valid by earlier OS version.
This might be resolved by tweaking the DLL header.
Click to expand...
Click to collapse
Thank for the reply!
YES i have done the registery edition in the today items and added the accorded strigs.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Today\Items\ HTC Home]
"Enabled"=dword:1
"DLL"="\\Windows\\HTCHome.dll"
"Order"=dword:0
"Flags"=dword:0
"Selectability"=dword:2
"Type"=dword:5
"Options"=dword:0
I think you have a good point with the DLL heathers.
Regards
any news about this?
HTC Touch home plugin
does it work on VGA?
Best regards
Deiota
There is a thread in this exact forum with a link to a working cab for WM5.
ok got it installed only one thing......im in reno nv and all the weather is in france and european places
Tregrad said:
ok got it installed only one thing......im in reno nv and all the weather is in france and european places
Click to expand...
Click to collapse
Have a look around for HTC Home Customizer
colonel00 said:
There is a thread in this exact forum with a link to a working cab for WM5.
Click to expand...
Click to collapse
can you please post a link...
Customization
http://forum.xda-developers.com/showthread.php?t=319308
6 buttoms - WM5
http://forum.xda-developers.com/attachment.php?attachmentid=51162&d=1190200940
thanks mate!
Anybody kind enough to provide a link for HTC Audio Manager for WM6 that is not in rapidshare format?
Thank you.

HTC Home 2.0

Found Kaiser.HTC.Home.v2.0.814.722-schen.cab in the Hermes forum:
http://forum.xda-developers.com/sho...hlight=Kaiser.HTC.Home.v2.0.814.722-schen.cab
Versin 2.0 allows you to add a diffrent number to favorite People (1.5 defaults to the mobile thus you need to create a new contact to use the Office number.).
Well that is the good news, the bad is that I cant get it to work on my BA
It installs well.
Under Start - Settings -Today - Items - It adds a HTC Home Tab.
The tick boxes work fine (fast as well JOKE).
And on the Today screen it adds Nothing.
I have done a old uninstall, new install, wait, softreset, wait.
This is a patched version based on the thread so may be the clean version would work.
So has anybody got Version 2.o to work on a BA ??
That's v 2.0.720719.
2.0.814.722 is here: http://forum.xda-developers.com/showthread.php?t=327646
DANDANA said:
That's v 2.0.720719.
2.0.814.722 is here: http://forum.xda-developers.com/showthread.php?t=327646
Click to expand...
Click to collapse
SOME PICTURES PLEASE!!
I didn't try it and MDAIIIUser said isn't working on BA....yet
It looks the same as 1.5 with aditional options, but i can't get it to work either, i install needed certificates but still nothing
xplode said:
It looks the same as 1.5 with aditional options, but i can't get it to work either, i install needed certificates but still nothing
Click to expand...
Click to collapse
2.0.xxx.xxx work much better than v 1.5....thrust me.
Are you able to get v2.0.7xx.xxx to work?
You can see that v 2.0.8xx.xxx and v 2.0.7xx.xxx and v1.5.xxx.xxx all using DIFFERENT certificate to sign. That is my experimenting on the certificates thing. All work OK with my Hermes. Maybe it is certificate thing...maybe it is other matter that prevent the new version from working correctly for BA. But really I DONT see any reason other than certificate. You can try to sign the dll with other certificates to see if it work or not.
I only patch the dll to enable instalation outsite of windows directory and to fix the brightness shortcut. Other than that nothing. So, this should not be the issue
Congratulation guys WM6 finally arrived for BA and Hima user. I should have hold my thrustworthy Hima longer I dont have to upgrade, BUT Hermes ROCKS, no regret.
Thanks schen for your input, i have tryed al the 2.0.x versions with the same certificates (looked mainly into hermes forums) provided for hermes, but the home settings show in today options and the plugin just does not load. I agree that this is certificate error i will try to sign them with difrend certificates to see what will happen
regards xplode
Edit: I have tryed both 2.0 versions on clean hard resseted rom with both certificates installed and none ot them does not work for some reason, now i will try to sign the dll's with sdk certificate to see the results
Anyone have any luck with Home 2.0 on BA?
Same problem with HTC Plus.
I think the problem is certificate sign.
Just to let you know that this issues is just not with your devices, we are also seeing the same problems with the Apache running Helmi's port of WM6. It shows in settings, but nothing on Today screen. Have tried certs and signing as well.
However, both 2.x versions work fine with the Titan running WM6. My thought was that there were some remnants from the WM6 port that were still using WM5.
maybe you are right, because i signed all files with one certificate and then with another ans it is the same result
If you guys have install the sdkcerts.cab before installing home then I dont think it is certs problem...it is more like device specific security setting problem
Maybe you guys can take a look at the WM5 security...each of the ROM might have different default setting. Some device even dont allow security setting to be change.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/wmsecurity.asp
I will also try copying the SampleDevPrevCert.pfx to the device and click on it. It will add the root cert to the thrusted certificate store. It may work it may not but very simple and worth a try.
Bottom line, if you try the "No Security" setting which allow all signed or unsigned apps to pass and the HTC Home still not working then I dont have any idea anymore.
Please try....
Out of curiosity why v2 of HTC home working on certain device and rom and not working on others, I have resigned all the dll, exe, and mui files with my own certificate.
Installation note in the Readme file inside the zip.
I am looking for some people to try if the cab work. As soon as 2-3 report still not working I will delete the attachment.
Test it, i couldn't install at all; "installation of ... was unsuccessful"; thanks anyway Schen.
Now installing, will keep you posted in few minutes
the instalation of the cab is unsuccessful (the home cab)
DANDANA said:
Test it, i couldn't install at all; "installation of ... was unsuccessful"; thanks anyway Schen.
Click to expand...
Click to collapse
Same error message for me
schen said:
Out of curiosity why v2 of HTC home working on certain device and rom and not working on others, I have resigned all the dll, exe, and mui files with my own certificate.
Installation note in the Readme file inside the zip.
I am looking for some people to try if the cab work. As soon as 2-3 report still not working I will delete the attachment.
Click to expand...
Click to collapse
I tried 3-4 times, but always installation of HTC Home cab was unsucessfull
Hi Schen,
Thanks for your help with this issue. I can confirm DANDANA's results on my Apache (Helmi's WM6 AKU .7) with no prior version of HTC Home installed. Your cert cab installs OK but the Kaiser.HTC.Home.v2.0.814.722.Resigned-schen.cab fails to install.
I believe this is due to the mui files (from my own experience in trying to unsign/resign them I think the certificate table gets corrupted somehow).
I sent you a PM earlier, but would it be possible to obtain a copy of all of the original HTC Home 2.0.814.722 PE files (prior to any hex editing & re-signing)? Helmi would like to take a look at it since it seems to be an issue with his WM6 ROMs (also affects his AKU .42 release for APAC).
Thanks again!
i have removed flags in cab for the self registering and shared for WmpPluginToday.dll and now it installs but it still does not work
xplode said:
i have removed flags in cab for the self registering and shared for WmpPluginToday.dll and now it installs but it still does not work
Click to expand...
Click to collapse
Yes....I forgot to remove the self registering of the plugin, that is the cause of installation unsuccessfull....Earlier I tested this on my hermes manually coying the files and it work OK.
I have remove the cab. AT least I am convince by now it is not the certs thing.
Luv...got your PM...I will have to look for the original HTCHome.dll if I still have it. As I said before....the hack I did was just to change the default directory (\windows) to (\HTCHome) for the graphics AND change it to call HTCUti1.dll instead of HTCUtill.dll...They are unicode hex editing only. You could hex edit and change "\HTCHome" back to "\Windows" and "HTCUti1" back to "HTCUtill", resign it and everything is back to original. The mui files came unsign. I have to sign the mui files to get it to work for hermes.
In the mean time....the main difference between v 1.5 and v 2.0 is the "PROFILE" Tab...Try to install, disable the "Profile", reset if necessary to see if it work. The attached cab only enable the Home tab by default...if it work, you can enable all other tabs one by oneto see which tab is causing the problem.

Categories

Resources