[Q] Registry Tweaker - Windows Phone 8 Q&A, Help & Troubleshooting

So I'm thinking of making an app that has a simple toggle button that toggles between screen orientation but uses the registry. I just want to have an app that has a toggle button that alters the registry when toggled. What are the APIs and necessary codes I need?

Depends if you're trying to modify something that can be written to under an existing Capability (in which case you need a registry API, either the native Win32 one or a C++/CX wrapper around the Win32 one such as my NativeRegistry library), or need to modify a location for which no standard capability gives you write access, in which case you need Samsung's RPCComponent library.

Related

Scroll Wheel implemented into new apps

A lot of wonderful apps are being developed, and becuase HTC decided to make the scroll wheel function weak, I'm requestion that the simple regedit be included in the cab for the app so that te scroll wheel applies. I would think if the app uses it, then just include it. People are putting out cabs (which is great), but they have to compile a list of apps that may or may not be used. So to keep it clean include the reg edit portion in the app/cab file.

Generic app for .net utilities/tweaks/services?

Hello,
I've been wanting to write some small hacks for my TouchPro in C# and noticed a problem with it - WM has a limit of processes so writing many small apps doesn't make sense and it's not possible to register a C# library as a service.
Has anyone created an application that reads some config file and loads all DLLs defined there? It's easy to do, but I don't want to reinvent to wheel if it's already done.
Does anyone know if such a tool exists?
Thank you.

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.

Idea: Getting Interop-Unlock for Lumia Devices

