Changing Registries - Windows Phone 7 Development and Hacking

I want to do the following:
xboxmod said:
Google
Code:
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes]
"DefaultScope"="Google"
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\Google]
"URL"="http://www.google.com/m?hl=en&gl=us&client=ms-hms-tmobile-us&q={searchTerms}"
Click to expand...
Click to collapse
I installed Registry Editor from TouchXperience on my Samsung Omnia 7. I went to:
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes]
And changed DefaultScope's value to "Google" (without the quote obviously). For:
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\Google]
I need to create a new key and name it Google in SearchScopes, right?
I tried to do that, but Registry Viewer could not create the new key. I tried multiple times, but it wouldn't work. I get the following error:
Unable to create registry key "Google".
I also accidentally created a new value called "a" but when I try deleting it, I get a similar error. I get the following error:
Unable to delete registry value "a".

TouchXperience registry editor uses the COMRilClient.dll from Samsung to get access to the registry on Samsung devices. This dll only allows read/write of dword and string values. It does not allow to create/delete keys and it does not allow to delete values. It is also restricted to keys that have permissions for Elevated Privileges. It has no access to key that need TCB permissions.
At the moment I am working on "WP7 Root Tools" which allows you to read and write to the entire registry. At the moment I am using a little part of the Samsung drivers, so for now it is only suitable for Samsung devices. I will try to make it work for all devices in time. With a work-around I have access to the phone with TCB privileges.
I have been working on it for quite a time now and I am close to releasing an alpha version. It has been delayed, because last month my grandpa died and now my mother is on Intensive Care because she had an aneurism and needed brain surgery. She is recovering in very little steps and I pray she will be fully recovered after rehabilitation.
So I am not fully committed to hacking at this moment, but I promise it won't be very long before I can release a working alpha version.

Thanks for the info, though does that mean I can't even remove the "a" value that I accidentally added?
I'm sorry to hear about your family situation. I hope your mother fully recovers sooner than later.

Chaoticaa said:
Thanks for the info, though does that mean I can't even remove the "a" value that I accidentally added?
Click to expand...
Click to collapse
Yes, that's right. But it probably won't do any harm. So don't bother.
Chaoticaa said:
I'm sorry to hear about your family situation. I hope your mother fully recovers sooner than later.
Click to expand...
Click to collapse
Thanks.

Heathcliff74 said:
But it probably won't do any harm. So don't bother.
Click to expand...
Click to collapse
Yeah, it doesn't even make sense for it to have any affect unless something is looking for that value name in my registry. I'm just a neat-freak that hates that extra accidental value a lot more than the fact that I can't do what I was trying to accomplish.

Chaoticaa said:
Yeah, it doesn't even make sense for it to have any affect unless something is looking for that value name in my registry. I'm just a neat-freak that hates that extra accidental value a lot more than the fact that I can't do what I was trying to accomplish.
Click to expand...
Click to collapse
You could always hard-reset your phone

Hahaha not that bothered by it.

Related

[XAP - Source] Samsung Registry Editor

A lot of you guys have been asking about how to read/write/add values to the registry on Samsung devices, so I wrote a small app showing how to use the Samsung native DLLs to do so.
Please notice that you can use this app called RegistryViewer that works on all WP7 devices [read only for now, but useful to discover the registry] here http://forum.xda-developers.com/showpost.php?p=9716755&postcount=19
This app is limited too compared to the HTC ones, unfortunately a big part of the registry is restricted for read/write.
Nice! I have a samsung
There is no way to list the reg keys right?
tried to read some values, but all i get is gibberish...
how can i build the solution i get a missing reference error for "using Microsoft.Phone.InteropServices;"
eried said:
Nice! I have a samsung
There is no way to list the reg keys right?
Click to expand...
Click to collapse
Yes you can, here is a registry viewer to list the reg keys http://forum.xda-developers.com/showpost.php?p=9716755&postcount=19
tried to read some values, but all i get is gibberish...
how can i build the solution i get a missing reference error for "using Microsoft.Phone.InteropServices;"
Click to expand...
Click to collapse
This is natural when you try to access restricted areas in the registry or you try to read a DWORD while it is a String and vice versa!
For the InteropServices look at the requirements in my blog post here http://www.martani.net/2010/12/reading-imei-on-windows-phone-7-devices.html
Here is a new version of my app that support Samsung device.
XAP: http://bit.ly/eEZ0Uf
Perhaps we can combine this with the registry tweaks to create an on device app limit remover. I am sifting through your code and am gonna combine it if I can figure it out correctly.
This should work.
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg\Install]
"MaxUnsignedApp"=dword:7fffffff ; Allow max number of unsignd apps
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg]
"PortalUrlProd"=""
"PortalUrlInt"=""
Click to expand...
Click to collapse
I have finally gotten this working correctly. I will post my results however I will not post the product because I know it will inevidetly support piracy.
I have gotten it compiled, however it is not reading or writing to the registry properly.
FireSokar said:
I have gotten it compiled, however it is not reading or writing to the registry properly.
Click to expand...
Click to collapse
please take a look at the posts above http://forum.xda-developers.com/showpost.php?p=10565219&postcount=4
so what would the format i enter be to get the values i posted above?
FireSokar said:
so what would the format i enter be to get the values i posted above?
Click to expand...
Click to collapse
What values in the registry you are trying to access/modify ?
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg\In stall]
"MaxUnsignedApp"=dword:7fffffff ; Allow max number of unsignd apps
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg]
"PortalUrlProd"=""
"PortalUrlInt"=""
I want to set the values to that. This way my phone can install unlimited apps and will not check if it should be allowed to.. I am a developer however have an 3 app limit and chevron still gets reverted after x amount of days. According to what i've read this should prevent the revert.
FireSokar said:
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg\In stall]
"MaxUnsignedApp"=dword:7fffffff ; Allow max number of unsignd apps
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg]
"PortalUrlProd"=""
"PortalUrlInt"=""
I want to set the values to that. This way my phone can install unlimited apps and will not check if it should be allowed to.. I am a developer however have an 3 app limit and chevron still gets reverted after x amount of days. According to what i've read this should prevent the revert.
Click to expand...
Click to collapse
Ok, the COMRilClient.dll doesn't seem to change these values, but I just tried the functions in FCRouterProxy.dll and it worked perfectly.
Take a look at this thread, it shows how to use the FCRouterProxy.dll (which is the same method anyways) http://forum.xda-developers.com/showthread.php?t=914055
I'm not exactly smart on coding... you wouldn't wanna get this started off would you? After all this is something that most samsung owners would want.
FireSokar said:
I'm not exactly smart on coding... you wouldn't wanna get this started off would you? After all this is something that most samsung owners would want.
Click to expand...
Click to collapse
Lol I can't get it figured out either...i should have paid better attention when I was in school lol....glad someone asked though
FireSokar said:
I'm not exactly smart on coding... you wouldn't wanna get this started off would you? After all this is something that most samsung owners would want.
Click to expand...
Click to collapse
In the same thread actually, there is an app that uses that DLL to edit registry http://forum.xda-developers.com/showpost.php?p=10623201&postcount=19
I'll have a look at it in the morning. Don't feel like getting off the laptop. I'll post if I get anywhere. Thanks for the link.
OMG Getting update on Rogers Samsung Focus
Changed the carrier ID to 000-88 (before I had it debranded blank). Took a few tries but it worked. That VPN to Hungary is hella slow but the update downloaded and I'm now in the backup phase. Will post again with final results.
has anyone had issues getting the samsung registry to run on 7008
cgrizz said:
has anyone had issues getting the samsung registry to run on 7008
Click to expand...
Click to collapse
Wondering this myself. On my ATT Focus, once I got NoDo installed I started getting the following message when trying to run SamsungRegistry, "SamsungRegistry has been revoked by Microsoft. Please uninstall it."
Not a big deal, just wanted to switch my MobileOperator key back.

