Looking around the IMGFS, I found some undocumented capabilities that can be used in building an app (in addition to the standard ones mentioned in the WMAppManifest.xml file).
These are the extra ones I found, in case anyone is interested (from BasePolicy.xml):
ID_CAP_RINGTONE_ADD:Allows ringtone-marketplace applications to read/write into the Ringtones directory
ID_CAP_MEDIALIB:Access to the media library - read, play-back, etc.
ID_CAP_INTEROPSERVICES:Temporary Interop Service Capability.. To be removed by feature team
ID_CAP_SIMrovides access to SIM manager API
ID_CAP_SMSrovides access to SMS API
ID_CAP_WAProvides access to WAP API
ID_CAP_IDENTITY_USER:Allow an application to use a phone.info.dll to retrieve user properties
ID_CAP_TESTPUBLIC1:Small public test capability
ID_CAP_LOADUNSIGNEDMANAGEDDLL:Capability to load unsigned managed dll into chamber's process space
ID_CAP_LOADUNSIGNEDNATIVEDLL:Capability to load unsigned native dll into chamber's process space
ID_CAP_DEBUG:Allow an application to run in debugging enviorment.
---Edit---
I've tested each of these individually, and some work, and others don't.
ID_CAP_INTEROPSERVICES works
ID_CAP_RINGTONE_ADD works
ID_CAP_MEDIALIB works
ID_CAP_IDENTITY_USER works
ID_CAP_TESTPUBLIC1 works
ID_CAP_SIM ID doesn't work
CAP_SMS doesn't work
ID_CAP_WAP doesn't work
ID_CAP_LOADUNSIGNEDNATIVEDLL doesn't work
ID_CAP_LOADUNSIGNEDMANAGEDDLL doesn't work.
Note that even for the ones that work, Microsoft may still reject them in the app store.
I tested these by entering them in the WMAppManifest.xml in the XAP, and loading them on a windows phone device. This guy suggests that if it loads on the device, you have the permission: http://www.drdobbs.com/windows/227701092 and I think he's right. If you don't have permission, it doesn't actually load, and in every case, if it loaded it ran.
ID_CAP_RINGTONE_ADD - So i guess with next update we will get Custom ringtones that can b installed from an app
off topic can some one create utility that will do something about tuch sensetive buttons, when using camera if u tuch any of then by accident it exit camera, so u have to hold phone very carefully.
also, app to lock screen rotation would be nice.... any of thous features undocumented anywhere
P.S sorry for unrelated message
I think the ID_CAP_RINGTONE_ADD feature will only be enabled for the carriers (who knows what Microsoft really has in mind, though). The Windows Phone has done a good job (or lousy job, compared to what I desire) managing permissions so they can choose what capability to give whom.
Disabling other buttons shouldn't be hard if you can get to the native API. So once the phone is jailbroken......
Actually, Microsofts own Q&A on Windows Phone 7 states to look in the Marketplace for additional ringtones. Here is an excerpt and a link:
To find a ringtone in Marketplace
1
On Start, tap the arrow to go to the App list, then tap Marketplace .
2
Press the Search button.
3
Do one of the following:
•
To browse a variety of ringtones, type ringtones, then tap Enter .
•
To look for a more particular type of ringtone, type something more specific, like Halloween ringtones.
Tip
To hear what a ringtone or alert sounds like, tap Play .
Note
Marketplace may not be available in your country or region.
Click to expand...
Click to collapse
http://www.microsoft.com/windowsphone/en-us/howto/wp7/start/ringtones-and-sounds.aspx
All well and good having that, but why should we purchase a ring tone?
TheDisneyMagic said:
All well and good having that, but why should we purchase a ring tone?
Click to expand...
Click to collapse
Well, I don't see myself buying any, but this means an app could be made to create/add ringtones.
Long press on a song in Zune won't let you set it as the ringtone?
Iridox said:
Long press on a song in Zune won't let you set it as the ringtone?
Click to expand...
Click to collapse
Nope, I asumed this would be how it worked but no option in the list to do so.
Ah, that's a PITA >_>
naplesbill said:
Well, I don't see myself buying any, but this means an app could be made to create/add ringtones.
Click to expand...
Click to collapse
A whole app just to add a ringtone!?
naplesbill said:
Actually, Microsofts own Q&A on Windows Phone 7 states to look in the Marketplace for additional ringtones. Here is an excerpt and a link:
http://www.microsoft.com/windowsphone/en-us/howto/wp7/start/ringtones-and-sounds.aspx
Click to expand...
Click to collapse
To me that excerpt looks like you can download ringtones from the store, not that you can create an app to download ringtones. It would appear that Microsoft has an internal application that can add ringtones (which makes sense). These permissions are enforced by the OS, not the app store (maybe the app store does too). So if they want to be able to install ringtones, they need to give their own app permission to do so.
athompson said:
Looking around the IMGFS, I found some undocumented capabilities that can be used in building an app (in addition to the standard ones mentioned in the WMAppManifest.xml file).
These are the extra ones I found, in case anyone is interested (from BasePolicy.xml):
ID_CAP_RINGTONE_ADD:Allows ringtone-marketplace applications to read/write into the Ringtones directory
ID_CAP_MEDIALIB:Access to the media library - read, play-back, etc.
ID_CAP_INTEROPSERVICES:Temporary Interop Service Capability.. To be removed by feature team
ID_CAP_SIMrovides access to SIM manager API
ID_CAP_SMSrovides access to SMS API
ID_CAP_WAProvides access to WAP API
ID_CAP_IDENTITY_USER:Allow an application to use a phone.info.dll to retrieve user properties
ID_CAP_TESTPUBLIC1:Small public test capability
ID_CAP_LOADUNSIGNEDMANAGEDDLL:Capability to load unsigned managed dll into chamber's process space
ID_CAP_LOADUNSIGNEDNATIVEDLL:Capability to load unsigned native dll into chamber's process space
ID_CAP_DEBUG:Allow an application to run in debugging enviorment.
Visual Studio won't let you add all of them directly, but uncompress your .xap in the build directory, and add it manually.
If anyone is thinking of doing this, the phone rejected my attempts to do so. I tried to give myself ID_CAP_LOADUNSIGNEDNATIVEDLL, but it wouldn't even load on the phone. Oh well.
Click to expand...
Click to collapse
But if someone use these things in an application , I think microsoft doesn`t approve it in the market place!
amir_rafie said:
But if someone use these things in an application , I think microsoft doesn`t approve it in the market place!
Click to expand...
Click to collapse
Ya, not only that, they probably automatically check to make sure you don't try to use them. The phone automatically checks, too.
The main reason I put them here is because I couldn't find them documented anywhere on the web, and I thought it would be good to save someone the time if they started down the same path I did.
hopefully once there is a jailbreak that turns of security/cert checking we can add these capabilities to our apps. Im particularly interested in the p/invoke capability.
indiekiduk said:
Im particularly interested in the p/invoke capability.
Click to expand...
Click to collapse
YES! It would make the world beautiful and skies turn blue.
So I set up VS 2010 and tried debugging an app that had a simple DLLImport in it and ID_CAP_INTEROPSERVICES in the manifest, however it still crashed with a MethodAccessException. It was def a valid dll and method name because I took it from one of the DLLImports in the system.location .net dll decompiled with Reflector.
indiekiduk said:
So I set up VS 2010 and tried debugging an app that had a simple DLLImport in it and ID_CAP_INTEROPSERVICES in the manifest, however it still crashed with a MethodAccessException. It was def a valid dll and method name because I took it from one of the DLLImports in the system.location .net dll decompiled with Reflector.
Click to expand...
Click to collapse
Interesting. If your app installed, it means you were able to get the ID_CAP_INTEROPSERVICES permission, because if the phone rejects your permission, it rejects it at install time. Maybe the DLL path was wrong, like you need to do ..\DLLNAME.dll or something.
indiekiduk said:
So I set up VS 2010 and tried debugging an app that had a simple DLLImport in it and ID_CAP_INTEROPSERVICES in the manifest, however it still crashed with a MethodAccessException. It was def a valid dll and method name because I took it from one of the DLLImports in the system.location .net dll decompiled with Reflector.
Click to expand...
Click to collapse
Try a relative URI path. ./DLLName.dll
On the subject of Native Applications on Windows Phone 7:
A few days ago, an Application called "Network Profile" appeared in the Samsung Zone of my Omnia 7's Marketplace.
This app is the first external app that uses native code - The Marketplace says that it "Requires access to your interop services", and on opening the XAP on my PC, I found it to contain three native COM DLLs, alongside two .NET DLLs and a further native DLL with MUIs that appear to only serve to hold resources.
I'm not sure whether this can be linked to here, so I'm going to describe the interesting parts.
It has not one, but three XMLs - the typical WMAppManifest.xml (pastebin.com/uEJWdTuA), a WMAppPRHeader.xml (pastebin.com/AVcv7JUX) which seems to have something to do with PlayReady DRM, and most interestingly WMInteropManifest.xml (pastebin.com/NCVKP6kM).
There is also the AppManifest.xaml (pastebin.com/rRrB090h).
The NetworkProfile.dll has a number of COM Imports like so:
Code:
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("F1113B13-AAB8-45E9-91A5-CBE568C29612")]
internal interface INwProfInterface
The Constructor for the class containing all the COM Interfaces:
Code:
ComBridge.RegisterComDll("NwProfDLL.dll", new Guid("4A2580BA-11A3-49AB-AC98-C30B5E72D381"));
this.NwInterface = (INwProfInterface) new CNwProfClass();
ComBridge.RegisterComDll("SecVersion.dll", new Guid("DFE52822-B526-4913-807A-D2AABC7BF911"));
this.SecVerInterface = (ISecVersionInterface) new SecVersionClass();
ComBridge.RegisterComDll("COMRilClient.dll", new Guid("A18F6B1A-924E-4787-AA82-19F98B49CF5D"));
this.SecRILControlInterface = (ISecRilControl) new COSecRilControl();
Happy to answer any questions, and if allowed, either guide people to getting it themselves, or providing a download link to the XAP.
Sweet, good find! I downloaded that app. How did you get it off your phone? If you have a download link to the XAP no one will complain, either.
Related
Hi
I search a way to deploy ProvXml on LG wp7 device but i don't have LG!
i need someone with an LG device with Network Setup working
to try a tweak.
deploy attached version of LG network setup.
then apply ATT US Settings (PROV__ATT_US_310_410.xml)
reboot your device then look if you have more option
in ease of access."telecoil option"
and a grey color in dark theme.
if this work i can patch this app to use it as provxml deployer!
to restore your settings reinstall network setup from marketplace.
i tried, didnt work on my TELUS lg optimus7
megagprime said:
i tried, didnt work on my TELUS lg optimus7
Click to expand...
Click to collapse
In your case even LG Network Setup doesn't work so this is an other problem.
xboxmod said:
In your case even LG Network Setup won't work so this is an other problem.
Click to expand...
Click to collapse
marketplace reviews says no canadian's lg network setup work...
For Canadian LG E900H, you can access North American network settings through the MFG app, and it includes Telus, Bell, and AT&T as options.
We know that
My phone says "Microsoft ADC feature enabled!" and doesn't allow it to run, but my phone isn't on the list of supported devices anyway.
fb401 said:
My phone says "Microsoft ADC feature enabled!" and doesn't allow it to run, but my phone isn't on the list of supported devices anyway.
Click to expand...
Click to collapse
try to change ADC Settings with mfg apps
xboxmod said:
try to change ADC Settings with mfg apps
Click to expand...
Click to collapse
I can't reach the MFG. Everytime I try ##634# Call nothing happens.
Hey xbox.
Was digging further into LG's MFG app, this time inspecting the network setup parts using the provisioning calls. Wanting more meat on me bones before rushing into a system restore again I checked out the network setup from the LGE store which you edited, and Copy FileOperations in a provxml-string does indeed work in case you haven't had any reports on this matter yet. Can't answer however your altered network setup works though.
Anyway, I now sport a fully custom colored system, including silverlight apps. Ie successful file copy operations from app install dir to \Windows on an LG.
Delete seemingly didn't work though, nor editing theme registry values but didn't investigate that further since LG's registry COM calls already work.
__ow said:
Hey xbox.
Was digging further into LG's MFG app, this time inspecting the network setup parts using the provisioning calls. Wanting more meat on me bones before rushing into a system restore again I checked out the network setup from the LGE store which you edited, and Copy FileOperations in a provxml-string does indeed work in case you haven't had any reports on this matter yet. Can't answer however your altered network setup works though.
Anyway, I now sport a fully custom colored system, including silverlight apps. Ie successful file copy operations from app install dir to \Windows on an LG.
Delete seemingly didn't work though, nor editing theme registry values but didn't investigate that further since LG's registry COM calls already work.
Click to expand...
Click to collapse
So you confirm we can deploy custom provmxml
on lg device?
I can confirm that the ChangeConfigXML-call supports the Copy FileOperation of a custom provxml.
So how can we do this?
__ow said:
Hey xbox.
Was digging further into LG's MFG app, this time inspecting the network setup parts using the provisioning calls. Wanting more meat on me bones before rushing into a system restore again I checked out the network setup from the LGE store which you edited, and Copy FileOperations in a provxml-string does indeed work in case you haven't had any reports on this matter yet. Can't answer however your altered network setup works though.
Anyway, I now sport a fully custom colored system, including silverlight apps. Ie successful file copy operations from app install dir to \Windows on an LG.
Delete seemingly didn't work though, nor editing theme registry values but didn't investigate that further since LG's registry COM calls already work.
Click to expand...
Click to collapse
please share with the world!
Megaprime and xboxmod, have you checked the library my IE Search Switcher project uses? I have working ProvXML on LG devices. It's only tested with registry write, though.
__ow said:
Hey xbox.
Was digging further into LG's MFG app, this time inspecting the network setup parts using the provisioning calls. Wanting more meat on me bones before rushing into a system restore again I checked out the network setup from the LGE store which you edited, and Copy FileOperations in a provxml-string does indeed work in case you haven't had any reports on this matter yet. Can't answer however your altered network setup works though.
Anyway, I now sport a fully custom colored system, including silverlight apps. Ie successful file copy operations from app install dir to \Windows on an LG.
Delete seemingly didn't work though, nor editing theme registry values but didn't investigate that further since LG's registry COM calls already work.
Click to expand...
Click to collapse
Interesting. I was unable to do registry write with COM, so I implemented it in ProvXML and according to my LG testers it works. I'm the developer of the IE Search Switcher app, and the source is available for download if you want to take a look at the library code that I'm using.
I can write to certain parts of my registry (like searchscope) but can not write to other parts (audio\10 camera shutter)
When I change the value it shows its changed but then I refresh and its back to its original value :/
From my limited testing it seems registry write access through provxml is limited on LGs, but I have yet to try a registry value which can't be written with the MFG app or its COM classes.
__ow said:
From my limited testing it seems registry write access through provxml is limited on LGs, but I have yet to try a registry value which can't be written with the MFG app or its COM classes.
Click to expand...
Click to collapse
ya and how can we use those to modify our registries?
http://forum.xda-developers.com/showthread.php?t=841892
Engineer Menu > Other Settings > Edit registry
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
Hi all,
I was wondering if it's possible to inject into zune app and make it install another app instead of the one you choose using zune.
Using fillder, I briefly tried to look what requests are made by zune but I could not see anything which looks like downloading the app.
Just sideload its a whole lot easier and I don't think something like that exists otherwise it would be on Android and iPhone.
Sent from my GT-I5800 using XDA App
andreiuc said:
I was wondering if it's possible to inject into zune app and make it install another app instead of the one you choose using zune.
Click to expand...
Click to collapse
Hmm, I can say - interesting idea! But I am afraid it's a very difficult to implement. You need to emulate whole MS store server...
I think all requests go via secure connection and checked by trusted certificates on device.
same with dev unlock.
Cotulla said:
I think all requests go via secure connection and checked by trusted certificates on device.
same with dev unlock.
Click to expand...
Click to collapse
Not at all, some requests are non-secure. I'm able (with WireShark) to catch xap requests, store/app info etc. Actually, we have a lot of marketplace replacements (even I have my own implementation ).
sensboston said:
Not at all, some requests are non-secure. I'm able (with WireShark) to catch xap requests, store/app info etc. Actually, we have a lot of marketplace replacements (even I have my own implementation ).
Click to expand...
Click to collapse
I tried with Fiddler to catch xap requests but I was not able to see any.
My idea is to to write an app which injects code in Zune to hijack calls to download a XAP from zune and download from my location instead(or get it from local disk).
it's good to hear this. but marketplace XAP files are signed and it also makes a problem. unsigned will not work. (it's not deploy, it's installation!)
Cotulla said:
it's good to hear this. but marketplace XAP files are signed and it also makes a problem. unsigned will not work. (it's not deploy, it's installation!)
Click to expand...
Click to collapse
Right. They are signed with developer key.
Not sure if WP7 OS checks this and how would it know if it's the real app?
I mean, I can sign my own XAP which I make Zune to get it and deliver it to WP7.
andreiuc said:
Right. They are signed with developer key.
Not sure if WP7 OS checks this and how would it know if it's the real app?
I mean, I can sign my own XAP which I make Zune to get it and deliver it to WP7.
Click to expand...
Click to collapse
Looking to the requests responses when you select to install an app, I was able to see this response XML:
Code:
<a:entry>
<a:updated>2011-09-08T18:03:25.3198784Z</a:updated>
<a:title type="text">3D Paperball 1.3.0.0</a:title>
<a:id>urn:uuid:1ea47c77-79c1-4c5a-b441-549b4e93dcea</a:id>
<version>1.3.0.0</version>
<url>http://apps.marketplace.windowsphone.com/E0C15284-972B-41D3-B245-8C16AAF73A66/CurrentBinary.xap</url>
<packageSize>9235456</packageSize>
<installSize>19616768</installSize>
<clientTypes>
<clientType>WinMobile 7.0</clientType>
<clientType>WinMobile 7.1</clientType>
</clientTypes>
<supportedLanguages>
<supportedLanguage>English</supportedLanguage>
</supportedLanguages>
<deviceCapabilities><capability><id>ID_CAP_NETWORKING</id><string>data services</string><disclosure>Disclose</disclosure></capability><capability><id>ID_CAP_SENSORS</id><string>movement and directional sensor</string><disclosure>Disclose</disclosure></capability><capability><id>ID_CAP_IDENTITY_USER</id><string>owner identity</string><disclosure>Disclose</disclosure></capability><capability><id>ID_CAP_IDENTITY_DEVICE</id><string>phone identity</string><disclosure>Disclose</disclosure></capability></deviceCapabilities>
<averageLastInstanceUserRating>0</averageLastInstanceUserRating>
<lastInstanceUserRatingCount>0</lastInstanceUserRatingCount>
</a:entry>
<a:author>
<a:name>Microsoft Corporation</a:name>
</a:author>
As you can see, the XAP URL is right there.
However, with Fiddler, I am not able to see any requests to this URL.
Maybe someone can share some info using more advanced tools like WireShark.
LOL, my hunch is it's actually the WP7 OS which is doing the download of the file
yeah. but it seems signed with own MS certificate ?
so developers push app to MS and they verify and sign it? (I don't know much about market space publishing)
andreiuc said:
LOL, my hunch is it's actually the WP7 OS which is doing the download of the file
Click to expand...
Click to collapse
I believe you are right as it's been discovered already that it's pacmaninstaller.exe (I think that's the spelling) on device that prevents the sideloading of homebrew apps with INTEROPSERVICES.
andreiuc said:
However, with Fiddler, I am not able to see any requests to this URL.
Maybe someone can share some info using more advanced tools like WireShark.
Click to expand...
Click to collapse
Did you "reverse tether" your phone to PC? I believe, handset is responsible to download and install xap...
BTW, all these talks is about "warez" I don't see any other reasons to do that kind of hack (or may be, for research purposes only).
To get a "prove of concept", we need:
- download MS signed xap;
- using some kind of filtering proxy, replace request to http://apps.marketplace.windowsphone.com/{GUID}/CurrentBinary.xap to the local server;
If phone will be able to download and install that xap (what is impossible by using MS or third-party deployers), we'll get a solution or at least prove of solution
Cotulla said:
yeah. but it seems signed with own MS certificate ?
so developers push app to MS and they verify and sign it? (I don't know much about market space publishing)
Click to expand...
Click to collapse
Yep, "Ed Zachary" (c) Dave Barry, "Big Trouble"
..::H.O.W...T.O...N.A.T.I.V.E::..
Hello,
today I had decided to start this thread about native development for WP7.
At the current moment I don't upload/attach any working stuffs to this message. It will happen a bit later, after new DFT ROMs release. This is because it's very difficult to run them for now.
Let's start from current achieved results:
1) It's possible to run any EXE files (after "FullUnlock")
2) Those EXE files can do any operations in the system (after "FullUnlock")
3) It's possible to show some GUI from this applications. But GUI has legacy Windows CE style, it's impossible to create Metro-style applications for now.
How can it be used by community?
We can develop a lot of homebrew applications: like porting emulators, old native applications, video players and etc.
It can be possible to port famous TCPMP player for example and get ultimate playback on Windows Phone 7!
Is it possible to run old Windows Mobile 6.5 applications without modifications?
No, it's not possible. A lot of different APIs are missing for those applications.
Is it hard to modify old Windows Mobile 6.5 applications?
Well, it's almost same like porting to pure Windows CE, but a lot of Windows CE stuffs are "damaged" inside Windows Phone. They just doesn't work right, because nobody never used/tested them before
Photos of sample "WP7 Native test"
Information for developers you can find in the next messages.
So I will release demo WP7 native application, when we fix issues with FullUnlock.
Demo will be as binary EXE file. And as VS2008 project, which can be good start point for other developers.
Now this thread dedicated for discussion, share ideas and thoughts.
DFT, Cotulla
Information about "FullUnlock"
Information about "FullUnlock"
DevUnlock actually allows only to deploy XAP files from external sources.
It doesn't give more privileges.
So we (DFT) developed "FullUnlock". FullUnlock is implemented as replacing some system files by wrappers, which allows any kind of access (disable access checking at all)
We replace LVMOD.DLL which used to check files and data (checksums, certificates and etc) and POLICYENGINE.DLL which implements internal objects access checking.
All written before means that FullUnlock at the current moment only possible by flashing custom ROM to device. In future maybe we can find good ways to do it without flashing, but for now I don't see any ideas how to do it without flashing.
Maybe we can replace DLLs inside \Windows\ directory (put a shadow copy), but I am not sure if it will work really. It's stuffs for future experiments.
It can be possible to do something near by editing policy values, but it need big research to find right way. As it still won't disable file checking, maybe we can add own certificate to right store and then sign files with them.
The last DFT 7720 MANGO ROMs contains FullUnlock, but it doesn't work as expected there few issues. as well some users got issues with debugging on those ROMs and etc. We will continue work under it
So I will release demo WP7 native application, when we fix issues with FullUnlock.
Demo will be as binary EXE file. And as VS2008 project, which can be good start point for other developers.
Now this thread dedicated for discussion, share ideas and thoughts.
For developers
For developers
(users do not read! danger for brain!)
First of all I want to talk about abilities of native code.
Most applications built in inside WP7 are native. But they don't use usual Dialog UI style, they are using some kind of Silvelight scripts. This kind of UI is called "UIX".
Main idea of UIX that DLL files have UIX resources inside which describe whole UI.
Something similar is used inside CE 7.0 Slivelight - there some xml compiler which make binary data and put them as resources inside DLL. I don't know how to decode this binary data.
Seems Zune desktop application also using this framework.
So UIX used some kind of scripts for UI part and callbacks for all actions.
If we decode this UIX format, we will able to change/modify UI as we want, like it was before with regular resources inside DLL. But UIX must be much more powerful.
We can't use UIX for native application because we don't know how to use it, how to make proper binary data and etc. It's hard to reverse.
But native application can have some GUI with Windows CE style (you can see examples on the photos above)
Another issue: If you call API function "CreateWindowW" you won't see anything on the screen. It seems because shell handle all output, so window doesn't visible.
After some searching I found inside some test ROM nice DLL called "WindowTreeUpdater.dll". After looking inside and decoding functions parameters, it's working!
Basic idea: you create window and call function from this DLL and Window appear on the screen. There seems some kind of proxy engine to output legacy windows on top of shell output.
Nice, it's working...
So we can use usual windows for UI inside native application.
There present standard controls, but they work rather laggy (hey, and looks too).
Basic controls like PushButton, Static, CheckBox, Radiobutton, Icon are working.
About extended controls: (Progress bar, list view, and etc)
they come from Commctrl.dll usually, it was present inside Initial/NODO releases, ut it was removed inside MANGO. I was able to run NODO Commctrl.dll under MANGO after some modifications. But all this controls are shown on screen, but they don't do anything on input. So you can see toolbar, but can't press any button.
CommDlg.dll is missing and never was inside WP7.
There present AYGSHELL.DLL, but most functions are broken. For example, I was not able to create menu bar.
So, a lot of functions are broken, like MessageBox not working.
But we still can create own custom controls and use them for developing.
For example porting TCPMP means that we will need reimplement UI fully - because toolbar doesn't work. slider also won't. Maybe get and reuse some source from ReactOS or NT40 CommCtrl
reserved1reserved1
reserved2reserved2
reserved3reserved3
This is some crazy ****! I like it
for...all...devices!? If possible...damn
I just came...
Holly smoke !!!!!!!!!!!!!!!
Way to go guys....BRAVO... This is a major breakthrough for wp7 dev
Once again well done DFTeam
You guys are beasts...please keep it up
for...all...devices!? If possible...damn
I just came...
Click to expand...
Click to collapse
For now it's only for HTC devices with flashing custom ROM
The UIX/UIB scripts are a real pain.. I tried going through them a while back to change the annoying notification system (10 seconds? Really, Microsoft?) and figured it would all boil down to the usual XML-style script that WM6.5 and other MS products use, but the format is newer and there doesn't seem to be an easy way to decompile them.
From what I do know, however, is that it's more of an encoding than a compilation, and can be decoded if we can figure out what all the different headers mean... but that's a serious reverse engineering project.
Keep it up.is it possible to add Samsung device into support list?
Great work! Are there any multitasking restrictions for these apps? presumably because they are not Silverlight they will not be present in the task switcher & the app will be in charge of when the process terminates?
Looking forward to doing some nice low-level operations - hopefully this will open a whole new world for WP7 dev
Sent from my 7 Pro T7576 using Board Express
That's great,,,Thanks
Cotulla said:
For now it's only for HTC devices with flashing custom ROM
Click to expand...
Click to collapse
Hopefully this will change when you receive the Samsung Focus and try custom ROMs.
Blade0rz said:
Great work! Are there any multitasking restrictions for these apps? presumably because they are not Silverlight they will not be present in the task switcher & the app will be in charge of when the process terminates?
Looking forward to doing some nice low-level operations - hopefully this will open a whole new world for WP7 dev
Sent from my 7 Pro T7576 using Board Express
Click to expand...
Click to collapse
I would suspect that they won't be killed unless there's an Out of Memory issue (you can see the whitelists for that in the registry), because these processes are not like the silverlight/xna apps that are launched in Taskman.exe. Whether they show up in multitask lists, idk, but they probably won't be killed in the traditional way..
but that's a serious reverse engineering project.
Click to expand...
Click to collapse
yes...
maybe it's precompiled XAML scripts, like inside Managed applications?
Great work! Are there any multitasking restrictions for these apps? presumably because they are not Silverlight they will not be present in the task switcher & the app will be in charge of when the process terminates?
Click to expand...
Click to collapse
I would suspect that they won't be killed unless there's an Out of Memory issue (you can see the whitelists for that in the registry), because these processes are not like the silverlight/xna apps that are launched in Taskman.exe. Whether they show up in multitask lists, idk, but they probably won't be killed in the traditional way..
Click to expand...
Click to collapse
Plain EXE can run without restrictions, but I guess it will be killed at OOM condition still. EXE with window seems all a bit more complex. When I press back button it usually disappear after few seconds. I think window got WM_CLOSE or something at that moment. It should be researched more in the future.
Furthermore, I forgot to say: Interesting thing, before MANGO WP7 supports native XAP files too!
There was few files nativeinstaller* which implements native installation. There references inside for setup.dll and _setup.xml like in old CAB files.
But it was removed from MANGO seems
Cotulla said:
For now it's only for HTC devices with flashing custom ROM
Click to expand...
Click to collapse
Would we be able to install an old application like fpsece for windows mobile? One of the biggest things I miss about windows mobile! I get paid today so I will be making a donation for your hard work! I'm currently using your custom rom on my HD7! Thanks again, and keep up the good work!
支持DFT論壇!支持xda-developers!至於你信不信,反正我是信了!
Webserver (for Mango)
Webserver is now supported for Mango devices!
During NoDo this tool was used much for exploring the "\Windows" directory, but when Mango came none could explore it.
There is probably many new things to find in the new OEM Mangos (that could not be extracted till now (Exception's: ROM dumps))
Source code is available in attachment and should build without any problems (except for the dll reference)
- Follow stem 6 for Microsoft.Phone.InteropServices.dll errors
Install XAP => Navigate to the phone's IP shown in application => Browse and enjoy.
- Change password on first launch (its randomized)
Many thanks to davux for creating the base for this tool.
- Orginal NoDo thread Here
Changelog:
v0.1 - Initial Mango version release
v0.2 (iconizer)
- Thanks MarysFetus aka Suicide Clown for the great icon set and start screen, love em
- Many thanks to GoodDayToDie for informing me that this app can / and will run from now without the <"ID_CAP_INTEROPSERVICES">
- Removed old OEM dll's that where not used (xap size: 812 KB => 250 KB)
//fiinix
Nice works my friends... I Like It
Thankx
@fiinix:
Thx for porting the webserver to Mango !
As I remember the initial version from Davux had an on device execute feature.
Do you plan to implement execute feature ?
Could be very useful for exploring all .exe files in the windows folder.
Greetz
contable
Freaking awesome, man!
One suggestion: I don't believe this app does anything that requires ID_CAP_INTEROPSERVICES (that is, it doesn't need to open any driver handles). I may be mistaken about that, of course. If it doesn't, however, there's a real benefit to removing that capability as people with interop-locked phones could then run it. Note that the library used may try to do things requiring interop even though the app doesn't need it to.
In addition to its uses as a hacker's tool, I also want to point out that this app can be used to store files on the phone for easy transfer between computers. It's less convenient than true USB Mass Storage, but it works (even if you don't have the USB cable with you) so long as there's a WiFi access point that the phone and PC can both connect to.
Oh, and by the way, this app will run happily in the background if you use JaxBot's no-dehydrate hack. You can do other things then, even browsing the webserver from the phone's own browser! Of course, it will also use some resources.
Now slimmer, and no ID_CAP_INTEROPSERVICES
OK, this is just a modification of the XAP file - I didn't even recompile the source (thank you so much for including it, though!)
Things I did:
Removed ID_CAP_INTEROPSERVICES from the AppManifest. This will allow the app to be installed on interop-locked phones. It wasn't using it anyhow.
Removed the OEM-specific DLLs that are only useful if you have ID_CAP_INTEROPSERVICES. They weren't being used, but they made the download and install bigger.
Result: A smaller app that works exactly the same and can be installed on any Dev-unlocked Mango phone.
Really neat. Mind if I design some sort of decent icon for this app?
Regards, Suicide Clown
//Update:
finished the Icon:
Hope you like it.
MarysFetus said:
Really neat. Mind if I design some sort of decent icon for this app?
Regards, Suicide Clown
Click to expand...
Click to collapse
Sure, go ahead.
Its the freedom of XDA, do what you want
I added the new NativeIO_Mango.dll to my battery status app instead of the old filesystem.dll. I hope that's okay. Thanks so much for your great libraries.
singularity0821 said:
I added the new NativeIO_Mango.dll to my battery status app instead of the old filesystem.dll. I hope that's okay. Thanks so much for your great libraries.
Click to expand...
Click to collapse
The "NativeIO_Mango.dll" is actually a communicator for "Homebrew.csproj" containing COM+ "IWinSock" and "IFileSystem"
- Homebrew.csproj exists in this projects code.
The battery interop will not talk to NativeIO_Mango.dll (the "Webserver" will tho)
Phone.Battery.GetBatteryAdvanced()
-- goto here
---- DllImportCaller.lib.GetSystemPowerStatusExAdv7(ref str, true);
Homebrew.IO.Directory.GetFiles ( [path] )
-- cctor (static constructor) => Register("NativeIO_Mango.dll", "B0E4E41C-BE1D-4BA2-B8CE-7D632EA1CA37");
---- FileSystem.FindFirstFile ( ... ) & while FileSystem.FindNextFile( ... )
:here
Code:
[COLOR="DeepSkyBlue"]Registrer[/COLOR].Register(BasePath +
[COLOR="RoyalBlue"]#if[/COLOR] RUNNS_UNDER_MANGO
[COLOR="DarkRed"]"DllImportMango.dll"[/COLOR], [COLOR="DarkRed"]"434B816A-3ADA-4386-8421-33B0E669F3F1"[/COLOR]
[COLOR="RoyalBlue"]#else[/COLOR]
[COLOR="Silver"]"FileSystem.dll", "F0D5AFD8-DA24-4e85-9335-BEBCADE5B92A"[/COLOR]
[COLOR="RoyalBlue"]#endif[/COLOR]
);
Filesystem.dll is not used anymore in Mango version (its a NoDo dll)
"Thanks so much for your great libraries."
- Thank you so much
I could swear it didn't work without the filesystem.dll one time I tried haha. I guess that was something else
Thanks~
perfect! Now we'll look for regedit editing & file transfering. Any ideas?
Fiinix this is just amazing work! Because of you, I've need to rewrite a chapter of my thesis
Let me ask some questions regarding the supplied source code:
There are four folders inside the rar archive:
The Lib folder contains all OEM DLLs from Samsung, HTC and LG.
The Homebrew folder contains all old code from davux that is necessary to open up the sockets, files and registry entries (if needed?)
NativeIO_Mango contains your altered native DLL that can be used under Mango
The Webserver folder contains the actual WP7 application, that glues everything together into one nice app.
From the underlying workings:
Davux tried to build an API that resembles C# Sockets from the desktop. This way the C# Webserver project of jgauffin can be reused in the WP7 application. You removed from Davux's NativeIO project the references to all parts that require the native OEM DLLs (which is why GoodDayToDie stripped the unneeded DLL files and removed ID_CAP_INTEROPSERVICE to allow users without interop-unlock to use the app).
If this is so far correct, I'm wondering how some things in this application could work:
Ok, so you've removed the code that allows access to the filesystem and registry which uses the native OEM DLLs. How is it possible, that this application can access folders outside its Isolated Storage??? The application should not be allowed to access the windows folder nor any other folders? I know only of one folder, that should be read/writeable. Its a folder that heathcliff found in the policies, I think it was some kind of log folder. Or is readable access with WM6 native API to all files possible?
In WMAppManifest.xml stands ID_CAP_NETWORKING. This is necessary for navigating between different XAML pages but also necessary if we want to do something with the native network access. Can this capability removed or will the application break?
To sum up, if these assumptions are all correct, the policy system is partly useless from the moment on, where someone is capable to call native code, that does not require ID_CAP_INTEROP. This would theoretically allow a submission to the Marketplace?
Right now, I'm heavily confused and irritated, please explain me my error in thinking
PS: I tried to build the NativeIO_Mango project. I changed to release target and build. However, it exits with error message regarding the missing _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA setting. I've added it, but then I get 19 more errors. Each time it is unresolved external symbol.
Hi Rudelm,
I can't answer exactly what Fiinix did, but I can resolve a couple other points for you.
The OEM DLLs allow higher-than-normal app permissions (breaking out of the low-privilege "sandbox" that apps normally operate in). However, there are a few parts of the filesystem that can be accessed even without them, by design. One of those is the Isolated Storage for the app, which obviously needs to be readable and writable by the app. Another one is the install directory, which only needs to be readable so libraries and resources can be loaded (the webserver app doesn't allow you to browse this folder, but I'm confident that it could if it was coded to). The third is the Windows directory, which is also read-only (and many files and folders within it can't be read) but is similarly required because the app needs to be able to load system libraries (including the TaskHost.exe binary that hosts the app DLL). "Normal" apps can't access these folders simply because the Silverlight API doesn't have a function to open or list an arbitrary location on the filesystem (only within the isostore, which it abstracts the path to).
I don't know what happens if ID_CAP_NETWORKING is removed. It's quite likely the app would break, since that capability may be checked any time the app tries to open a socket (directly as this app does, or indirectly via the Silverlight APIs). You could experiment and do some research to find out, though. It would be interesting to see.
I wouldn't worry too much about apps in the marketplace running amok with native code (even in the low-privileged process, they could still do some harm). The ComBridge Silverlight API that is required to access native code at all is prohibited from use by independent software vendors - only Microsoft and their partners are allowed to use it for Marketplace apps. Somebody tried submitting a Homebrew app to the marketplace (another opportunity for some research, if you'd like to find out more) and discovered that the use of ComBridge is detected and blocked during the submission process.
There we go, a enchanted new version v0.2
- Optimization's from what everybody has told, the best from all worlds
thanks for the explaination!
It seems like a plausible idea that the native code and the WP7 app needs to access some of the folders to work. So the silverlight managed code won't grant access by design to the Windows folder. Can you tell me where this folder for the installation packages is?
Regarding the capabilities: I've checked it with the marketplace capability test tool:
Result Details
[INFORMATION] : Capabilities used by application :
ID_CAP_PUSH_NOTIFICATION
ID_CAP_NETWORKING
ID_CAP_IDENTITY_DEVICE
I've removed ID_CAP_NETWORKING and it immediately stopped working. No dialogue that shows the IP address, only username and password. That is at least good to hear
Regarding the marketplace certification: You could be right, I've also read somewhere that COM is only available to some third parties like Adobe and manufacturers. Maybe I try to submit a little test app that uses interop.
rudelm said:
thanks for the explaination!
It seems like a plausible idea that the native code and the WP7 app needs to access some of the folders to work. So the silverlight managed code won't grant access by design to the Windows folder. Can you tell me where this folder for the installation packages is?
Regarding the capabilities: I've checked it with the marketplace capability test tool:
Result Details
[INFORMATION] : Capabilities used by application :
ID_CAP_PUSH_NOTIFICATION
ID_CAP_NETWORKING
ID_CAP_IDENTITY_DEVICE
I've removed ID_CAP_NETWORKING and it immediately stopped working. No dialogue that shows the IP address, only username and password. That is at least good to hear
Regarding the marketplace certification: You could be right, I've also read somewhere that COM is only available to some third parties like Adobe and manufacturers. Maybe I try to submit a little test app that uses interop.
Click to expand...
Click to collapse
The Capabilities Test only checks through managed code and its caller references (Dll references, method usage within dll)
Why the ID_CAP_NETWORKING is needed is because of the WP7 policy system; ID_CAP_NETWORKING allows usage to those resource locations:
Allowance to "WINSOCK", windows socket API
Code:
<Rule Description="Authorization rule for capability ID_CAP_NETWORKING" ResourceIri="$(GLOBAL_RESOURCES)/WINSOCK/CONNECT" SpeakerAccountId="$(SYSTEM_USER_NAME)" PriorityCategoryId="PRIORITY_STANDARD">
- <Match AccountId="$(CAPMACRO_ID_CAP_NETWORKING)" AuthorizationIds="GENERIC_ALL" />
<Rule Description="Authorization rule for capability ID_CAP_NETWORKING" ResourceIri="$(GLOBAL_RESOURCES)/WINSOCK/LISTEN" SpeakerAccountId="$(SYSTEM_USER_NAME)" PriorityCategoryId="PRIORITY_STANDARD">
- <Match AccountId="$(CAPMACRO_ID_CAP_NETWORKING)" AuthorizationIds="GENERIC_ALL" />
<Rule Description="Authorization rule for capability ID_CAP_NETWORKING" ResourceIri="$(GLOBAL_RESOURCES)/WINSOCK/ACCEPT" SpeakerAccountId="$(SYSTEM_USER_NAME)" PriorityCategoryId="PRIORITY_STANDARD">
- <Match AccountId="$(CAPMACRO_ID_CAP_NETWORKING)" AuthorizationIds="GENERIC_ALL" />
<Rule Description="Authorization rule for capability ID_CAP_NETWORKING" ResourceIri="$(GLOBAL_RESOURCES)/WINSOCK/SERVICE_PROVIDER_CHAIN" SpeakerAccountId="$(SYSTEM_USER_NAME)" PriorityCategoryId="PRIORITY_STANDARD">
- <Match AccountId="$(CAPMACRO_ID_CAP_NETWORKING)" AuthorizationIds="GENERIC_READ" />
"Can you tell me where this folder for the installation packages is?"
\Applications\Install\9bfacecd-c655-4e5b-b024-1e6c2a7456ac\Install\
Nice, thanks for the policy entry. Where did you find it?
Regarding the installation path: I thought you ment a special path to the place where the compressed xap is deployed or something like that before installation. But now it is clearer to me why the application is able to access Windows, installation dir and isolated storage
I've tried to upload a small app with native code but as GoodDayToDie said, the marketplace will see that it contains access to native API and that my account isn't allowed to do that.
So the world is safe again, I'm calmed down now hehe
The policy is from a ROM dump: BasePolicy.xml (Currently got "WP7 Mango Build 7661" dump), i think its this one i downloaded: [DUMP]WP7.1 Build 7661 "Mango"
Some more clearance: \Applications\Install\{ The application Guid }\Install\
- Each application has its own isolation storage:
\Applications\Data\{Guid}\Data\IsolatedStore\
I don't know if it's possible but can you add access to /My Documents?
voluptuary said:
I don't know if it's possible but can you add access to /My Documents?
Click to expand...
Click to collapse
Sorry to say but the basics of this app allows only access to \Windows (dll reference location) as used for extracting of xap files, xml and dll (reverse engineer). You will probably need WP7 Root tools.