TimeZoneInformation hacking ... - Windows Mobile Development and Hacking General

I know how to hack the TimeZones in Windows OS family (98 to XP). But I am having dificult to do the same in WM6.
This is what I found:
1) HKLM\Time has a TimeZoneInformation value (binary). It seems to be the active time zone rules (set by SDK functions).
2) HKLM\Software\Microsoft\Clock has some values I don't understand.
3) I am brazilian and I am using "GMT-3 Brasilia". I cannot find that text in the registry. Not ever "GMT". Is it hardcoded?
I want to change the "GMT?????????" rules. In Windows, everything is in the registry. In WM, I don't know.
Any hints are welcome.
Júlio

The timezones in WM have a bit of a different structure.
1) The HKLM\Time TimeZoneInformation is the active time zone. It is a structure described here (you need some understanding of C/C++ data types to fully understand this).
2) The HKLM\Software\Microsoft\Clock just holds the settings for the clock app and is irrelevant in this case.
3) The timezones are listed by code, not names. Here is the full table. Note however that usually they are not stored in registry but only in the wince.nls file (that contains defaults for all regional settings). Only when a change to the timezone information is made it is placed in registry with the code as the key name.

levenum said:
Only when a change to the timezone information is made it is placed in registry with the code as the key name.
Click to expand...
Click to collapse
Items 1 and 2 are Ok. I am familiar with TimeZoneInformation structure.
But focusing on item 3: wince.nls is binary and not writeable. What change should I do? Could you explain the quoted text?
Cheers.
Júlio

Related

Bluetooth Device Name

Is there a way to configure the device name.? By default it uses the owner's name and I would rather use something different.
I think its on Settings > About > Device ID. Be warned though as I changed mine and then Active Sync didnt recognise it and only linked as a guest.....had to change it back.
HPJ
PS I knew Batman would use an Exec, yet another cool gadget for him :wink:
HPJ
Thinks for your quick response. This forum is great.
P.S. I've gone by Batman for years now and yes I do love these gadgets.... :lol:
The Bluetooth device name is indeed initially taken from the value you put into "Owner Name", but once set it can be changed and is not dependent upon the two being identical. You can override the bluetooth value by a registry hack.
In the registry, you'll find an entry like the following:
[HKEY_CURRENT_USER\Software\Microsoft\Bluetooth\Settings]
"LocalName"="Fred Bloggs"
You can use a registry file merge to modify this. For example:
====== Reg file entry begins below =======
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Bluetooth\Settings]
"LocalName"="O2 Xda Exec"
====== Reg file ends above here =======
You will need to soft-reset and then re-search for Bluetooth devices on your PC/laptop for the change to be noticed.

[New release] Registry display plugin

