Customizing CAB files loses digital signature - 8125, K-JAM, P4300, MDA Vario Software Upgrading

In an effort to customize my Extended ROM so that it will automatically populate the registry with my Owner name, Address, Telephone, etc., I found out that since the Digital Signature security method is on by default, putting in any CAB file that is either not digitally signed, or loses its authenticity because it was modified will be passed right over during the Customization phase after a hard reset.
I feel like this is an Xbox now... Gears are turning, I'll let you know if I come up with anything.

I have resolved this issue.
http://www.beyondthetech.com/blogs/kjam/2005/10/disabling-security-and-customizing.html
[Mod Edit Link does not hold information any longer Check last post of this thread]

Nice :wink: Gave it a go and works a treat !! How do you build a CAB file though that outs in all your local settings?

The Answer to this old Question is now also found here:
http://forum.xda-developers.com/showthread.php?t=495145

Related

Question - Editing a DLL - Need Permission?

Hi guys I have to use PTT for work and for some gawdawful reason HTC made the PTT icon a little yellow smiley face when its on, no they could just make a button that said PTT or something they had to use a smiley face and just looking at the face angers me. I dug around and I found a "hidden" file in the windows directory called PTTService.dll I opened it, found the icon resource, created a new icon, imported it, saved it and when I tried to put it on my machine I got an error that I don't have permission to do that.
I've pretty much hit a wall, I thought I'd done the hard part but I guess not, anyone have ideas? I don't wanna screw with the ROM because its a company phone.
You'll need to disable the dialer skin, and the PTT service through the registry, and soft reset so that the dll isnt actively loaded in memory. then you'll need to sign your dll with a certificate like the sdk certs, and load that cert onto your phone, then overwrite it and set the ptt service and dialer skin to load, and you should be golden..
I bet I could figure out how to do the registry thing, but the cert part makes my brain explode!
The attached app will sign any .exe or .dll with the Windows Mobile SDK Certs (use SDKSamplePriv)
Then copy SDKSamplePrivDeveloper.cer to your device and run it like a cab.
The signing process will fail if the file is already signed, first you need to strip the signature.. it will also fail if readonly, the solution to that is obvious
http://forum.xda-developers.com/showthread.php?p=2508061 <--- that app will strip the signature
Sorry its been so long to revisit this post, but I had to give a intro to Fuze and Win Mobile to all our Corporate users who all just got them recently and I wanted mine to look and act like theirs until I gave that presentation.
So I finally created the icon to replace that horrid smiley face, I created it with Microangelo (I couldn't believe I still had that app after like 5 years) and used PEXplorer to open the .dll, its PTTService.dll actually, and edit the resource, then change the icon and it worked! I only changed the small icon one because that's the one I see. (32x32 8 bit)
So I got a trial (15 day) of MemMaid and turned off the services for PTT and Keypad and set them to Manual Start, restarted the Fuze and they were off.
I think from here I am almost golden, I just couldn't figure out the signing part, because after I overwrote the PTTService.dll on the device (it warned it was on ROM etc) and tried to use MemMaid to start the service and put it on Auto Start, upon reset only the Keypad was working and the PTT was on Auto Start but wouldn't start unless I did it manually, and when I replaced it back with the original it did Auto Start so I think I signed it wrong.
Heres what I did I downloaded that extracted the linked file (by Da_G), then I had a folder called Sign_msigner, I ran siggner.exe chose the PTTService.dll that I created and it appeared to work because I got a text doc saying:
"Warning: This file is signed, but not timestamped.
Succeeded"
so I replaced it, did the MemMaid thing and it wouldn't Auto Start, so I though Oh I forgot to do that certificate thing, so I coped the SDKSamplePrivDeveloper.cer from the Tools folder onto the Fuze, ran it, and that worked because I had a certificate in my certificates area of the Fuze (was only good until 12/31/08 it says) and tried it again and still no luck, can you guys give me some more great advice, I'm so close!!
It sounds like you did everything right, check the "Certificates" menu under settings to make sure the certificate you signed it with did load..
When a .dll is loaded as a driver (in HKLM\Drivers\BuiltIn) signing it via this process won't work because those drivers are loaded before the certificate store is vetted.. but I don't think PTTService.dll loads there..
I didn't see anything in there except under the Intermediate tab and it says issues by: TEST USE ONLY - Sample Privileged Root.... expires: 12/31/09
I think that's in there tho because I ran that SDKSamplePrivDeveloper.cer on the Fuze myself (or is that what i was supposed to do), I don't think it started when it tried to load the PTTService.dll
I attached the dll, is there a way to check it?
Also there's 2 files in the tools folder called signcode.exe and signtool.exe, I didn't use these for anything, should I have.
Looks good, not sure why its not loading.
Might need to tool with the security settings, check this post for a good read on the subject:
http://www.devx.com/wireless/Article/38730/1954
You can get the tool itself here

HTC Weather, problem & fix

I thought I would add this here unless anyone else runs into the same problem. I broke my HTC Weather yesterday while trying to upload local cities into it. I am running the Dec 03 release of HyperDragon, but HTC Weather seems to be the same (at least in terms of files to edit) across different platforms.
After adding my local city, and uploading it back to the phone when I went into the weather tab to add a new city, I was unable to search for any cities. In fact the search screen contained no entries at all. Essentially, I corrupted the xml file, and the phone was unable to read it.
How I broke it:
Be careful what you edit with. I just opened the file with word pad in Vista to copy my new city information, but the xml file and word pad don't like each other. I found that the tilde ( ` ) <--- that character appearing over letters was unsupported in word pad. The xml file was unable to then read it. It saw it as corrupted data.
To fix it:
I just deleted the offending cities with tilde's in them. I didn't need them anyways. However, one could also just edit the file with a better program and re-upload it to the phone. Once I fixed the file, HTC Weather saw my new cities and was more than happy to read them.
Maybe someone else already went over this. I don't know. But I know I searched on the forum for quite some time without finding out what I did wrong.
AT&T tilt running Hyperdragon
The first mistake was editing an XML file with wordpad. Try using Komodo next time. Always use the proper software for certain editing functions.
Heres a link to the Freeware Komodo XML Editor.
http://community.activestate.com/products/Komodo
didnt I say that
SpiritOne said:
I thought I would add this here unless anyone else runs into the same problem. I broke my HTC Weather yesterday while trying to upload local cities into it. I am running the Dec 03 release of HyperDragon, but HTC Weather seems to be the same (at least in terms of files to edit) across different platforms.
After adding my local city, and uploading it back to the phone when I went into the weather tab to add a new city, I was unable to search for any cities. In fact the search screen contained no entries at all. Essentially, I corrupted the xml file, and the phone was unable to read it.
How I broke it:
Be careful what you edit with. I just opened the file with word pad in Vista to copy my new city information, but the xml file and word pad don't like each other. I found that the tilde ( ` ) <--- that character appearing over letters was unsupported in word pad. The xml file was unable to then read it. It saw it as corrupted data.
To fix it:
I just deleted the offending cities with tilde's in them. I didn't need them anyways. However, one could also just edit the file with a better program and re-upload it to the phone. Once I fixed the file, HTC Weather saw my new cities and was more than happy to read them.
Maybe someone else already went over this. I don't know. But I know I searched on the forum for quite some time without finding out what I did wrong.
AT&T tilt running Hyperdragon
Click to expand...
Click to collapse
Next time use notepad that is what i use...also the XML file is in my download section go there and download it open it in notepad and edit then move it into the windows folder...u should be good to go..
How did you manage to get adding cities to WORK?
I followed the instructions that have been posted around, but the URL fragment is NOT as displayed in those posts anymore on www.accuweather.com.
Going to htc.accuweather.com from my Kaiser gets me something that looks SOMEWHAT similar, but its not the same - if I try to use the same format that other US cities are in for mine, I can locate it in the list but it won't update.
Any help?
Genesis3 said:
How did you manage to get adding cities to WORK?
I followed the instructions that have been posted around, but the URL fragment is NOT as displayed in those posts anymore on www.accuweather.com.
Going to htc.accuweather.com from my Kaiser gets me something that looks SOMEWHAT similar, but its not the same - if I try to use the same format that other US cities are in for mine, I can locate it in the list but it won't update.
Any help?
Click to expand...
Click to collapse
I am not sure what you are asking...I just added my city like MOD Scotchua said to do and it worked...
http://forum.xda-developers.com/showpost.php?p=2644237&postcount=2366
Aha - I screwed up. Its working now
Spoke too soon..... it KINDA works.
The currnet Manila 2D executable will go back to the top screen (the home page) if you hit the END button twice. It also will mark an incoming SMS "read" if you sit on it on the top page for a few seconds.
The patched one does neither. It will not go back to home unless you navigate there, and SMS do not get marked read.
Is the patch involved (e.g. could I go in with a hex editor and make a change to the CURRENT Manila executable?)
Update to THAT....
I took a quick look at the executables and found the change, with the different URLs. However, it appears the new one is longer than the old, which means that a quick "patch in place" is unlikely to work (I have no idea what's AFTER that block of data - and it ain't zeros, and IS apparent UTF-8 text - so I'm likely to scramble something doing a quick overwrite.)
This in turn implies that you need a way to disassemble the exe file and replace the data, then reassemble it (e.g. to assembler, at least) assuming you don't have source.
So..... anyone have a tool for this or is this a case of "have lots of fun playing with something that can disassemble it, find a clean place in the data segment to put the new reference, and fix it that way" sort of game?
SpiritOne said:
didnt I say that
Click to expand...
Click to collapse
yep... just rubbing it in some more
I wouldn't use notepad either. I'd rather not get into a long discussion about editing xml files with notepad either
An XML editor is definitely the way to go.
Yet another update....
What's with the app here? I patched it with a string that fits using a hex editor.
What I wind up with refuses to run. Are these apps cryptographically signed?
Answer: Yep, and once modified, the signature is no good. I don't see anything in Advanced Config that can turn that protection off either; you can disable the requirement that CABs be signed, but I don't see where you can disable the requirement that APPLICATIONS be signed. My security policy settings are such that all security is off, but attempting to run the patched executable by hand elicits a complaint about the signature being invalid. I presume that a MISSING signature would be ok, but a CORRUPT one is going to get complained about - and I have no means to fix that.
Yet more....
I have found the code-signing tools after rooting around and re-signed the application.
It still fails to work; it appears there is a SECOND call to an HTC web site in the current Manila2D code which is NOT in the other patched file.
That one goes to: http://weather.manila1.htc.com/widget/htc/forecast-data_v3.asp?locCode=
DNS shows the address is a CNAME to htc.accuweather.com, and the worse news is that the replacement string that goes in the other place doesn't fit in there - its one byte too long.
It also looks like THIS is the one being called for updates, because changing the other, direct call to the htc.accuweather.com link doesn't change anything - the codes in the file that refer to places accuweather handles still work, but those that refer to other places do not.
Any ideas?
Final Fix - Read
Ok, here's what I've accomplished.
I patched the Manila2D.exe (the CURRENT copy from HyperDragon and others) and have re-signed the code (with a self-signed cert)
I also grabbed the php script and set it up on a VERY short domain name I registered this afternoon, htcwx.org - it exists ONLY for this purpose and is NOT a generic HTC web site.
I have modified the script as necessary, and the firmware as necessary. The replacement Manila2D.exe file is attached. To implement this simply replace the Manila2D.exe in your \Windows directory on the device with the one in this ZIP file. That's it; you can then add city codes at will in the weather file list and they will work.
The previously-posted version of Manila2D.exe has a couple of bugs that I consider show-stoppers, and patching the current version necessitated having a shorter URL as one of the places required to be patched would not allow the "not2advanced" url to fit.
Note that this weather reflector is being run by me, is OPEN and will remain indefinitely; I have a very high-bandwidth connection and expect no interruption in that service. Feel free to use it.
I now have WORKING HTC weather in Manila for virtually anywhere.... and you can too without the restrictions that existed in the previous patched copy (no return to home screen with the END key, and no SMS message marking)
This script "portal" should also work with any other patched HTC Home or HTC Manila applications; the complete url is http://htcwx.org/wx.php?
Note that there is NO general content on that web site.
Enjoy!
PS: As of this instant the .ORG TLD nameservers haven't picked the domain up yet from my registrar. That's abnormal; I see it on my infrastructure but not globally. It should be globally visible by morning.
There's just one thing left to say:
Thank you!
I've been fiddling with this for quite some time, and once I've found this thread everything worked as advertised!!
Happy new year!!
Glad it works for you! Happy New Year to you as well.
Hi Genesis3,
I have installed yesterday Josh's v15 M2D Plain 3G ROM and would like to customize the Weather and add my location.
Your Manila2D.exe is 1.1 Mo where the Manila2D.exe included in this ROM is only 410 KB .... Do you think I can change the original by your's ?
Thanks
That copy is PROBABLY compressed. If it is, the strings can no longer be patched.
You need to talk to the chef and get the uncompressed EXE file - if he has it.
Packed manila2d.exe
I haven't seen anyone post about this but the compressed manila2d.exe that I have uses UPX it worked for me to both unpack and repack the file.
Look into the file for "$Info" if it say's packed with UPX the link above may work for you too. (about 350h char's in)
ENJOY!
Genesis3 said:
That copy is PROBABLY compressed. If it is, the strings can no longer be patched.
You need to talk to the chef and get the uncompressed EXE file - if he has it.
Click to expand...
Click to collapse
As with everything here YMMV, make backups and if you blow it up don't blame anyone but the operator.

[Q] Custom Tab

Hi guys,
I don't know if this is the right forum to post on..
but I have a question relating to adding a Custom Tab in TF3D to display a custom program.
Is there an app out there that allows you to add your own custom tab? I would like to have a tab to run a third party app. Or is that a ROM thing?
Do I just change the registry in the manila files?
Also, is there a guide for noobs to understanding how TF3D works? I've had a look at the wiki and it lists all the manila files and their functions, but I'm not sure how they work (e.g.: Can I just 'add' an extra entry into a manila file and get an extra tab?)
Much appreciated if someone can point me in the right direction!
Really??? No one??
Wow....
Okay then, I'll give it a shot myself. I have basically no programming experience (aside from high school VB and a little HTML and I read a little C++ in 24 hours...I got to the 6th hour and got lost ) but it seems to me that editing various manila files (e.g.: 269*_manila) seems to be the way to go.
I'm on holidays at the moment, so I will get to it next week, but here's the plan of attack:
1) Find a manila file that lists the tabs and duplicate a tab entry but change the name (from various online readings it seems like it's 269**338_manila or something)
2) Find all the references and links that manila file has and duplicate those (obviously under a new name)
3) Duplicate the mode9 file, and see if I can't create a replicated tab of an existing tab
4) Change the mode9 file
5) Realise that I don't actually know how to do that, and find out how to use mode9editor as well as learn how to read the stuff that comes up
6) Cry a little
7) Play around some more
Any pointers from people who've tried? Or know more than I do (which, I am guessing, is most of you)
Oh, by all means, try yourself. And then post here.

