[XAP][SOURCE] WP8 Registry Tools

Search This thread

snickler

Retired Forum Mod / Inactive Recognized Developer
Aug 17, 2010
1,320
1,133
Dub V
www.sinclairinat0r.com
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
 

Attachments

  • WP8RegistryToolsv1.1.xap
    201.5 KB · Views: 14,907
  • WP8RegistryToolsv1.1-Source.rar
    397.2 KB · Views: 6,010
Last edited:

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
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?
 
A

aclegg2011

Guest
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

atleast its a start. ;)
 

snickler

Retired Forum Mod / Inactive Recognized Developer
Aug 17, 2010
1,320
1,133
Dub V
www.sinclairinat0r.com
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?

ah yes, sorry about that. Let me load up my laptop

EDIT: Source added.
 
Last edited:
  • Like
Reactions: AR2186

vivekkalady

Inactive Recognized Developer
Aug 11, 2009
1,433
1,761
Trivandrum
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 ?
 
  • Like
Reactions: ishtpreet99

snickler

Retired Forum Mod / Inactive Recognized Developer
Aug 17, 2010
1,320
1,133
Dub V
www.sinclairinat0r.com
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 ?

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.
 
  • Like
Reactions: ishtpreet99

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
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.
 
Last edited:

snickler

Retired Forum Mod / Inactive Recognized Developer
Aug 17, 2010
1,320
1,133
Dub V
www.sinclairinat0r.com
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.

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.
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
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.
 

snickler

Retired Forum Mod / Inactive Recognized Developer
Aug 17, 2010
1,320
1,133
Dub V
www.sinclairinat0r.com
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.
 

cpuguy

Member
Jan 6, 2008
37
33
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...
 

snickler

Retired Forum Mod / Inactive Recognized Developer
Aug 17, 2010
1,320
1,133
Dub V
www.sinclairinat0r.com
@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.
 

snickler

Retired Forum Mod / Inactive Recognized Developer
Aug 17, 2010
1,320
1,133
Dub V
www.sinclairinat0r.com
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...

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
 

thals1992

Senior Member
Sep 26, 2012
680
238
Cincinnati, OH
www.uidnation.com
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..
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.
 
Last edited:

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
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).
 

snickler

Retired Forum Mod / Inactive Recognized Developer
Aug 17, 2010
1,320
1,133
Dub V
www.sinclairinat0r.com
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?
 

cpuguy

Member
Jan 6, 2008
37
33
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?

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.
 
  • Like
Reactions: snickler

snickler

Retired Forum Mod / Inactive Recognized Developer
Aug 17, 2010
1,320
1,133
Dub V
www.sinclairinat0r.com
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.

Ah ok, thanks!
 

thals1992

Senior Member
Sep 26, 2012
680
238
Cincinnati, OH
www.uidnation.com
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...
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.
 
Last edited:

cpuguy

Member
Jan 6, 2008
37
33
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).

  1. Add a reference in your project to "NokiaFrameworkOBAWinPRT.winmd" (you can find this in newer versions of the Extras+Info app)
  2. Add the necessary <InProcessServer> tag (to allow the "NokiaFrameworkOBAWinPRT.DevPropHelper" class) in the <ActivatableClasses> section of you WMAppManifest.xml file
  3. In the code... Create an instance of "NokiaFrameworkOBAWinPRT.DevPropHelper"
  4. 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.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 23
    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
    4
    Alright,

    I uploaded the newest xap and source. I rebranded it as WP8 Registry Tools now since I've realized these libraries are independent of Nokia-specific drivers. I also left some old references to things I decided to play around with. If you wish to see the methods of these libraries, just drag the .winmds from the source into a .NET Decompiler such as IL Spy or dotPeek.
    4
    Just gave first exam paper.

    Ok, read all posts. So I'm posting it here very soon when I've a time. I'm also excited. :)
    3
    You can sideload unsigned XAPs, though you'll have to pay for a developer account if you want more than two or three of them. Since you apparently didn't even bother to research that far (or to research the fact that we don't have the permissions to actually modify the registry; writing the app is trivial but it just gets "ERROR_ACCESS_DENIED" every time) I'm going to leave you with the following reminder:

    XDA is not a site where you come to say "plz make my phone kewl!" It's a developer site. It's for people who want to contribute their work, not for people who want to demand that other people help them.
    3
    What the ****kkkkkkkkkk

    I did it.
    This is my 3rd Attempt with success.

    Now i can side load 3rd party apps with any documented capability.



    Hahahahaha I'm the worlds first Windows Phone Lumia Hacker.


    I cant explain my words, what I've achieved.

    I'm feeling very crazy :D

    ---------- Post added at 12:53 PM ---------- Previous post was at 12:17 PM ----------

    Another point is now 8.1 package support Samsung"RPCComponent".

    Have you any tried it ??