[XAP + Source] Advanced Explorer [Version 1.4]

Hello XDA Community,
@DEVELOPERS: I need some developers with other devices to make things (at least parts of advanced explorer) work on other devices (i have a htd hd7). !Programming & Testing!
Please PM me
To bring all together what xda achieved for WP7, i wrote a helper app for the following tasks,
- File management
- Registry management
- Copy files from desktop to phone
- Copy files from phone to desktop
- Set max unsigned apps
- Provision any given XML
If you post in this thread how any of those features could be implemented on other devices, i will maybe implement them. You can always send me a modified version and i will maybe update this post with the new version!
Usage/(Release-)Notes on the website!
If you encounter any errors, or wanna give some feedback => just leave a post here or use the idea page or write me an email (go to contact on the homepage)!
I included the source code, so that anybody can modify it at will but do not use anything here for commercial purposes (contact me first).
Homepage for this project:
http://sites.google.com/site/yaafdevelopers/projects/advanced-explorer-for-wp7
You can give feedback / bugreports:
http://advancedexplorerwp7.codeplex.com/
(Go to Discussion or Issue Tracker)
You will find the latest version and the Release-Notes there. I will continue to watch this thread!
Because some people asked how to support/donate me:
I appreciate every donation! Thank you!
reddragon
He that is great stff... i am glad you added the source i was thinking about how this could work having had a little peek at the code in the samples that Ms provided.
wings over a thanks too
Question...If you send a file, where does the device dump it into the computer? I was getting an error sending the file to my computer at first, but then I configured correctly and it sends fine, but I don't know where it is...
Edit: Nevermind, I got it. Upload/Download Root folders. Good work on this app man. Pretty nifty. Uploaded a .doc from my laptop to the phone, copy/pasted it into My Docs and it appeared and opened on MS Office Word perfectly.
nice ! but ...
Nice app !
But can't send from \windows directory ?..
Re: can't send from \windows
Hey,
like i said in my first post i brought together what was achieved...
Im using the HTC app COM dll files for file system access. Actually you can send files from \windows but not all. (in usage or no access)...
If somebody knows a better way, or something for other devices => just implement and send it, or post here!
The problem: Now it works on my device, so I can do what i wanted to do (coping .pdf and other stuff on the wp7) I have not the time to search & wait for other devices.
I tried to code it very generic and emulated the System.IO namespace, so everybody can add his results or replace it with better results.
Just contact me and I will check the code and update the first post.
reddragon93
eternalemb said:
Question...If you send a file, where does the device dump it into the computer? I was getting an error sending the file to my computer at first, but then I configured correctly and it sends fine, but I don't know where it is...
Edit: Nevermind, I got it. Upload/Download Root folders. Good work on this app man. Pretty nifty. Uploaded a .doc from my laptop to the phone, copy/pasted it into My Docs and it appeared and opened on MS Office Word perfectly.
Click to expand...
Click to collapse
actually you can double tab any file and it should open from any folder.
To get PDF working I copy the file to the PDF reader (most likely the app will crash if Adobe reader is not installed), but you will not see anything as PDF reader just pops up with the file
Just like always contact me if there are file types missing!
cool app, ty
how long did it take?
hi reddragon93, thank you for your work, i've an lg optimus 7, is there an eta for explorer for other device?
i need it!!!
thank you so much!
gianlucarugby said:
hi reddragon93, thank you for your work, i've an lg optimus 7, is there an eta for explorer for other device?
i need it!!!
thank you so much!
Click to expand...
Click to collapse
I really can understand you because I needed this for myself (that's why I coded it in the first place)
But the answer is NO, because we have to wait until somebody finds a way to get access on other devices and shares the info (i will observe this thread for new infos).
And by the way you should not ask for ETA in developer forum (forum rules), but it's OK for me. Hope you will be the only one after my answer
I answered this question in my first post:
"If you post in this thread how any of those features could be implemented on other devices, i will maybe implement them"
Hope I answered your question.
reddragon
thanks, you were very kind,
apologize me for the ETA, i did not know, i'm just a student not a developer!
good work!
EDIT: I can't figure out how to mark a post as useful yet, so let me just say THANK YOU!!!
Awesome app. However, there are a few things that would be nice in terms of file types:
Any chance of getting support for loading .mobi files (Kindle ebooks)? I'd love to be able to sideload books that aren't in the Amazon store.
Currently, .log files won't open. Copy/renaming them to .txt should work, or a simple text reader/editor could be built-in.
Possible bug: the "Max unsigned apps" field in Settings is showing "Not set - (can't read from registry)" Setting it from within the app seems to work, though (and be remembered).
Feature request: ability to search the registry
Small change request: pressing Back on an Exception could do the same as OK (rather than exiting).
Overally, much thanks for an awesome tool!
Thanks for feedback
GoodDayToDie said:
EDIT: I can't figure out how to mark a post as useful yet, so let me just say THANK YOU!!!
Awesome app. However, there are a few things that would be nice in terms of file types:
Any chance of getting support for loading .mobi files (Kindle ebooks)? I'd love to be able to sideload books that aren't in the Amazon store.
Currently, .log files won't open. Copy/renaming them to .txt should work, or a simple text reader/editor could be built-in.
Possible bug: the "Max unsigned apps" field in Settings is showing "Not set - (can't read from registry)" Setting it from within the app seems to work, though (and be remembered).
Feature request: ability to search the registry
Small change request: pressing Back on an Exception could do the same as OK (rather than exiting).
Overally, much thanks for an awesome tool!
Click to expand...
Click to collapse
Thanks for your feedback!
(1) I really needed the app for myself (real pdf support) so... The Thanks Button is only visible with 5+ Posts
(2) i will pm you maybe if i find some spare time. This is most likely pretty simple to implement. Can you edit your (or create a new) post and describe what happens if you double tab a kindle book with the current version?
(3) yeah i saw this before but didn't thought it is important enough to implement. I don't have the time for the own Editor (you have to handle really big files for example) but i can do the renaming thing behind the scenes (remember renaming = copy+delete until a better solution is found).
(4) on first app start i have really no solution in determining how the value is set (no access on this key). So my solution was to set this text ("Not set - (can't read from registry)" until you set a value => then i save this value local to the app, and set it every time the app starts (It gets reset every time i connect the device to the PC anyway)
(5) "search the registry": I thought on this one... But this will not be of much use as we have not really much read access
NOTE: The Problem with the registry is that we have FULL WRITE access trough the provxml method but not very much READ access (HTC COM .dll)
(6) really? I'm satisfied with the current behavior. Without searching I don't know if this is a small change maybe it is, maybe not. At least it looks like one but that doesn't mean anything
reddragon
Thanks for the response, reddragon. I'm at work right now, so the .mobi thing will have to wait. It's a very common request among WP7 users around here, though.
I've found that selecting the Edit context item will open any file in Word, which is typically sufficient for viewing and even editing purposes! True plain text files open fine regardless of extension, and even binary files will usually have enough ASCII in them to determine useful info. You can also send any file (via email) from Word, if you want to email an attachment rather than just transfer to a PC.
Unfortunately, I've found that XML files just... don't work. Double-clicking them opens IE, which complains that it can't handle that file type. Selecting Edit on them looks like it's opening some Office app, but the app then closes and drops back into Advanced Explorer (no error). This is the currently problematic filetype, as a *lot* of data is stored in XML.
The "Registry Editor" app already provides registry search (and despite the security restrictions on read it *mostly* works) but without system copy-paste it's tricky moving data between apps. I enjoy being able to pan between the FS and registry... hell, I want a Windows (desktop) app that does this, now.
It looks like there's FS search (an option on the command bar, and a text box that appears) but I can't get it to do anything. Pressing Enter has no effect, tapping either Refresh or Search again just reloads the page. Am I using this right? It would be great to be able to either scroll long folders (\Windows) or find a filename behind a bunch of GUIDs.
Some files show as "0 b" size, even though they almost certainly aren't. Is that just because some program has an exclusive lock on them and their size can't be read in that state?
Any chance of the ability to create folders in the GUI (I think I see how to do it with provxml files, but that's not exactly convenient)?
Thanks for the explanations on the registry. I was wondering how you could write to locations that you can't read from... Also, I didn't know the sideload limit resets itself. That's something I'll have to watch out for, as I'm near the nominal sideload limit already. Hmm... maybe I should look into writing an app that lets the phone install a .XAP directly, to minimize the amount of PC connecting that's needed.
Sorry, I know that's a lot of comments and questions. If it helps, I showed this to a couple of other HD7 owners today, and the immediate response of both of them was "I've got to get that!" This is a great app, super-convenient and good for making the occasional Samsung Focus owner jealous ;-D
Actually, I'm a developer myself (mostly C/C++, but I know C#). I'll crack a look at the source when I get a chance (probably this weekend) but would you be interested in a patch if there's something I can improve? One thing I might add is an optional "Did you mean that?" prompt on the Back button, as it's a little too easy to hit and knock you clear out of the app (optional of course, as I understand some people don't have such problems).
Thanks again!
does anyone know the latest ETA on compatibility for samsung devices?
Some Answers
GoodDayToDie said:
Thanks for the response, reddragon. I'm at work right now, so the .mobi thing will have to wait. It's a very common request among WP7 users around here, though.
Click to expand...
Click to collapse
Like I said: I will pm you most likely, today or this weekend.
GoodDayToDie said:
I've found that selecting the Edit context item will open any file in Word, which is typically sufficient for viewing and even editing purposes! True plain text files open fine regardless of extension, and even binary files will usually have enough ASCII in them to determine useful info. You can also send any file (via email) from Word, if you want to email an attachment rather than just transfer to a PC.
Unfortunately, I've found that XML files just... don't work. Double-clicking them opens IE, which complains that it can't handle that file type. Selecting Edit on them looks like it's opening some Office app, but the app then closes and drops back into Advanced Explorer (no error). This is the currently problematic filetype, as a *lot* of data is stored in XML.
Click to expand...
Click to collapse
Yeah the best way to handle the edit mode would be an editor inside the app, but that's quite some work i guess... So if somebody is willing to write such a control just contact me!
But the current workaround is quite simple: Upload your file, edit it with the powerful editors you know and send it back to the phone...
In fact what i did was send the complete windows/applications folder and all files that where successfully send can be edited (on the others you have no access anyway).
GoodDayToDie said:
The "Registry Editor" app already provides registry search (and despite the security restrictions on read it *mostly* works) but without system copy-paste it's tricky moving data between apps. I enjoy being able to pan between the FS and registry... hell, I want a Windows (desktop) app that does this, now.
Click to expand...
Click to collapse
Well I think it's not that difficult to implement a search for registry. It's funny to say that all the time but I thought on this one too and if you look on the source code you will see that i positioned the search/filter text box out of the explorer pivot to use it for registry search or other purposes. If you find it really that useful with the current read restrictions... yeah I should just implement it...
GoodDayToDie said:
It looks like there's FS search (an option on the command bar, and a text box that appears) but I can't get it to do anything. Pressing Enter has no effect, tapping either Refresh or Search again just reloads the page. Am I using this right? It would be great to be able to either scroll long folders (\Windows) or find a filename behind a bunch of GUIDs.
Click to expand...
Click to collapse
In fact this is a filter function so that large folders can be loaded much faster. Just enter "a*" and make the keyboard disappear (tab anywhere else) and you see only the files/folders starting with "a". I don't know why "enter" on keyboard doesn't do anything, I will look into this. I should update the usage in my first post, thanks.
GoodDayToDie said:
Some files show as "0 b" size, even though they almost certainly aren't. Is that just because some program has an exclusive lock on them and their size can't be read in that state?
Click to expand...
Click to collapse
yep.
From the htc COM call i get 0 bytes....
GoodDayToDie said:
Any chance of the ability to create folders in the GUI (I think I see how to do it with provxml files, but that's not exactly convenient)?
Click to expand...
Click to collapse
Hehe, i thought on this one too as it is already implemented (just create a folder in UploadRoot drop a file and start downloading it to the phone => the folder gets created). I will look into this.
Can you (or anybody) provide me with an example on how to rename a folder via provxml. And in Yaaf.WP7.NativeAccess.IO.File i have in the "Move" method some code commentated. Can somebody please un-comment, debug and tell me why the hell this provision-xml is invalid / not working, thanks.
(ProvisionXml is completely new to me as this is my first smartphone)
GoodDayToDie said:
Thanks for the explanations on the registry. I was wondering how you could write to locations that you can't read from... Also, I didn't know the sideload limit resets itself. That's something I'll have to watch out for, as I'm near the nominal sideload limit already. Hmm... maybe I should look into writing an app that lets the phone install a .XAP directly, to minimize the amount of PC connecting that's needed.
Click to expand...
Click to collapse
I didn't look into that but i think it is not enough to simply create the guid folder and drop content there... Anyway you can use the "NativeAccess" Projekt to get all the access i used in the Explorer. But you have to create links from your main projekt to the COM-dlls so they get included into the xap file.
GoodDayToDie said:
Sorry, I know that's a lot of comments and questions. If it helps, I showed this to a couple of other HD7 owners today, and the immediate response of both of them was "I've got to get that!" This is a great app, super-convenient and good for making the occasional Samsung Focus owner jealous ;-D
Click to expand...
Click to collapse
That's what keeping me up i guess
GoodDayToDie said:
Actually, I'm a developer myself (mostly C/C++, but I know C#). I'll crack a look at the source when I get a chance (probably this weekend) but would you be interested in a patch if there's something I can improve? One thing I might add is an optional "Did you mean that?" prompt on the Back button, as it's a little too easy to hit and knock you clear out of the app (optional of course, as I understand some people don't have such problems).
Click to expand...
Click to collapse
I'm always interested in any patch especially support for other devices (I have a htc so I can't debug stuff for other devices :/ )
Yeah there could be an option for that. It's pretty easy to implement so... But i don't have this problem so i didn't realised that one.
GoodDayToDie said:
Thanks again!
Click to expand...
Click to collapse
Thank you for your feedback
Muzzy777 said:
does anyone know the latest ETA on compatibility for samsung devices?
Click to expand...
Click to collapse
Well I answered this on the first page of the thread already, thanks.
EDIT: I updated the program and my first post and implemented some of your feature requests
reddragon
Configuration Service Provider Reference for Windows Mobile Devices
Have you used the forum-search? You'll find a post which describes you how to get these books to your phone (it's by me). I can't give you the link because I send this from my HD7.
really great app. Also like the pc<->phone feature
I use it now very often, so I think it needs:
-2 Filebrowser Tabs
-or an option to "bookmark" certain folders
diboze said:
really great app. Also like the pc<->phone feature
I use it now very often, so I think it needs:
-2 Filebrowser Tabs
-or an option to "bookmark" certain folders
Click to expand...
Click to collapse
I talked to other people, at first this feature looks awesome, but after some time you would see that you don't use 2 tabs!
The bookmarking thing is a good idea...
Elerador said:
Have you used the forum-search? You'll find a post which describes you how to get these books to your phone (it's by me). I can't give you the link because I send this from my HD7.
Click to expand...
Click to collapse
I'm looking into amazon kindle... what i can do for sure is copy the file into the kindle folder and start amazon kindle...
But i forgot how to start a program via app-guid. I remember that i saw an COM.dll which can do that.
__ow said:
Configuration Service Provider Reference for Windows Mobile Devices
Click to expand...
Click to collapse
i know that link but i don't see how you can move folders (if it is possible)
reddragon
Love the update! Thanks for cluing me in on the workings of the filter; I wasn't trying wildcards and it therefore looked like it was always empty.
That said, a bug report (reproed on the older version too):
Registry manual mode can crash with a System.ArgumentException "Invalid fullpath".
Start Advanced Explorer
Pan to Registry
Tap "edit manual"
Observe exception
App crashes on hitting OK

[WORK IN PROGRESS] XML Provisioning for all devices...

At the moment I'm working on an app called "WP7 Root Tools". I got the registry editor almost finished, but I am also going to add a File Explorer, Certificate Stores and maybe more. When the registry editor is working I will release the first alplha-version. As the title of the app implies, the tool uses root privileges to perform queries and transactions. I let the tools parasitize other processes to get the code executed in the TCB chamber of the device. I have this working stable now on my Samsung Omnia 7. Unfortunately I have to use a little bit of device-specific API's to do this. And I have to make quite a detour to make it work, which has a negative impact on the performance.
So the ultimate goal is that, in the end, this will work with other, more direct API's, which work on all devices. During my research I found some possiblities that need more investagation. I already decided that I will first concentrate on getting this working with my Samsung device, so that I have at least the tools to do further research. But I thought I'd drop some of my findings here that may lead to better device-support and better performance for future-versions of the tools.
There are many ways that may lead to executing code with elevated or root privileges. But in this post I want to concentrate on XML provisioning. A lot of info can be queried and configured through these API's. I have tried to call the native OS functions for XML provisioning. The function you need to call is: DMProcessConfigXML(). And it is declared in: Cfgmgrapi.h. If you call this function it returns errorcode: 0x4ec (or 0x800704ec), which means "Access disabled by policy". If you use a native COM dll and you forget to add ID_CAP_INTEROPSERVICES to the WMAppManifest.xml, you will get the same errorcode when calling a native function through the COM-interop. So when I get the same errorcode when calling DMProcessConfigXML() this may suggest, that I might be missing a capability in the WMAppManifest.xml.
In another thread on this forum some undocumented capabilities were discussed. One of them was ID_CAP_WAP. Since OMA Client Provisioning is also call WAP-Provisioning, I thought that might be the missing capability. I was not able to add the capability from within Visual Studio, because the capability is missing from the corresponding xsd's so it will give an validation error on building the project. But I could add it manually after the project was build. When I deploy it to the device, using the Application Deployment tool, it would return "Access is denied". I thought it might be an invalid capability, but when I changed the capability to ID_CAP_XXXXXX that would return "Install failed. Fix the capabilities." which is the real error message for an invalid. That implies that ID_CAP_WAP is in fact an existing capability, but I'm just not allowed to use it. When I would be able to use it, I would probably have access to the function DMProcessConfigXML(). That part of the app would be impesonated into higher chambers.
So the big question is what is keeping me from using the ID_CAP_WAP? Why am I not allowed to use it? I tried to attach a debugger to XapDeploy.exe, but it does not throw any exceptions at all. The errorcode is generated in the phone. Getting this fixed will give a big boost to getting closer to root access on all devices. Any help or insight on this will be appreciated.
Heathcliff74
I sent some tweets to da_g, chris, chevron, julien schapman, and a few other devs to let them know this is going on...I'll try tom hounsell too he may know a bit more about this
I'm notifying notebookgrail too because he has been doing some work with dell venue pro devices
Good luck
At a wild guess, it's probably looking for a signature. Using signed code for trusted functions is the kind of thing MS likes to do. :-/
All that said, if you have ProvXML working on Samsung, I would *love* to take a look at it. I'm maintaining a cross-platform Homebrew library. Currently I have at least partial ProvisionXML on HTC and LG, but none on Samsung. I don't have a Samsung device to test with, which is making it hard to try things out...
ID_CAP_WAP isn't a capability you can assign yourself. A higher up has to assign it to you.
<!-- Account loaded from: W:\WINCEROOT\temp\oakcopy28570\Release\x86\XDE\Policy\cb659c75-eac9-4db7-afd8-055632acf233.policy.xml(292,2) -->
<Account Id="S-1-5-112-0-0X71-0X49445F4341505F574150" Description="Autogenerated group for capability ID_CAP_WAP" FriendlyName="ID_CAP_WAProvides access to WAP API" Type="Group">
<!-- MemberOfGroup loaded from: W:\WINCEROOT\temp\oakcopy28570\Release\x86\XDE\Policy\cb659c75-eac9-4db7-afd8-055632acf233.policy.xml(293,2) -->
<MemberOfGroup GroupAccountId="S-1-5-112-0-0X71" />
Click to expand...
Click to collapse
(BasePolicy.xml)
domineus said:
I sent some tweets
Click to expand...
Click to collapse
Thanks.
GoodDayToDie said:
All that said, if you have ProvXML working on Samsung, I would *love* to take a look at it.
Click to expand...
Click to collapse
Well, the whole ProvXml stuff will become irrelevant, when I finish the tools. Because ProvXml is not really user-friendly and my tools will provide that functionality in a user-friendly fashion. So at this moment I want to concentrate on finishing the first alpha-version. Later on, I will probably clean-up the code and release it. But it's quite complex, because I added async multithreading to keep it all smooth.
WithinRafael said:
ID_CAP_WAP isn't a capability you can assign yourself. A higher up has to assign it to you.
Click to expand...
Click to collapse
Thanks for this info. But what I read from this is that you just need to be able to impersonate. Has anyone tried CeImpersonateToken() with this SID?
Abstraction of the ProvXml capabilities is awesome, assuming that we can fully use them and/or extend them if needed. It's useful for a ton of stuff. I've written a small amount of abstraction for registry writes and such, but having the full functionality exposed through a clean API would be fantastic.

[SDK/DLL] «Registry Helper» Edit the Registry with a simple .Reg file

DOWNLOAD: http://forum.xda-developers.com/attachment.php?attachmentid=1404609&stc=1&d=1350332484
Hello Guys
I'm here to bring you more comfort to your registry edit life,
No more thousands lines of code to edit the registry no,
Just 1 simple line of code and a '.reg' file,
What you want more? (if you want more reply on this thread )
ALERT: this SDK/DLL needs WP7 Root Tools SDK to work(I cant include it because its Heathcliff74 his work)
and now some code
Code:
RegistryHelper.RegFileHelper.RegisterFile("");
Look you did nothing now
but put the source of the .reg file in that empty string and it works
like
Code:
RegistryHelper.RegFileHelper.RegisterFile("[HKEY_CLASSES_ROOT\\MyOwnReg]\[email protected]=\"Doggyyyyy\"\n\"nope\"=hex:ab,ab,ab,ab,ab");
thats it you now created a key in HKEY_CLASSES_ROOT with the name MyOwnReg and set the default value on Doggy and added an byte(/hex) value with the name nope
Big shoutout to:
Heathcliff74 for helping me and giving this neat SDK
my mum for screaming at me at 11 O'clock because I wasn't sleeping yet
Regards,
EaterOfCorpses
P.S. My site is down
UPDATE
Today I fixed the export of REG files and it does work (from my side) only there are some strange bugs with WP7 Root Tools, but I think it'll be fixed soon (I hope)
Code:
Code:
RegistryHelper.RegFileHelper.CreateFromRegistry("HKEY_CLASSES_ROOT\\test")
this will return the source of a REG file
Happy Coding, Guys
Regards EaterOfCorpses
UPDATE:
Tried to fix some bugs but it are bugs in SDK
Reserved
Just to confirm, this is a library which parses a standard Windows .REG file and applies it to the WP7 registry, using Heathcliff74's Root Tools SDK?
Cool.
Yes, exactly!
NICE
edit: Added here.
Heathcliff74 said:
NICE
edit: Added here.
Click to expand...
Click to collapse
yaaay
btw maybe Im gonna create an VS2010 add-in to make it complete
Edit:
Stupid me (facepalm)
Heathcliff, thanks
One other feature that would be really cool would be the ability to export .REG files from the registry. This could be used to take registry backups (similar to the way you can in regedit on the PC). Provide an API that specifies a registry path, and return a string containing the .REG data, or possibly one that takes a registry path and a file path, and automatically writes the reg data to that file path...?
Just a thought, but it would be tremendously helpful. One basic thing that is sorely missing from the current WP7 reg editors is a way to back up registry data easily, short of making a full phone image backup. For ome thing,s you need the full image backup anyhow because messing with them might make the phone unable to work normally, but for other things it would just be good to be able to tweak things while knowing they can be easily reverted (I'm thinking about stuff like the GPS settings, for example). I actually started work on a program that could export registry data to a file, but it got abandoned in the face of the many other things I found myself working on.
GoodDayToDie said:
One other feature that would be really cool would be the ability to export .REG files from the registry. This could be used to take registry backups (similar to the way you can in regedit on the PC). Provide an API that specifies a registry path, and return a string containing the .REG data, or possibly one that takes a registry path and a file path, and automatically writes the reg data to that file path...?
Just a thought, but it would be tremendously helpful. One basic thing that is sorely missing from the current WP7 reg editors is a way to back up registry data easily, short of making a full phone image backup. For ome thing,s you need the full image backup anyhow because messing with them might make the phone unable to work normally, but for other things it would just be good to be able to tweak things while knowing they can be easily reverted (I'm thinking about stuff like the GPS settings, for example). I actually started work on a program that could export registry data to a file, but it got abandoned in the face of the many other things I found myself working on.
Click to expand...
Click to collapse
that's an excellent idea! Im gonna work on it tomorrow!
I took a week vacation from my work so I got all the time (if you forget the point that my mom limits me )
And with the experience I have I think this will take 2 hours to build, but It will take very long time to backup, so do you know something to block the phone so the user cant use it while it backups?
I figure people usually wont make the backup from super-low-level; they'll mostly want to create it near a "leaf" of the hierarchy, so neither creation nor restoration of an export should take very long. Doing a full backup would probably be a bit messy, because as far as I know there isn't any way to lock the entire registry at once, and parts of it are changing constantly. There are actually APIs for creating an entire duplicate of a registry hive (HKCR/HKCU/HKLM/etc.) but you'd have to write a bunch of native code to use them.
One other option would be to put a limit on the API, like an integer for how many levels deep to recurse, as that should reduce the size o the backup created. If you want to do it in a multi-threaded / abortable manner, you could also make the backup API offer a timeout, which if it expires before the backup is complete, would simply stop constructing the .REG file and return whatever it has so far. Also, of course, don't forget to use StringBuilder or some other class that allows quickly combining text.
GoodDayToDie said:
I figure people usually wont make the backup from super-low-level; they'll mostly want to create it near a "leaf" of the hierarchy, so neither creation nor restoration of an export should take very long. Doing a full backup would probably be a bit messy, because as far as I know there isn't any way to lock the entire registry at once, and parts of it are changing constantly. There are actually APIs for creating an entire duplicate of a registry hive (HKCR/HKCU/HKLM/etc.) but you'd have to write a bunch of native code to use them.
One other option would be to put a limit on the API, like an integer for how many levels deep to recurse, as that should reduce the size o the backup created. If you want to do it in a multi-threaded / abortable manner, you could also make the backup API offer a timeout, which if it expires before the backup is complete, would simply stop constructing the .REG file and return whatever it has so far. Also, of course, don't forget to use StringBuilder or some other class that allows quickly combining text.
Click to expand...
Click to collapse
haha I can't write C++
So I will just start a new thread and make it event based and complicated
GoodDayToDie said:
I figure people usually wont make the backup from super-low-level; they'll mostly want to create it near a "leaf" of the hierarchy, so neither creation nor restoration of an export should take very long. Doing a full backup would probably be a bit messy, because as far as I know there isn't any way to lock the entire registry at once, and parts of it are changing constantly. There are actually APIs for creating an entire duplicate of a registry hive (HKCR/HKCU/HKLM/etc.) but you'd have to write a bunch of native code to use them.
One other option would be to put a limit on the API, like an integer for how many levels deep to recurse, as that should reduce the size o the backup created. If you want to do it in a multi-threaded / abortable manner, you could also make the backup API offer a timeout, which if it expires before the backup is complete, would simply stop constructing the .REG file and return whatever it has so far. Also, of course, don't forget to use StringBuilder or some other class that allows quickly combining text.
Click to expand...
Click to collapse
I just fixed it only there are some strange bugs in WP7 Root Tools and that takes a bit of the functionality
almost forgot to say:
http://forum.xda-developers.com/showthread.php?p=32846003#post32846003
Updated the dll tried to fix bugs with wp7 root tools :/
Regards
Eater

[HOWTO][INFO]Editing the CSC file on your phone.

All samsung "touchwiz" based devices contain files in /system/csc that set variables dictating how certain parts of the phone act, what is pre-configured, etc. In the case of the AT&T variants, the contents of these files are often dictated by AT&T.
This post is an attempt to try and catalog some of the more useful values that can be changed (and the result of changing them.) Not all the variables seem to do much, and only by trial and error can we really know what will happen... So far, I've only played around with items I found interesting, but will continue to expand in this and if people reply to this post with actual experience changing other variables, I'll add the information to this thread.
PLEASE TEST THINGS AND CONTRIBUTE TO THIS THREAD.
Please don't reply with guesses as to what things may or may not do or with requests about specific variables. I'm hoping that eventually document every CSC variable available and "requests" won't make it go faster. If you want to know what a not-yet-documented variable does, try it out (and post your results.)
First, in order to play with the csc files, your phone should be rooted. This isn't optional, as you'll need the ability to overwrite files in the phone's /system partition (the firmware - sometimes improperly called the "ROM")
I'd strongly suggest making a nandroid (or backup via CWM Recovery or TWRP) before making changes. It's possible to mess things up badly enough that the phone won't boot properly.
It's possible to edit the CSC files directly on the phone, but I'd strongly suggest not doing that. Therefore, you should have a good text editor on your computer that's able to properly deal with unix/linux style line endings (notepad isn't good enough.) Notepad++ is a very good editor and freely available. Google "notepad++" For a linux box, plain "gedit" is fine.
In order to edit the files, you'll need to be able to mount the /system partition as read-write, and to move files from /system/csc to your PC or other location for editing. You have several options for this including root explorer, ES File Explorer, or just using adb. I prefer adb myself, but I'm a commandline type of person.
I won't be spending time describing how to get the CSC files off your phone to your PC, nor will I tell you how to overwrite the existing ones with your edits. This isn't because I'm elitist, an a**hole, or anything like that. (I _am_ some of those things, but that isn't my reason here.) My purpose for leaving out the information is to force inexperienced users to learn these things before editing system files. If I give you all the information, you become dependent on me for more information, and I don't want that (and trust me - neither do you.) As well, if I spoon-feed this, you won't have any idea what do to when something goes wrong.
Find this post helpful? If so, please make it MORE helpful by testing one of the other CSC features and replying to this thread telling us what result you had. ​
First up... feature.xml...
feature.xml
The CSC "feature.xml" file is in XML format. This means that everything "variable" has a start and end tag. Both contain the name of the variable,
but the end tag has a slash in it. The value of the variable is between the start and end tags. For example: <VariableName>value</VariableName>. So, if this message describes changing "CscFeature_SamsungSucks" from "false" to "true", you'd search in the xml file for "CscFeature_SamsungSucks" and might find this:
Code:
<CscFeature_SamsungSucks>false</CscFeature_SamsungSucks>
You'd change the "false" to "true" (no quotes!) and be done. In some cases, the entire line can be deleted (as noted.)
This file has a LOT of variables in it and this post will concentrate on that particular file. Almost all tinkering will occur in this file, and it's also the easiest to edit (as there aren't any complex xml structures.)
CscFeature_Common_DisableMenu4GalSearch: setting this to false didn't seem to bring up any new global address list options on my device (I'm connected to an exchange server) in the email app or contacts/dialer app.
CscFeature_Settings_DisableMenuFindMyMobile: (see next line)
CscFeature_Settings_FindMyMobile: setting "DisableMenuFindMyMobile" to false and this entry to true will enable the "find my mobile" entries in the Settings->Security menu. I'm unable to get these items to function properly, however. (They worked with my international note2, so it might be that there are other support files missing on the AT&T variant I'm using now.)
CscFeature_FMRadio*: editing these seem to have no effect (I don't think any of the LTE capable NoteII phones are capable of FM Radio.)
CscFeature_NFC_StatusBarIconType: If you delete this line, it will get rid of the "N" statusbar icon when NFC is turned on.
CscFeature_Message*: Be warned that editing some of these may break SMS/MMS messaging on your device. There appears to be many carrier specific settings in here that have dependencies on the specific carrier. For example, I don't think that AT&T's network supports proper SMS Delivery reports, so even setting the corresponding variable to "true" would be futile.
CscFeature_Email_UseFixedBgColorAsWhite: if changed from true to false, the email app will appear inverted (with a black background and white/gray text.)
CscFeature_Sip_DisableAutoCorrection: doesn't seem to have any impact on the samsung keyboard
CscFeature_Sip_DisableSpaceSuggestion: doesn't seem to have any impact on the samsung keyboard
CscFeature_Sip_DefaultOff4AutoSubstitution: doesn't seem to have any impact on the samsung keyboard
CscFeature_Launcher_*: all these seem to be for setting defaults for the touchwiz launcher, so no sense in changing them.
language.xml
(coming soon)
This appears to control what languages are available to the system. Canadian users might want to play with this file to see if adding en_US to the "Display" and/or "SupportList" tags will allow them to choose US English (and perhaps get google's TTS to talk to them in google now.)
others.xml
(coming soon)
This appears to set some carrier defaults, including the APN information and the carrier built-in dialer contacts (such as "AT&T Customer Care")
customer.xml
(coming soon)
I've only glanced at this file so far, but it appears to be carrier specified network information, some carrier specified settings defaults, and even some carrier specified browser bookmarks. There also appears to be some APN related information in here, but I'm not certain what it's in here for.
Nice how to guide man its very informative, im going to play around with this later when I get home...do you mind if I add it to my reference thread so it doesnt get lost when this thread begins to get bigger?
Sent from my SAMSUNG-SGH-I317 using xda premium
mjwhirly said:
Nice how to guide man its very informative, im going to play around with this later when I get home...do you mind if I add it to my reference thread so it doesnt get lost when this thread begins to get bigger?
Click to expand...
Click to collapse
This isn't mine to control. This "belongs" to the community, and I hope that the community contributes to it in a meaningful way. Please feel free to reference it elsewhere - perhaps with (contributions welcome) noted. My ONLY demand is that no one profits from effort I've given freely.
My secret motive is to nudge people out of the "MyRom" mentality and more into the "lets all work together to learn, develop and share" mentality often seen with kernels and open source projects.
Take care
Gary
Gary, have you seen the CSC feature web, set user agent?
Possibly an option to set "Desktop" as default user agent in browser, I for one despise mobile sites.
antiochasylum said:
Possibly an option to set "Desktop" as default user agent in browser, I for one despise mobile sites.
Click to expand...
Click to collapse
Not sure if this is what you are looking for or not: Start the browser, tap the "menu" button. Turn on the "desktop view" checkbox.
There are some UAgent related entries in the feature.xml file. Please play with them and post your results:
CscFeature_Web_SetUserAgent // currently empty
CscFeature_Web_SetUAProfile
CscFeature_Web_Bool_EnableUAProfile // currently false
Thanks so much for this. Sorry for the noob question but I haven't done much with xml files. What is the character to just comment out a line?
Sent from my SAMSUNG-SGH-I317 using xda premium
Romee74 said:
Thanks so much for this. Sorry for the noob question but I haven't done much with xml files. What is the character to just comment out a line?
Click to expand...
Click to collapse
In XML, in order to comment out a line (instead of completely deleting it), it has to be surrounded by special tags:
On the left of the commented out area, you need "<!--" (no quotes) and on the right, you need "-->"
See the below code block for an example.
Code:
<Is_This_Commented> false </Is_This_Commented>
<!-- <Is_This_Commented> true </Is_This_Commented> -->
Take care
Gary
On my Galaxy S III, the file /system/etc/feature_default.xml appears to contain default settings, and feature.xml can override those defaults. I'm not sure how comprehensive the list of settings in feature_default.xml are, but I would imagine that many of the available ones are covered there.
Thundersnuz said:
On my Galaxy S III, the file /system/etc/feature_default.xml appears to contain default settings, and feature.xml can override those defaults. I'm not sure how comprehensive the list of settings in feature_default.xml are, but I would imagine that many of the available ones are covered there.
Click to expand...
Click to collapse
That's interesting. Which variant of sgs3 do you have? Would you be willing to attach the two files to a reply in this thread (or point me to someplace I can find the firmware your using to investigate?)
Thank you
Gary
It would be amazing if we could somehow enable auto-replace on the samsung keyboard. I ended up switching to swiftkey because of how many mistakes I've been making with the stock keyboard, but now I don't get to take advantage of swipe, stylus writing, or the one-handed features...
UCLAKoolman said:
It would be amazing if we could somehow enable auto-replace on the samsung keyboard. I ended up switching to swiftkey because of how many mistakes I've been making with the stock keyboard, but now I don't get to take advantage of swipe, stylus writing, or the one-handed features...
Click to expand...
Click to collapse
I completely agree, but I wasn't able to get it working when tinkering with the CSC values (as noted in the corresponding post.) Perhaps there's some other combination of values that might get it going.
Please give it a try and let us know how it works out.
Take care
Gary
Removing the NFC icon from the staus bar is awesome but has anyone tried switching this line;
<CscFeature_NFC_DefaultCardModeConfig>DISABLE</CscFeature_NFC_DefaultCardModeConfig>
To enable? Im not sure why att would "block" this feature, especially with google wallet getting more support for non-nfc devices.
Sent from my SAMSUNG-SGH-I317 using xda app-developers app
MonsterBandit said:
...but has anyone tried switching this line...
Click to expand...
Click to collapse
I'm not sure why people keep asking if other people have done this, that, or the other thing. TRY IT and let us know what happens.
garyd9 said:
I'm not sure why people keep asking if other people have done this, that, or the other thing. TRY IT and let us know what happens.
Click to expand...
Click to collapse
fair enough...thanks btw...im slowly growing the courage to make changes and explore deeper into these devices...changed the value to "ENABLE" (minus the quotes) and seemingly nothing changed. Google Wallet app still says Not supported. That might be on Google Wallet's end tho. I guess the better question might be has anyone with a Note 2 gotten Google Wallet to work?
When I first got my GN2 running stock, carrier billing worked. I then flashed Jedi 3.3, and it disappeared. I remember that on my HOXL, someone mentioned a fix on the build.prop. Is there anything I can do on the GN2's build.prop to get my carrier billing back?
I'm on AT&T by the way.
silentecho13 said:
When I first got my GN2 running stock, carrier billing worked. I then flashed Jedi 3.3, and it disappeared. I remember that on my HOXL, someone mentioned a fix on the build.prop. Is there anything I can do on the GN2's build.prop to get my carrier billing back?
I'm on AT&T by the way.
Click to expand...
Click to collapse
this is pretty much a how to thread ..
you seem to be having issues with a rom , you should post in there ..
here is how I fixed it in previous roms ..
compare your build.prop form your att rom to the one you are using ..
and add / replace with the att stuff .

Categories

Resources