[REQ] XML builder for Raph

Hi all
I was wondering how many people here would like to have some sort of way to build an xml which upon completion of a ROM update (which for some us are only day's apart) would change a load of settings to what we want for them
this is just a concept at the moment and i would like to work with someone or the community as a whole to produce a program to do this
the concept i have is as follows:
a simple windows exe Window which has inside it drop down menu's for all of the settings possible (cleartype/text size/regional settings/time zone/notification settings) fields (username for email/password/server addresses/screen name)
and if possible, something to allow us to drag and drop CAB file's into a window which would then also package up the cab's into a folder and spit out/generate the relevant SDCONFIG.txt file
is this at all possible? is there much interest in this?
I can go through and try to find as many of the settings possible and attempt to perhaps find the relevant registry settings even
i would really like to get the ball rolling with this, im sure it could work really well, not only on the raphael, but also on other devices perhaps
please post any interest on this project/concept here and i would really like to do something about this, im about to go and figure out the best way to even code this, however my coding knowledge is about zilch.lol!
.PROVXML files are the ideal place for last minute configuration changes. I'm just starting to explore this avenue and I've found tremendous flexibility in what one can change.
Have a look at the following information ... right from the source
Provisioning Using a ROM Configuration XML File
http://msdn.microsoft.com/en-us/library/bb737254.aspx
Configuration Service Provider Reference for Windows Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/ms889539.aspx
There's also some excellent thread on XDA ... you'll have to do a bit of searching for them.
HTH,
have you looked at oemizer?
Assume this is the one you mean: http://tiermann.net
... takes the fun out of doing this the "manual way"
Cheers,
I don't use it personally. I came across it when I was learning with my M3100 (Hermes) and it provided a few useful insights at the time when I disected what it had created. I found a few problems and don't use it, but it seems like a similar attempt to what the OP is trying to achieve.
many thanks for the replies
im just looking into the oemizer that was posted and see how that works, however, i get the impression that its for rom cooking
Hi duke_stix,
That's where it's often used ... although, I have come across some posts about utilities that can re-initiate Provision XML files already present on the device or new ones placed on an SD card.
*EDIT* - Some examples
DotFred's Task Manager: http://www.dotfred.net/TaskMgr.htm
HTCustom: http://shadowmite.com/forum/viewtopic.php?f=28&t=2231&p=7890#p7890
Cheers,
I have not seen anything that does exactly what you suggest, but things to look at that are maybe related include
Sashimi
tier-autoinstall (or something like that)
They run the files but don't create them.
You can always just export the reg values and then import them after you flash...
or use a reg to xml program to add it to SDConfig
I'm working on a new app right now that might have the potential to cover what you're asking for, but the exact features necessary to pull off at least a part of it won't be available in the first release. Keep an eye out on the D&H forum in anywhere from a week to two weeks when I post it up there.

Set custom sms/email sounds on Samsung Ativ S

(I'm posting this in the Questions Forum because i have not enough posts to either create a topic in the Development and Hacking Forum or reply to the registry hacks-thread.
But since it's also somehow a question I hope it's ok in here.)
______________________________________________________________________________________________________
Edit October 15th, 2013: With the GDR3-Update you get this feature built-in, so no more need to do this then!
Hi Folks,
while AlvinPhilemon found out a registry tweak to set custom sounds on the Samsung Ativ S (as explained in this post), it is not quite practical, since you can't see the sound in the list with the others, so you can't choose or switch them without always edit the registry.
I found another way to do this, and I think it's a bit more elegant (see attachment to have a look), although it only can change the sms, e-mail or mailbox sounds.
This is what you need:
1. Interop Unlock
2. Registry Editor (use SamWP8 Tools)
3. Full File System Access (use SamWP8 Tools)
4. Your Notification sound (I tried mp3-, wav- and wma-format, all worked)
This is how you do it:
1. On your PC, browse to your Phone\PROGRAMS\CommonFiles\Sounds\ and paste your new sound there.
2. To make it visible in your sounds selection list inside the Settings-app you have to create a registry entry: Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\OEM\Sounds\Notifications\ (This is the Samsung specific location for notifications; I tried the whole thing with the standard Microsoft sound location HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\Sounds\Notifications\ but it didn't work). In this registry location you can see a list of the the existing Samsung notification sounds ("Knock.wma", "On time.wma" and "Whistle.wma") and how their name is displayed in the Settings-app ("Knock", "On time" and "Whistle").
3. Create a new key and set the Value to the name of your soundfile (for example "Silvestro.mp3"), the Type to String and the Data to the name how you want it to be displayed. There might be an error notification after writing, but just read the key to check you wrote it correctly.
4. Done! Go to the Settings-app and choose the newly created sound as message, mailbox, or e-mail-sound!
What do you think of this solution? Of course it would be nice to pack this feature in an app that first lets you choose a soundfile from the Public or SD-Folder, then copies it, then creates a registry entry and then also is able to delete those things an put everything back to normal, but since I'm just starting with C# there's no way I can do this myself. Anybody interested in trying?
Thanks for your comments!
Very nice work, and good tutorial. It would, indeed, be good to get an app to automate this. You would need ID_CAP_SOUND_CONTROL (may require full capability unlock); this capability should enable both the requisite file system and registry access.
It's a shame that is not available by default like on every other smart and dumb phone in the world. This is one of WP many short comings that MS refuses to address.
Thanks
Nice tuturial, thanks.
I am a satisfied galaxy s4 owner. Before this phone i had the htc 8x. I liked wp8 a lot, but unfortunally some essential apps (for me) where still missing. Beside the very good os, i also like all the default sounds. Thats where my question comes in.
I'm looking for the complete set of Windows phone 8 notification sounds. Is it possible to copy them from a wp8 phone and post them here? I would like to have the windows sounds in my galaxy.
Great news!
With the GDR3-update comes the feature to set custom sounds for Messages/Mailbox/Reminder!
So this is no longer needed...
more easy way
I just renamed my ringtone the same as the existing tone in the map \PROGRAMS\CommonFiles\Sounds\.
Then I renamed the original sound (I have put "old" in front of the original tekst.)
Now I copied the rington in the map \PROGRAMS\CommonFiles\Sounds\.
Choose the ringtone on your phone, and it plays your ringtone.
I converted the mp3 ringtone to wma. I didn't try if it plays mp3.
The name of the original ringtones doesn't match the name in the phone, but you can play them first on your pc, to see witch one to replace.

Categories

Resources