As a new user with less then 10 posts I'm forced to post this here. I know that this topic has to be at a different place.
Reading this post
http://forum.xda-developers.com/showthread.php?t=2435697​
which enables an Interop-Unlock for Samsung Phones I came to the source code of GoodDayToDie's "EnableAllSideloading_Release_ARM.xap"
http://forum.xda-developers.com/showpost.php?p=45606584​
In my undestanding, this changes some registry keys
Code:
...
NativeRegistry.WriteMultiString(RegistryHive.HKLM, @"SOFTWARE\Microsoft\SecurityManager\CapabilityClasses", cap, isvUnlock
...
I found this registry editor which can be easily deployed with dev unlock
http://forum.xda-developers.com/showthread.php?t=2395480​
So is it possible to do the steps GoodDayToDie's unlocking app does manually through the registry editor?
b9228 said:
As a new user with less then 10 posts I'm forced to post this here. I know that this topic has to be at a different place.
Reading this post
http://forum.xda-developers.com/showthread.php?t=2435697​
which enables an Interop-Unlock for Samsung Phones I came to the source code of GoodDayToDie's "EnableAllSideloading_Release_ARM.xap"
http://forum.xda-developers.com/showpost.php?p=45606584​
In my undestanding, this changes some registry keys
Code:
...
NativeRegistry.WriteMultiString(RegistryHive.HKLM, @"SOFTWARE\Microsoft\SecurityManager\CapabilityClasses", cap, isvUnlock
...
I found this registry editor which can be easily deployed with dev unlock
http://forum.xda-developers.com/showthread.php?t=2395480​
So is it possible to do the steps GoodDayToDie's unlocking app does manually through the registry editor?
Click to expand...
Click to collapse
The registry editor that has write access rights? Since I think such isn't available on Lumia devices. I might be wrong now.
Nope, the editor isn't able to write to the registry only read...Needs the Interop Cap which in turn won't let you sideload without Interop Unlock...
The idea is a fair one, but if you read the first post of snickler's registry tools thread more carefully, you'll see it says it cannot write to HKEY_LOCAL_MACHINE area, and the registry key in question is in HKLM. I'm not sure what else the Interop-Unlock xap does, but this issue is already a blocker.
Until someone finds a way to properly edit that area of the registry, sadly, we're stuck with no Interop-Unlock for Nokia Lumias.
b9228 said:
As a new user with less then 10 posts I'm forced to post this here. I know that this topic has to be at a different place.
Reading this post
http://forum.xda-developers.com/showthread.php?t=2435697​
which enables an Interop-Unlock for Samsung Phones I came to the source code of GoodDayToDie's "EnableAllSideloading_Release_ARM.xap"
http://forum.xda-developers.com/showpost.php?p=45606584​
In my undestanding, this changes some registry keys
Code:
...
NativeRegistry.WriteMultiString(RegistryHive.HKLM, @"SOFTWARE\Microsoft\SecurityManager\CapabilityClasses", cap, isvUnlock
...
I found this registry editor which can be easily deployed with dev unlock
http://forum.xda-developers.com/showthread.php?t=2395480​
So is it possible to do the steps GoodDayToDie's unlocking app does manually through the registry editor?
Click to expand...
Click to collapse
Your method is completely wrong in 2 ways.
One, the method you found is enabling other functions that you NEED interop-unlock to perform. Editing the registry is pretty much a chicken-or-egg problem. In order to edit the registry, we need Interop-unlock. In order to be Interop-unlocked, we need registry access.
Two, The registry editor only has read-access. In order to have write access it needs Interop CAP in WMAppManifest.xml which once placed, the app will refuse to deploy. A backdoor we found is that apps can be installed with Interop access if installed from the Store. First & Second-Party developers (namely Microsoft and OEMs) are the only devs able to upload InteropCAP apps to the store.
The Samsung Diagnostics tool is one exception, its an app made by Samsung but not from the Store but has registry read and write access. We used a hidden registry editor page in the app to Interop-Unlock the ATIV S. This method doesn't work on Nokia's because the method Samsung uses to edit the registry isn't available on Nokia.
One app that I've been looking into is the Preview for Developers app, if enabled, it writes an "1" (which is sort of binary for "yes") to the registry. If disabled, it writes a "0" to the registry (which is sort of binary for "no"). Looking into ways that I can reverse engineer it.
Interop = Access to the system registry and files.
Interop Unlock = Apps are now freely able to edit registry and certain system files but only if declared with Interop CAP (applies to side-loaded apps)
Interop CAP = In the WMAppManifest.xml, the app basically declares what functions it needs to use. If the CAP (declared function) is not declared in the Manifest, that function is unusable.
Gooddaytodie recently said he'd try new methods to interope unlock lumias
I have my fingers crossed

[Q&A] [WP8.1] Hypothesis about a possible interop unlock with Messaging+ app

Q&A for [WP8.1] Hypothesis about a possible interop unlock with Messaging+ app
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [WP8.1] Hypothesis about a possible interop unlock with Messaging+ app. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
CAPs required for editing registry
snickler said:
You won't achieve any sort of interop-unlock with such an app. The Messaging+ app uses capabilities specific to chat that are restricted. Just because an app uses the interopservices capability, does not mean that it has rights to write to the specific portion of the registry needed to provide interop-unlock. There are a few threads out there that discuss this already
Click to expand...
Click to collapse
I am curious what CAP is required for editing the registry?
gingerjoke said:
I am curious what CAP is required for editing the registry?
Click to expand...
Click to collapse
You at least need ID_CAP_INTEROPSERVICES or ID_CAP_OEM_DEPLOYMENT at the minimum. There are many threads that detail that interop unlock canNOT be achieved unless we have an RPC Service that runs under the SYSTEM account. The MaxUnsignedApp reg value is locked down so that it can only be edited in the way that I just spoke of.
No app on the marketplace, no modifying a store app will achieve this. We were just VERY lucky with Samsung in the beginning.. That's all.
More generally true: there are lots of CAPs (such as OEM_DEPLOYMENT) that permit editing specific parts of the registry. There is *NO* capability that allows you to edit all of it (in theory ID_CAP_BUILTIN_TCB should, through minor additional work, but in practice that cap doesn't seem to do anything for an app).
ID_CAP_INTEROPSERVICES does not give registry access, or at least not any meaningful amount. All that it gives is the ability to call into RPC servers and drivers. *IF* one of those services exposes an externally-callable API for editing the registry - as one of Samsung's (FCROUTER?) does, or at least did - then you can use that to edit the registry. So in that specific case, INTEROPSERVICES indirectly makes it possible to edit the registry, but it doesn't inherently do anything of the sort.
GoodDayToDie said:
More generally true: there are lots of CAPs (such as OEM_DEPLOYMENT) that permit editing specific parts of the registry. There is *NO* capability that allows you to edit all of it (in theory ID_CAP_BUILTIN_TCB should, through minor additional work, but in practice that cap doesn't seem to do anything for an app).
ID_CAP_INTEROPSERVICES does not give registry access, or at least not any meaningful amount. All that it gives is the ability to call into RPC servers and drivers. *IF* one of those services exposes an externally-callable API for editing the registry - as one of Samsung's (FCROUTER?) does, or at least did - then you can use that to edit the registry. So in that specific case, INTEROPSERVICES indirectly makes it possible to edit the registry, but it doesn't inherently do anything of the sort.
Click to expand...
Click to collapse
Finally found RPC service in NdtkSvc.dll
But requires InteropServices Capability
Here is list of functions works as "SYSTEM".
CopyFileEx()
NdrServerCall2()
CreateThreadpoolWait()
SetThreadpoolWait()
CloseThreadpoolWait()
SetEvent()
SetServiceStatus()
CreateEventW()
RegisterServiceCtrlHandlerW()
CloseHandle()
OpenProcessToken()
FindFirstFileW()
CopyFileExW()
GetCurrentProcess()
CreateDirectoryW()
RegCreateKeyExW()
RegQueryValueExW()
IsCharAlphaNumericW()
LookupPrivilegeValueW()
FindClose()
RemoveDirectoryW()
RegOpenKeyExW()
FindNextFileW()
AdjustTokenPrivileges()
InitiateSystemShutdownExW()
DeleteFileW()
RegCloseKey()
RegSetValueExW()
RpcServerUnregisterIfEx()
RpcServerInqBindings()
RpcEpRegisterW()
RpcServerUseProtseqW()
RpcBindingVectorFree()
RpcServerRegisterIf3()
RpcEpUnregister()
ResetPhoneEx()
EncodePointer()
DecodePointer()
QueryPerformanceCounter()
GetCurrentThreadId()
GetSystemTimeAsFileTime()
GetTickCount64()
But I'm confused about how to write a code for as RPC Client or using any DllImport functionality. ?
Can someone provide me at least demo/example code of RPC client ?
... Whoa, that is a seriously valuable list of APIs. Those are callable as SYSTEM, without any restrictions except the caller needing ID_CAP_INTEROPSERVICES? Either I've been out of the loop longer than I thought or this should have been discovered long ago (is it new to some not-yet-widely-available version?) You cannot *trivially* get root this way - it doesn't, for example, include the APIs you would need to inject arbitrary code into a SYSTEM process or similar - but you can certainly do things like write an arbitrarily powerful file-and-registry browser. With that, you can do a hell of a lot of other stuff, stuff that even Samsung's RPCComponent didn't permit.
MS RPC is documented on MSDN here: https://msdn.microsoft.com/en-us/library/windows/desktop/aa378651(v=vs.85).aspx
It includes a full API reference, lots of guidance on development, and a tutorial. The tutorial looks pretty well-written, and is probably a better place to start than the API reference unless you know more about RPC at the moment than I do.
However, this documentation is aimed at "normal" implementations, where the client has, if not the server's source code, at least the interface definition. You have to know the UUID (probably easily findable though I'm not sure where) and the function interfaces (in a reasonable level of detail). Black-boxing that is going to be one of the harder tricks, I think, though somebody may have written one or more tools to make it easier.
EDIT: I can't find NdtkSvc, or its binary, on my phone. It's either OEM-specific or (more likely) requires a particular OS update/upgrade. What version did you find it in?
EDIT2: How'd you get the list of APIs it serves? Do you have the IDL file for the RPC server? That would help a ton; if you have that, we're good to go.
EDIT3: Don't forget you can PM people if you don't want to put this stuff out in public.
@GoodDayToDie
Hi, Sorry for the late reply.
It is only specific for Lumia.
NdtkSvc.dll known as "Nokia Device Toolkit Service".
"C:\Windows\System32\NdtkSvc.dll"
Yes, ID_CAP_INTEROPSERVICES cap is everything here too on Lumia.
Here is a one of the example which same "Nokia.SilentInstaller.Runtime" does that on RPC Access,
Code:
static bool NRSCopyFile(String sourcePath, String destPath);
works without any "RESTRICTIONS", with any "PARTITION".
Even possibilities to "REPLACE" the hidden/non-accessible Registry "HIVE" Files.
Such as,
"C:\Windows\System32\Config\ProvisonStore"
But unfortunately they are all in simply zip file having a signed.
We can't modify and place back them such HIVE/POLICY files, sad
So what i did it so far,
-Modified "DeviceReg.exe" with hex-editor and replaced to "C:\PROGRAMS\DEVICEREG\DeviceReg.exe". (signature getting a braked)
-Replaced "PolicyFiles". (signature getting a braked)
It's frustrating to me, It's shame for me that i cant do anything having a full FS Access, lol.
Such files and System binaries are fully signed with the new 8.1 "Policy Engine".
but i think .dll files doesn't required to be signed to run in System chamber.
Well, Time to write a some RPC library
Thanks.
Edit: I don't know about which update is required, I think it is from WP8.0 GDR1. At least WP8.1 GDR1 or above.
but the "NdtkClient.dll" is available since WP8.0 GDR1 in "Extras+Info" App.

Categories

Resources