Ok, most of you may find this totally useless as a plugin, but it was a combination of a request by user Treo_newb and a desire to create a sample plugin project that could be used as a base / example for plugin writers (I plan on doing an article on codeproject.com and this will be the source for it).
What does it do?
This plugin displays a string stored in registry.
The path is:
HKEY_CURRENT_USER\Software\RegDispPlugin
Value name: DisplayString
It checks if this string has changed several times per second when today screen is shown (as the system sends refresh message to all plugins) and displays the updated message if a change occurred.
What is it good for?
First, if you write apps using mortscript or similar like the user who requested this it will let your script display stuff on today screen.
Alternatively it could be used to mark your device today with a string that isn't as easily changed as user info.
The source is basically a skeleton plugin you can use to build your own plugin on (no license / copyright to limit you) and it already has several tricks needed for the plugin to display correctly:
VGA compatibility
Text size matching system settings
Proper header in settings dialog (like on system plugins)
Proper text color when selected (according to theme)
No blinking all today screen on change
Proper resize when switching between landscape and portrait
When I was writing my first plugin I could not find all these little fixes concentrated in a single article so I had to fish for each one as the bug reports came in.
Hope you will find this little project useful.
The plugin:View attachment RegDisplay.CAB
The source (eVC 4 project): View attachment RegDisplay.zip
Thanks for this!
Thank You Lev.
Thanks, Thanks, Thanks,
You are a legend.
I was almost through with my today plugin and was trying to figure out reading registry values and all of a sudden I get a PM from u about the plugin !!!
Very Cool !!!
OK a few questions,
1. I know that WM_TODAYCUSTOM_QUERYREFRESHCACHE is called for refreshing the today plugin, any ideas about when is it called.
I read somewhere that it was 2 seconds. Is it true?
2. I saw ur code and u have exposed CustomItemOptionsDlgProc in RegDisplay.def, but when I installed the cab file the 'options' is not enabled.
I manually changed the resistry and changed options to dword = 1 and saw ur name and email address.
u might want to enable that by default so that people can notice ur work.
I am planing a commercial release of a new project on basis of this.
Thanks again,
Shailesh
First, you're welcome.
shaileshashar:
1) I ran a debug print on this message once on an iPaq 1710 and it seems to be sent several times per second. This could differ from OS to OS or even from device to device, I am not sure.
If you need specifically timed refresh, or you have an event triggered on new data, I suggest using a timer or maybe a thread that will wait on an event. You can refresh your plugin from anywhere in code by calling InvalidateRect with your window handle.
2) I messed up the cab at first, forgetting to add the Options reg value. Then when I went to upload the fix, I couldn't access the site for about an hour (no idea why, I even rebooted the PC to Ubuntu). Should be fixed now, but I will check it later again (I have to go back to XP for that).
Good luck with your program.
Suggestion
levenum said:
First, you're welcome.
shaileshashar:
1) I ran a debug print on this message once on an iPaq 1710 and it seems to be sent several times per second. This could differ from OS to OS or even from device to device, I am not sure.
If you need specifically timed refresh, or you have an event triggered on new data, I suggest using a timer or maybe a thread that will wait on an event. You can refresh your plugin from anywhere in code by calling InvalidateRect with your window handle.
2) I messed up the cab at first, forgetting to add the Options reg value. Then when I went to upload the fix, I couldn't access the site for about an hour (no idea why, I even rebooted the PC to Ubuntu). Should be fixed now, but I will check it later again (I have to go back to XP for that).
Good luck with your program.
Click to expand...
Click to collapse
Thanks for the help, will check the fixed cab.
Also a suggestion:
A custom icon could also be incorporated. You can give a option to load a custom icon next to the text in the today plugin.
I know anybody can modify ur code and do it but still.
Actually, I probably should have mentioned this in the original post but I have no intention of adding options to this thing.
This would only complicate the code and turn it in to an actual app instead of a sample project.
But by all means feel free to make suggestions. If this thing does become popular, when I am done with my other projects (like LVMTopBat) which won't be any time soon (unfortunately) I will release a separate version of this plugin with all kinds of options that can be controlled both by user (form the options dialog) and by other apps through registry.
Maybe things like text alignment, size, bold / Italic / underlined.
P.S.
The reason I put the string this plugin loads under HKEY_CURRENT_USER instead of the HKLM where the rest of the plugin registry resides is because by default the HKEY_LOCAL_MACHINE on WM 5 and higher has a security restriction. For example you can not write to it using RAPI, only by authorized (or signed) app on the device. The HKEY_CURRENT_USER on the other hand is open for all.
levenum said:
P.S.
The reason I put the string this plugin loads under HKEY_CURRENT_USER instead of the HKLM where the rest of the plugin registry resides is because by default the HKEY_LOCAL_MACHINE on WM 5 and higher has a security restriction. For example you can not write to it using RAPI, only by authorized (or signed) app on the device. The HKEY_CURRENT_USER on the other hand is open for all.
Click to expand...
Click to collapse
Thanks for the info, I never knew that.
Thank you so much! This was exactly what I was looking for!
levenum said:
...But by all means feel free to make suggestions.
Click to expand...
Click to collapse
As a frequent mortscript user I think, this great app might be even more usefull, if the string was shown in an "allways on top" message box instead of the today screen. The Today screen might be obscured by other active windows during the scripts runtime and the plugin eats precious today screen estate also while being unused, doesn't it?
In that case (of a standalone application) I would furthermore introduce some kind of termination string (or reg. value) to end the display application.
Code:
- start mortscript
- writes first string to registry
- starts display application (run)
- updates string in registry whenever appropriate
- ...
- writes termination string to registry
-> display applications self-terminates
- ...
- end of mortscript
Honestly, I already do use something comparable with mortscript (employing a conditioned sleepmessage loop and reading from the registry too), but this could be much nicer and more elegant.
Just my 2 cents... What do you think?
I think something like that would be better implemented by the mortsrit program it self.
It could be a function like MessageBox API in windows which you could then command on and off. Having it built in would save precious resources on the device that would be wasted by having an extra app run constantly in background.
This is just my thought though.
I'd suggest contacting the developer of mortscript and discussing it with him.
levenum said:
I think something like that would be better implemented by the mortsrit program it self.
...
I'd suggest contacting the developer of mortscript and discussing it with him.
Click to expand...
Click to collapse
Mort knew about that request and by chance just announced to so.
Thanks anyway.
Hello levenum,
I just joined the community. Reason being, I found your RegDisplay plug-in
You call it a sample project, but the impact is that of an awesome solution.
Great for MortScript, but equally useful in BASIC applications that write
messages to the registry which is show upon screen minimization.
I regret not being a C programmer (mainly BASIC), else I'd love to further
develop this jewel.
Your plug-in runs flawlessly in an iPAQ 210 under WM6 Classic.
Cheers and Respectful Greetings
Robert
CLSID for registry display plugin
What is the CLSID for the Registry Display Plugin? I am going to have to edit the XML file that defines my home screen in order to get the plugin to show up. I am using Facade to control my home screen, and the only plugins that it will show in its list are those currently in use in one of the XML files in the Application Data\Home folder. All other new plugins require editing the XML. Thanks for your help.
levenum said:
Ok, most of you may find this totally useless as a plugin, but it was a combination of a request by user Treo_newb and a desire to create a sample plugin project that could be used as a base / example for plugin writers (I plan on doing an article on codeproject.com and this will be the source for it).
What does it do?
This plugin displays a string stored in registry.
The path is:
HKEY_CURRENT_USER\Software\RegDispPlugin
Value name: DisplayString
It checks if this string has changed several times per second when today screen is shown (as the system sends refresh message to all plugins) and displays the updated message if a change occurred.
What is it good for?
First, if you write apps using mortscript or similar like the user who requested this it will let your script display stuff on today screen.
Alternatively it could be used to mark your device today with a string that isn't as easily changed as user info.
The source is basically a skeleton plugin you can use to build your own plugin on (no license / copyright to limit you) and it already has several tricks needed for the plugin to display correctly:
VGA compatibility
Text size matching system settings
Proper header in settings dialog (like on system plugins)
Proper text color when selected (according to theme)
No blinking all today screen on change
Proper resize when switching between landscape and portrait
When I was writing my first plugin I could not find all these little fixes concentrated in a single article so I had to fish for each one as the bug reports came in.
Hope you will find this little project useful.
The plugin:View attachment 41592
The source (eVC 4 project): View attachment 41583
Click to expand...
Click to collapse
This is great! I was asked if I could write a today screen plug-in for my weather application (http://forum.xda-developers.com/showthread.php?t=445576) - I couldn't since I don't have the skills and I'm writing .NET code - but this is exactly what I needed.
I'm adding support for this plug-in and will of course give credits to you.

[App] [Apr-26-09] WM6.5 Plug-in Installer

AppStar Titanium
Plug-in Installer
This program allows chome/titanium plug-in developers to create a cab file that will insert the plug-in's markup into the cpr files depending on the device's resolution and update the registry without overriding any of the user's existing chome/titanium configuration files or settings.
Device Requirements:
1. WM 6.5
2. .Net CF 2.0 or higher
Usage:
First things first, this is a developer only tool that has strict requirements to work properly. It requires a few files to be deployed and files like the plg files are case sensitive. ATPluginInstaller.exe and CESetupDLL.dll can be used for any free, not for profit, chome/Titanium plug-in.
Ok, now onto the fun stuff...
ATPluginInstaller.exe is the program where most of the magic happens. It does a few important things. First, it adds a plug-in name to the registry in "HKEY_LOCAL_MACHINE\Software\Microsoft\CHomelugins" and also inserts the plug-in into the specified location in "HKEY_LOCAL_MACHINE\Software\Microsoft\CHome:ExtensibilityXML" and "DefaultXML". Then it clears all VALUES in "HKEY_LOCAL_MACHINE\Security\CHome\DefaultSettings" to prevent chome from reverting to an old layout. Finally it injects the appropriate markup for the device resolution into each of the Titanium CPR files.
For ATPluginInstaller.exe to know what plug-in and markup to use, it needs a PLG file. A PLG file is basically a pre-defined XML file that includes the name, position, and markup for the plug-in you want to install.
Begining of a sample PLG file:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<plugin>
<name>ATFavePeople</name>
<position>2</position>
<layouts>
<layout screenWidth="240" screenHeight="320">
<!-- ATFavePeople -->
<Layer ID="ATFavePeopleExpanded" Visible="False" Width="240" Height="82" Clip="False">
<Layer ID="Page" Clip="False">
<!-- Icon on upper right -->
<Image ID="Icon" Left="188" Top="-13" Width="43" Height="57" ScaleStyle="Stretch"/>
<!-- Large picture in Center -->
<Image ID="ContactPhoto" Left="10" Top="17" Width="43" Height="43" ScaleStyle="Fit" Clip="False">
<Layer ID="Border2" Color="#FFFFFFFF" Left="-2" Top="-2" Width="90" Height="90" Visible="True"/>
</Image>
(abbreviated to conserve space...)
The root node is "plugin". The three sub-nodes are "name", "position", and "layouts". All nodes must follow case to work with ATPluginInstaller.exe.
The "name" node contains the name of the plug-in you wish to install. It must match the name used in the plug-in markup.
The "position" node specifies where you want the plug-in to be displayed on chome. It is 0 based. Meaning the first spot is 0, the second spot is 1, and so on. If a number greater than the number of currently installed plug-ins is used, then the plug-in will be displayed at the bottom of chome.
The "layouts" node contains all the plug-in markup for the different device resolutions. Each resolution is defined by a "layout" sub-node with two attributes. The attributes are "screenWidth" and "screenHeight" which define what "layout" sub-node to use for each resolution. The "layout" sub-node contains the markup that will be injected into the CPR files. This markup is also case sensative and must follow the case that is used by Microsoft in the default CPR files or the sample attached PLG file.
To install a plug-in, simply call ATPluginInstaller.exe followed by the "-i" parameter and a space and then the PLG file name.
example: ATPluginInstaller.exe -i default.plg
ATPluginInstaller.exe is also uninstall friendly. Just replace "-i" with "-u".
example" ATPluginInstaller.exe -u default.plg
Well that's fine and dandy, but how the hell do I call ATPluginInstaller.exe from my CAB file? That's where a setup DLL comes into play. A setup DLL allows you to execute additional functions after a program is installed and before it is uninstalled. Working with setup DLLs are a pain in the butt because they don't support managed code, only C++. So I've attached CESetupDLL which is a setup dll that does two things:
1. It calls ATPluginInstaller.exe and installs, "-i", default.plg from the folder where the application is deployed to.
2. It calls CHomeRefresh.exe from the folder where the application is deployed to, to update Chome without performing a restart. (I didn't write CHomeRefresh and don't know who did but it works fairly well.)
CESetupDLL also works for CAB uninstall.
To include your CESetupDLL.dll in the INF file (file used to build installation CAB file) you have to add the following string to the [DefaultInstall] section:
CESetupDLL = "CESetupDLL.dll"
You can read more about setup.dlls here:
http://www.pocketpcdn.com/articles/setupdll.html
http://msdn.microsoft.com/en-us/library/aa924308.aspx
That's pretty much it! Remember to pay attention to case, and if you use my CESetupDLL.dll include ATPluginInstaller.exe, default.plg, and CHomeRefresh.exe to your program folder in your CAB.
Feel free to use ATPluginInstaller.exe and CESetupDLL.dll for any free, not for profit, chome/Titanium plug-in. Giving me some credit would be nice too. ;-)
Cool, thanks for this.
Let me make sure of the default.plg file, if I want to include cpr installs for different resolutions, I just add all of them to that one file, correct? Just change the layout screenwidth,screenheight for each new cpr I need to write, for both portrait and landscape. So for vga only, I would have two layout sections, one with screenwidth=480, screenheight=640 and then another layout with screenwidth=640, screenheight=480? If a cpr doesn't exist on device, then it just skips that one and goes to next?
Just wanted to make sure I understood it correctly as I plan on updating titaniumweather this week and wanted to use this.
showaco said:
Cool, thanks for this.
Let me make sure of the default.plg file, if I want to include cpr installs for different resolutions, I just add all of them to that one file, correct? Just change the layout screenwidth,screenheight for each new cpr I need to write, for both portrait and landscape. So for vga only, I would have two layout sections, one with screenwidth=480, screenheight=640 and then another layout with screenwidth=640, screenheight=480? If a cpr doesn't exist on device, then it just skips that one and goes to next?
Just wanted to make sure I understood it correctly as I plan on updating titaniumweather this week and wanted to use this.
Click to expand...
Click to collapse
Yeah, that's pretty much it. All the different resolutions in one file. In your case you would just need two layout nodes for VGA, one for portrait and one for landscape.
I'm working on getting next version of titaniumweather finished up and had a question/request. I noticed that your atplugin installer must be reading the defaultxml for plugin info before inserting and rewriting the default and extensibilityxml values. Is it possible to have it read the extensibilityxml for the info instead? A lot of people only update the extensibiliyxml when adding new panels since thats all that is necessary to show panels and with your current version all those panels are removed from extensibilityxml when atplugin installer runs. I can change it in chome editor to write to both locations, but still doesn't help out with someone that has made there own panels independently.
I've added option in weather to switch layouts using your atplugin app to change layouts for different style of weather icons, works very well to switch them out.
I just double checked and atplugininstaller reads from ExtensibilityXML first. It then injects the plugin name and updates ExtensibililtyXML and DefaultXML to the new value. I don't bother to read DefaultXML, I just override it since they both should be the same anyhow. I can change it to not override DefaultXML if users are having issues with it.
BTW, I'm glad to hear you got it working with additional layouts. I have the same feature in my latest Fave Contacts release. I was worried developers might have trouble because of case sensitivity. I use an XPath query and I'm not quite sure why the powers that be(W3C) decided XPath needs to be forced to case sensitive.
AppStar said:
I just double checked and atplugininstaller reads from ExtensibilityXML first. It then injects the plugin name and updates ExtensibililtyXML and DefaultXML to the new value. I don't bother to read DefaultXML, I just override it since they both should be the same anyhow. I can change it to not override DefaultXML if users are having issues with it.
BTW, I'm glad to hear you got it working with additional layouts. I have the same feature in my latest Fave Contacts release. I was worried developers might have trouble because of case sensitivity. I use an XPath query and I'm not quite sure why the powers that be(W3C) decided XPath needs to be forced to case sensitive.
Click to expand...
Click to collapse
huh, maybe just some weird issue I had going on then. After that first change up, everything after that didn't change my layout anymore. But I also updated chome editor to write to defaultxml too and reset my custom panels in after first change up, so maybe that fixed issue for me.
Yeah, got 4 or 5 different icon sets now, with different .plg files for each since most have different size icons and that was easiest way to have for future icon packs to be added without having to release new weather versions. Working on cab now, had trouble with install at first 'cause I was saving your ATPluginInstaller.exe to a subfolder under installation path, which is location I needed to work with my future addons. Got it sorted now(I think).
Is there a way to specify the CPR's to modify in the .plg file? I have made completely new CPR's for NeoTitanium. Instead of being Titanium_(Resolution).cpr, they are Neo_(Resolution).cpr, M2DNeo_(Resolution).cpr, & BWNeo_(Resolution).cpr. for the different themes. I did this so the user can swtich back and forth from NeoTitanium to Titanium (or the different themes) without uninstalling it.
Thank you soooo much. I am going to try this out.
drkfngthdragnlrd said:
Is there a way to specify the CPR's to modify in the .plg file? I have made completely new CPR's for NeoTitanium. Instead of being Titanium_(Resolution).cpr, they are Neo_(Resolution).cpr, M2DNeo_(Resolution).cpr, & BWNeo_(Resolution).cpr. for the different themes. I did this so the user can swtich back and forth from NeoTitanium to Titanium (or the different themes) without uninstalling it.
Click to expand...
Click to collapse
Hmmm... I was going to pull the CPR file name out of the registry, but decided against it because I didn't have any way of knowing that the PLG file was indeed targeted to that CPR anyhow. Adding a node to the PLG is a good idea. But we need to be very careful with distribution. If users got a hold of your PLGs and tried to use them with a Titanium layout they would not work.
Nice!
Very cool indeed.
Just the thing I'm looking for .
Was currently busy with pre-define cpr file to append at the titanium_(resolution_here).cpr, this surely helps a lot in making that happened.
Thanks!!!!!
I have a BIG question. In your ATFavePeople Cab you have a Setup.dll in the Main root of the cab but you don't talk about that. What is that Setup.dll for? I added the AtpluginInstaller, CESetupdll.dll, default.plg, and CHomeRefresh in the cab. Someone told the cab is unsuccessful when its installed and I can't quite figure out why.
JukEboXAuDiO said:
I have a BIG question. In your ATFavePeople Cab you have a Setup.dll in the Main root of the cab but you don't talk about that. What is that Setup.dll for? I added the AtpluginInstaller, CESetupdll.dll, default.plg, and CHomeRefresh in the cab. Someone told the cab is unsuccessful when its installed and I can't quite figure out why.
Click to expand...
Click to collapse
I replied to your private message but i'll repost here incase others need the info.
Hmmm.. There are a couple things you need to check. Make sure the have the CESetupdll.dll configured properly in your INF file.
To include your CESetupDLL.dll in the INF file (file used to build installation CAB file) you have to add the following string to the [DefaultInstall] section:
CESetupDLL = "CESetupDLL.dll"
Also make sure your cab file is extracting all the files to the same folder.
Just a heads up... I'll be leaving for a business trip tomorrow and won't be back till Monday. I'll get to any questions and/or fixes when I get back. Thanks guys!
SO what do I do about creating a setup.dll file when I don't have a program that can create .dll files.
Can someone tell me where the [Default Install] section is in CE Cab Manager.
AppStar said:
Hmmm... I was going to pull the CPR file name out of the registry, but decided against it because I didn't have any way of knowing that the PLG file was indeed targeted to that CPR anyhow. Adding a node to the PLG is a good idea. But we need to be very careful with distribution. If users got a hold of your PLGs and tried to use them with a Titanium layout they would not work.
Click to expand...
Click to collapse
This is why I was wondering if there was a way to call out a specific cpr file name. That way if the cpr doesn't exist on the "machine", the plg does nothing. Also, in the future on release you'll see a lot more custom named cprs. HTC I know uses their own naming. My smart phone has like 5 different sets of cprs on it.
Do you think there's a way to also include multiple plugins in the default.plg file?
I'm looking for a way to use the PluginInstaller to update existing .cpr default (Clock, Music, Photos, etc.) without messing up any additional/custom plugins people have put in.
Very nice. Thanks
Finally was able to install a plugin made by this installer...
Almost all my *.cpr files were read-only, so the plugin wasnt able to save them and kept giving me the "AtpluginInstaller.exe" error.
Changed them to non read-only with Resco Explorer and all worked fine.
Hi There.
don't know if I'm in the right topic if not I apologize.
I would like to know iif there is way to change the GUID of a "personnale" plugin. It seems that non standard plugin got the same guid, and on some case it makes trouble (I would like to put one of my personnal plugins by default when I press "hang" button).
Thanks

[Q] Enabling and locking Timestamps to photos?

Hi, I'm new to XDA Developers but have been using as a valuable resource over the past few months.
We have a HTC Touch Pro 2 device (WM6.5) that we provide support for to a number of personnel. The client have requested that we change the device settings so that photos have the timestamp applied and secondly that it not be possible to take it off again.
Since we have somewhere in the region of 600 devices to update, we'll need to do this via a registry change through our updates service. Try as I might though, I can not find the setting to do either of these. I have searched on here and google and can't find the answer. Has anyone done this before?
Thanks in advance.
I've been doing some digging on this and found a registry key under
HKEY_Local_Machine\SOFTWARE\HTC\Camera\Image
called 'enableStamp'. However, when I change this on Visual Studio 2005 remote registry tool, it doesn't seem to make any difference on the phone, the menu option stays the same. Likewise, the menu doesn't seem to change the registry which leads me to think it's another setting someplace or the settings are stored elsewhere.
Thanks in advance for any help.
I've finally made a breakthrough on this. I had to export the entire registry, change the value, export the registry again and compare the files. I found that this value
HKEY_CURRENT_USER\Software\HTC\Camera\6.16\Preferences
contains a large Hex value string and found that change a value that was 48 (timestamp off) to C8 (timestamp on) was reflected on the device. This string seems to have a lot of values so I'm assuming they are all to do with options selected in the camera menu. I just hope one of them is to disable the timestamp option now. I've posted this here in the hope it helps someone else.

[XAP][SOURCE] WP8 Registry Tools

Rebranded to WP8 Registry Tools from Lumia Registry Modifier
This is a basic registry viewer/editor demonstration using Registry dlls pulled from Nokia xaps within the latest FFUs.
First, a few things to note.
1) This only retrieves values from HKEY_LOCAL_MACHINE
2) It CAN read DWORD values now, but can't write. (Hell you probably won't be able to write ANYWHERE, but the code is there)
Instructions are quite simple.
To Read Values:
1) Put the Registry key in the first box (ex. SOFTWARE\Classes\MIME\Database\Codepage\1254
2) Put the Registry Value in the second box (ex. 1254)
3) Press Get Value.
To Set Values:
1) Put the Registry key in the first box (ex. SOFTWARE\Classes\MIME\Database\Codepage\1254
2) Put the Registry Value in the second box (ex. 1254)
3) Put the new registry value result in the Set Value box.
4) Press Set Value.
This is very very basic, but I wanted to just show off something using what Nokia has provided us.
We can't write dword values unfortunately so hopes of using this to change the MaxUnsignedApp value are lost. This MAY be possible with @GoodDayToDie 's WP8NativeAccess library, but with this it isn't.
In case everyone wondered what that key is... SOFTWARE\Microsoft\DeviceReg\Install
Side load away
Hmm... I get Access Denied in my library on most keys that I've tried to write. If you can write the codepage, that's interesting (generally speaking, HKLM has stronger protections). I'll double-check whether I can write there myself. If not, but you can, then we have an elevated privilege attack vector...
Also, we should see whether the app runs on non-Nokia devices. I suspect that it will, if it works the way I think it does, but in that case it also won't have much in the way of permissions.
Getting DWORDs to work is a good project, I'm sure it's possible (works fine in NativeAccess, incidentally).
EDIT: Any chance you could include the source?
snickler said:
This is a basic registry viewer/editor demonstration using Nokia's Native Registry dll pulled from one of their apps.
First, a few things to note.
1) This only retrieves values from HKEY_LOCAL_MACHINE
2) DWord values aren't supported.
Instructions are quite simple.
To Read Values:
1) Put the Registry key in the first box (ex. SOFTWARE\Classes\MIME\Database\Codepage\1254
2) Put the Registry Value in the second box (ex. 1254)
3) Press Get Value.
To Set Values:
1) Put the Registry key in the first box (ex. SOFTWARE\Classes\MIME\Database\Codepage\1254
2) Put the Registry Value in the second box (ex. 1254)
3) Put the new registry value result in the Set Value box.
4) Press Set Value.
This is very very basic, but I wanted to just show off something using what Nokia has provided us.
This doesn't seem to work with dword values unfortunately so hopes of using this to change the MaxUnsignedApp value are lost. This MAY be possible with @GoodDayToDie 's WP8NativeAccess library, but with this it isn't.
In case everyone wondered what that key is... SOFTWARE\Microsoft\DeviceReg\Install
Side load away
Click to expand...
Click to collapse
atleast its a start.
GoodDayToDie said:
Hmm... I get Access Denied in my library on most keys that I've tried to write. If you can write the codepage, that's interesting (generally speaking, HKLM has stronger protections). I'll double-check whether I can write there myself. If not, but you can, then we have an elevated privilege attack vector...
Also, we should see whether the app runs on non-Nokia devices. I suspect that it will, if it works the way I think it does, but in that case it also won't have much in the way of permissions.
Getting DWORDs to work is a good project, I'm sure it's possible (works fine in NativeAccess, incidentally).
EDIT: Any chance you could include the source?
Click to expand...
Click to collapse
ah yes, sorry about that. Let me load up my laptop
EDIT: Source added.
Hi I found the Registry item
(File path : <ffu>\Windows\Packages\RegistryFiles\SOFTWARE.REG)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\KindMap
where we can set extensions and their types.so is it possible to add a new extension so that it will also be supported and visible in sdcard ?
vivekkalady said:
Hi I found the Registry item
(File path : <ffu>\Windows\Packages\RegistryFiles\SOFTWARE.REG)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\KindMap
where we can set extensions and their types.so is it possible to add a new extension so that it will also be supported and visible in sdcard ?
Click to expand...
Click to collapse
It doesn't support creating new key values, only modifying existing ones. If the data is within one key value and it's able to be read, then it should be able to have things added to it.
EDIT: From what I've seen, what you're trying to do won't be possible with this. Each extension has a different key value.
We may need to start an "interesting registry values" thread here, similar to the one for WP7. Of course, it'll be more interesting if we can actually change any of them.
Oh, and the app works on my ATIV S, just by the way. Need to find some interesting paths to test it on, though.
EDIT: Have you been able to write to *any* values using this? It fails for me every time, but I haven't tried that many yet.
GoodDayToDie said:
We may need to start an "interesting registry values" thread here, similar to the one for WP7. Of course, it'll be more interesting if we can actually change any of them.
Oh, and the app works on my ATIV S, just by the way. Need to find some interesting paths to test it on, though.
EDIT: Have you been able to write to *any* values using this? It fails for me every time, but I haven't tried that many yet.
Click to expand...
Click to collapse
it has failed for me also. The only values I could write to were the ones that corresponded to Nokia. I'll look through the code again and make another update. I'm going to also rebrand it since it works for non Lumia phones.
Interesting about the Nokia paths working. That could be some characteristic of the DLL you use having better permissions or something specific to OEM stuff, but I actually suspect it's just that Nokia didn't bother to lock down the ACLs on their parts of the registry. You can easily adapt the app to my NativeRegistry class to test this, if you want.
Hmm that's a good idea. I just rebranded it to WP8 Registry Modifier. I'll add in your NativeRegistry class to work along with the RegistryRT class to see what comes about.
DWORD support
For DWORD support, take a look at the Nokia.SilentInstaller.Runtime.wim... The "CSilentInstallerRuntime" class contains multiple methods to interact with the registry including:
CreateKey
GetRegDWORDValue
GetRegSZValue
GetRegSZValueL
IsRegistryDWORDValueExists
IsRegistryKeyExists
IsRegistryREGSZValueExists
SetRegDWORDValue
SetRegSZValue
A bit off topic, I found a way to launch any URI... Literally, ANY URI (app:// http:// or anything). I can launch any application (using the GUID - so it must be a registered application but doesn't have to be one that you see in your programs list) and go to a specific page within that application. I can also pass any kind of query string that could unlock some hidden features in an application (such as the Extras+Info application - I can launch it using any dial string even though my ROM has that particular dial string disabled). I do so by launching a Toast message which allows me specify a launch uri and once it pops up, I click it. If anyone's interested, I can post a code sample for that...
@GoodDayToDie I'm able to read DWORDs with your NativeRegistry framework. I haven't been able to write though (I've only looked at the MaxUnsignedApp reg value).
What I think I'm going to do is possibly scrap the RegistryRT framework and just use yours. I can then make an even more robust app.
cpuguy said:
For DWORD support, take a look at the Nokia.SilentInstaller.Runtime.wim... The "CSilentInstallerRuntime" class contains multiple methods to interact with the registry including:
CreateKey
GetRegDWORDValue
GetRegSZValue
GetRegSZValueL
IsRegistryDWORDValueExists
IsRegistryKeyExists
IsRegistryREGSZValueExists
SetRegDWORDValue
SetRegSZValue
A bit off topic, I found a way to launch any URI... Literally, ANY URI (app:// http:// or anything). I can launch any application (using the GUID - so it must be a registered application but doesn't have to be one that you see in your programs list) and go to a specific page within that application. I can also pass any kind of query string that could unlock some hidden features in an application (such as the Extras+Info application - I can launch it using any dial string even though my ROM has that particular dial string disabled). I do so by launching a Toast message which allows me specify a launch uri and once it pops up, I click it. If anyone's interested, I can post a code sample for that...
Click to expand...
Click to collapse
I was actually looking at the SilentInstaller not long ago. I got sidetracked by the fact that I could use the NativeRegistry read DWORD values. I'll check that out and upload a new build in a few
GoodDayToDie said:
We may need to start an "interesting registry values" thread here, similar to the one for WP7. Of course, it'll be more interesting if we can actually change any of them..
Click to expand...
Click to collapse
I can write one up later. I have several registry keys that I'd like to bring attention to.
NOTE: I don't see anything editable yet, at least I can read it to compare it to the files in the ffu.
Launching a URI should be possible more directly than that, using ShellExecute, or similar, but that way is cool (and doesn't require importing unofficial native functionality).
Just a word of warning: NativeRegistry is under heavy modification. I hope to have the next Alpha release done soon, which brings a ton of changes, but in the meantime you might want to follow the changes on CodePlex; while I test every build that I push, I don't always publish the binaries.
There will be two ways to use the registry through NativeAccess soon: one is to use fairly thin wrappers around the native functions (that's mostly what's implemented now, but it will be expanded to include key and value enumeration, key creation, etc.), and the other is to use a class more akin to a .NET RegistryKey class, offering the ability to interact in a more object-oriented manner (where the object itself represents an open key).
Something I did notice when I tried to compile the NativeRegistry source (I just ended up using the binary you had for my testing) is that it kept blowing up on the include for WinReg.h. I don't have that anywhere. Am I missing something?
snickler said:
Something I did notice when I tried to compile the NativeRegistry source (I just ended up using the binary you had for my testing) is that it kept blowing up on the include for WinReg.h. I don't have that anywhere. Am I missing something?
Click to expand...
Click to collapse
I'm not sure how GoodDayToDie did it himself (probably same approach I take it) but I compiled it using the "WinReg.h" from the Windows 8 SDK and removing the desktop-only compiler "if" instruction (lines 49 and 1446). And like he mentioned, you also have to create the KERNALBASE.LIB with the required registry export functions for the linker.
cpuguy said:
I'm not sure how GoodDayToDie did it himself (probably same approach I take it) but I compiled it using the "WinReg.h" from the Windows 8 SDK and removing the desktop-only compiler "if" instruction (lines 49 and 1446). And like he mentioned, you also have to create the KERNALBASE.LIB with the required registry export functions for the linker.
Click to expand...
Click to collapse
Ah ok, thanks!
cpuguy said:
A bit off topic, I found a way to launch any URI... Literally, ANY URI (app:// http:// or anything). I can launch any application (using the GUID - so it must be a registered application but doesn't have to be one that you see in your programs list) and go to a specific page within that application. I can also pass any kind of query string that could unlock some hidden features in an application (such as the Extras+Info application - I can launch it using any dial string even though my ROM has that particular dial string disabled). I do so by launching a Toast message which allows me specify a launch uri and once it pops up, I click it. If anyone's interested, I can post a code sample for that...
Click to expand...
Click to collapse
Yes, please post your code and give yourself your own thread (at least keep it here in development ). There are a lot of underlying dialer codes that Nokia disabled when flashing the 928s. Also this could mean we could have a custom app launcher, if you wanted to customize it that way. Most of the work we have done on WP8 has occurred in the past few months; we are finally getting so close to the first InteropUnlock for Nokia/WP8.
Sent from my RM-860 (Lumia 928) using the OFFICIAL Tapatalk app.
I'm trying to figure out the correct method prototype (since this is a method that appears to be WinPhone only and isn't part of the SDK so, no details on it whatsoever)... I stumbled upon this toast functionality in "NokiaFrameworkOBAWinPRT.dll" under the "DevPropHelper" class. The method to call is "InvokeToast". This method ends up calling "Shell_PostMessageToast" in "ShellChromeAPI.dll" (this is what I'm trying to invoke directly without going through the Nokia dll).
Add a reference in your project to "NokiaFrameworkOBAWinPRT.winmd" (you can find this in newer versions of the Extras+Info app)
Add the necessary <InProcessServer> tag (to allow the "NokiaFrameworkOBAWinPRT.DevPropHelper" class) in the <ActivatableClasses> section of you WMAppManifest.xml file
In the code... Create an instance of "NokiaFrameworkOBAWinPRT.DevPropHelper"
In the code... Call the "InvokeToast" method (of the previously created object) passing it:
Application GUID (can be your local app's GUID - doesn't seem to matter)
URI to launch in string format
Toast title (can be anything)
Toast content(can be anything)
When the Toast notification pops up, click on it and that's it.

Categories

Resources