zunezmdb.mobile.dll - Windows Phone 7 Development and Hacking

Hmmm... I just found some really neat things in the zunezmdb.mobile.dll found in the zune desktop folder:
FreeLibraryòEnterCriticalSectionA
GetFileSizeÃ
ReadFileCreateFileWe
MoveFileWb
FoldStringW
RegCloseKeya
RegOpenKeyExWn
RegQueryValueExWd
RegOpenKeyW´
If we can deploy a provxml to the root directory (or even keep it in the ISO store) and then use this dll to copy the file to \windows (or overwrite) we might be able to unlock ANY device.
I suck at calling dlls over COM so I was hoping that someone here can.
Thanks!

These functions you describe are imported functions that are used on the desktop computer. These are not performed on the WP7 device. Unfortunately, I don't think this is of any value.
Ciao,
Heathcliff74

Related

[Q] File copy (native) fo rWP7?

Has anyone whipped up a native filecopy app that can copy files to and from a Windows Phone 7 retail device to/from any directory?
TouchXplorer for HTC phones does something like this. My Webserver will let you copy some files on/off the phone, but there are limitations.
obelix said:
Has anyone whipped up a native filecopy app that can copy files to and from a Windows Phone 7 retail device to/from any directory?
Click to expand...
Click to collapse
Without using HTCs COM DLLs, and without hacking apart the security mechanisms, I don't think this will be possible.
Unsigned COM DLLs can't get full filesystem access (I'm fairly sure you can only access the \Windows dir). Using an idea like davuxs webserver, you could in theory get any file you can get read access to onto a desktop, but that still limits you to \Windows.
Either, the entire security mechanism needs to be altered to our needs (like the way you can patch all certificate checks out of WM6.5 with an alteration to the XIP) or someone needs to "accidentally" find access to the right certificate.
It was worth a shot. With so many threads discussing progress in gaining access to the file system I wasn't clear where the security boundaries were.
I'm on a Samsung Focus (i917) which is popular in the US and while FileBrowser.exe is accessible, its very limited in functionality.
Plus I'm not sure anyone has figured out yet how to copy files between the desktop and device over USB.
Ideally at soem point there would be a way to not only explore the entire file system but also be able to copy programs to the device and be able to execute and run/install those native apps.
obelix said:
It was worth a shot. With so many threads discussing progress in gaining access to the file system I wasn't clear where the security boundaries were.
I'm on a Samsung Focus (i917) which is popular in the US and while FileBrowser.exe is accessible, its very limited in functionality.
Plus I'm not sure anyone has figured out yet how to copy files between the desktop and device over USB.
Ideally at soem point there would be a way to not only explore the entire file system but also be able to copy programs to the device and be able to execute and run/install those native apps.
Click to expand...
Click to collapse
I think (I'm digging through it now) that the MS developer tools would let us do a file transfer over USB (I've got XAP deployment, but there's a function for that, but it uses some lower level things internally).
But that doesn't give on device file system access, and is using MS frameworks entirely.

[GUIDE] Deploy files to your dev-unlocked WP7 device!

There are many possible situations where you want to deploy some files to a certain folder on your phone. Copying music, ringtones, provxml, etc. This can be difficult if you don't have a working file-explorer for your device.
This method will let you deploy files to your developer-unlocked WP7 device, as long as it is developer-unlocked. It works on any brand and any version of Windows. It also works if you have Mango and your device is Interop-Locked. You won't be able to overwrite ROM-files!
At first I thought this method had access to all folder on the phone. Unfortunately that does not seem to be true. When I tested this, I thought I had removed all policies I added to get root-access on my device. This was not true, so when I tested this I had more access than on a regular WP7 device. It is still possible to write to the root-folder, create new folders in the root-folder, "My Documents", "Applications", etc. Unfortunately it does not seem to be possible to write to \Windows.
Follow these instructions:
1. Download this file: File Deployer by Heathcliff74 v2.xap.
2. Open your favorite archiver (WinZip / WinRar / 7Zip).
3. In the archiver open the xap file.
4. In Windows Explorer (or on your desktop) create the folder structure where you want to deploy files on your phone. So if you want to copy files to the \My Documents\My Ringtones, then first create a folder "My Documents" and in that folder create a folder "My Documents".
5. Put the files you want to deploy in the folders you created.
6. Rename the root-folders you created and add this at the start:
XX-XX-XX-XX-
It must be exactly like that! Only do this for the root-folders. So in the example I gave, the "My Documents" folder will become "XX-XX-XX-XX-My Documents". The deeper folders, like "My Ringtones" will remain as they are.
7. Drag the folders into the xap-archive.
8. Close the archiver tool.
9. Open the xap-file in a hex-editor.
10. Search and replace these hex-values (all occurrences!!):
Search: 58 58 2D 58 58 2D 58 58 2D 58 58 2D
Replace with: 2E 2E 2F 2E 2E 2F 2E 2E 2F 2E 2E 2F
11. Save and close the hex-editor.
12. Use any Windows Phone App Deployer to deploy the contents of the xap-file to your phone.
Hope this works for you!
Good luck,
Heathcliff74
Heathcliff74 said:
Hope this works for you!
Good luck,
Heathcliff74
Click to expand...
Click to collapse
beautiful, I wonder if somebody can write this into a program. the program asks which folders, which folders are root and what files to transfer. then does the rest (creates the folder structure, renaming, packaging, hex replacing) and spits out the xap ready for deployment. I know that I will screw this up with all the xes and hex replacements
too bad I can't program
This is not working as expected. It seemed I had some policies in place, that allowed me to do more than on a 'normal' WP7 device. It does still seem to work for a lot of folders, like the root-folder, "My Documents", "Applications", etc. But it does not work for the "Windows" folder. Too bad I will update the opening post with this info.
I will also update the xap, because not all archivers did handle the xap well. That should be fixed with the new xap.
Ciao,
Heathcliff74
if it can write to \Windows.Many people can fix Interop-Locked device.
LOL! I'm surprised the deployment system accepts ../ paths, and that it ignores the ZIP CRC checks that obviously become invalid when you hex-edit that stuff. Good find!
Arktronic said:
LOL! I'm surprised the deployment system accepts ../ paths, and that it ignores the ZIP CRC checks that obviously become invalid when you hex-edit that stuff. Good find!
Click to expand...
Click to collapse
Finding exploits is always about finding things a system accepts that it really shouldn't accept
The zip crc's are only on the file-contents, not on the folder-structures and headers.
Ciao,
Heathcliff74
I suppose I should have looked up the ZIP specs before jumping to conclusions
does this means we can deploy a Provxml to a Dell Venue Pro? If so maybe we find a way to execute said provxml once it is on device?
good work, Heathcliff74
Finally i could add some roms for wj7 finally the server bla bla doesbt work , thx good work and im waiting happily for wp7 root tools for LG maybe there is a way to send files to \Windows with update cabs http://forum.xda-developers.com/showthread.php?t=1248799 so if sb cheks the code you could ad it to wp7 root tools ^^
Hi
i need to know exact path ?? i used same method and this file was deployed to my surround but i did not fine those apps into my phone ?
please tell me correct way ?
br
derausgewanderte said:
beautiful, I wonder if somebody can write this into a program. the program asks which folders, which folders are root and what files to transfer. then does the rest (creates the folder structure, renaming, packaging, hex replacing) and spits out the xap ready for deployment. I know that I will screw this up with all the xes and hex replacements
too bad I can't program
Click to expand...
Click to collapse
If anybody would let me I can have a try... I just need to modify the code from my other app... I'll start tomorrow.
can anyone suggest an app that can browse the folders on my phone? No need to have write access, just read. I just need to have the path of the Isolated Storage folder for the Kindle application. I want to deploy my .mobi ebooks into my phone.
No such app exists, aside from the HTC filesystem browsers (TouchXplorer, Advanced Explorer, WPDM on the PC) and WP7 Root Tools (currently Samsung gen1 only). Apps don't have the required permissions by themselves even to do read operations on the majority of the filesystem.
However, if you just need the path to an app's IsoStore, it's \Applications\Data\<ProductIdGuid>\Data\IsolatedStore. For Kindle, the GUID is 48195FB4-EE0E-E011-9264-00237DE2DB9E (as in, \Applications\Data\48195FB4-EE0E-E011-9264-00237DE2DB9E\Data\IsolatedStore\). I don't know how the app organizes its files within that folder, though.
can you confirm if the kindle isolated storage path is "\Applications\Data\<ProductIdGuid>\Data\IsolatedStore" or is it "\IsolatedStorage"?
One last thing, If I decide to uninstall the XAP, will all of the files also gets removed?
It's IsolatedStore. Also, uninstalling an app does not remove files deployed this way.
Sent from my HD7 using XDA Windows Phone 7 App
Heathcliff74 said:
Finding exploits is always about finding things a system accepts that it really shouldn't accept
The zip crc's are only on the file-contents, not on the folder-structures and headers.
Ciao,
Heathcliff74
Click to expand...
Click to collapse
how did you become so good at finding exploits in wp7?
I'm trying to use this way to transfer game saves. But it always says something like "The group policy blocks this app."
Can someone confirm this deploy method still valid under the following circurstances?
- System version 8107
- app IsolatedStore, i.e. \Applications\Data\<guid>\Data\IsolatedStore
- app is deployed by Marketplace
You can't install homebrew (unsigned) XAP files with the same GUID as installed Marketplace apps. You also can't use IsolatedStorageExplorer or anything built on it on Marketplace apps (or their data, rather) - it will give you that "group policy" error if you try.
However, the deployer hack should work fine for adding or replacing files in a Marketplace app if the GUID used for the deployment "app" is different.
GoodDayToDie said:
You can't install homebrew (unsigned) XAP files with the same GUID as installed Marketplace apps. You also can't use IsolatedStorageExplorer or anything built on it on Marketplace apps (or their data, rather) - it will give you that "group policy" error if you try.
However, the deployer hack should work fine for adding or replacing files in a Marketplace app if the GUID used for the deployment "app" is different.
Click to expand...
Click to collapse
Well, now I can't replace any file under \Application using the deployment "app".
The file I'm trying to deploy.
\Applications\Data\788c002f-5649-e011-854c-00237de2db9e\Data\IsolatedStore\game.sav

[URGENT] NEED APPLICATION TO DEPLOY TO \Windows FOLDER

This is an urgent plea as I have found a way to enable SIM Toolkit (a.k.a SIM applications) on all phones but I need someone with a 2nd Gen Device to attach or link the file STK_Application_01.provxml here to confirm the fix (You can use Windows Phone Device Manager 1.9.0.0) and I also need a way to send files to \Windows folder as WPDM will just send it to \My Documents folder
You might be able to send a file to the Windows folder using provxml (via something similar to WindowBreak) on a second-gen Samsung. Otherwise, writing to the Windows folder on second-gen is currently not possible.
To build the provxml file that will move or copy your file to the \Windows folder, this MSDN documentation may help: http://msdn.microsoft.com/en-us/embedded/gg155022
For first-gen phones, there are a number of apps and also ways to use provxml, of course.
Thread Closed​
Please only post development threads in this section​

Any file (from any directory) editing in built-in WP7 Office application

Hi friends. My trying to open file from any (not user) directory, or saving to another place as "My Documents" from buit-in pword.exe has still no success. I cannot solve this problem exactly, the I use temporary copy of file to "My Documents" subdirectory, changing file privilegies, and copying edited file to original path. This way is used automaticky in my Phone Commander beta version http://forum.xda-developers.com/showthread.php?p=28732620#post28732620 , it is working now on fully unlocked systems only. Write, please, your experience and opinion about using built-in Microsoft Office or another apps to discovering and changing WP7 system parts on device. I plane also GCC and GCS port for WP7 (for really quick and usable on-device programming), but writing own text editor may be too long work. I mean hack of built-in Word to be able do syntax-hilighting etc. may be first simply way. M.
XAML problem
When editing XAML, PWord show everything right, but for saving uses Win 1251 (on my Czech localisation) instead unicode. Then, after editing system apps are not able to read edited XAML files. Exists way to save from PWord in unicode, or is necessary to write own texteditor, or is somebody (Ultrashoot?) able to redesign any good WM texteditor for WP7?

Manual backup of XAPs, Favorites. Download RAR, Cab, 7z files. Full ZIP files

Hi everyone,
I'm posting a method today which i use to backup my XAP files and favorites. I hope that they will help others too and I'm posting some other tips too which i gathered around from the web and XDA. I will be constantly updating this post.
Most of the tips I've provided here are only for Fully Unlocked Phones
Backup .XAP files downloaded from Zune Marketplace
Access your phone's files using any File manager FileBrowser by ego zheng, Unique File Manager by Mohsen Unique Or TouchXplorer by julien Schapman.
Both FileBrowser and Unique file manager can open XAP files but TouchXplorer will throw an exception.
Open FileBrowser and Goto /My documents/Zune/PimentoCache/Lib/
There should be numerically named folders containing cached XAP files but with .ZMZ extension which will look like this
app0b792c7c-14dc-df11-a844.zmz Copy those files to another folder and rename the extension ZMZ to XAP. You should keep in mind that PimentoCache folder gets cleared after every few days. So you have to copy those files as soon as you've downloaded from the marketplace.
You MUST have XAPdeployer by Ultrashot installed for the following trick to work.
If you want to open ZMZ files in the FileBrowser to see which ones you are copying or renaming. Launch Registry Editor by Julien Schapman open HKEY_CLASSES_ROOT create a new key .ZMZ open .ZMZ and create a new String value "Default" enter "xapdeployerfile" in the value and tap OK. Now you can open ZMZ files in the file browser.
Backup XAP files downloaded with Bazaar App
Using Phone's file manager Or Windows Explorer on computer Goto
Application\Data\9daf0fc-a0ee-4cfc-905a-cc812d678a35\Data\IsolatedStorage
all homebrew XAPs downloaded from Bazaar will be in this folder.
Backup XAP files downloaded with wPhoManager
If you download files with wPhoManager from W.I.N.C.O marketplace all the XAPs downloaded will be in
Applications\Data\8A011F29-D5A3-4942-B865-71198AAB94AE\Data\IsolatedStorage
Screen Goes Blank during Incoming/Outgoing calls
I had this problem sometime ago when my HD7 fell real hard and started giving these problems. So I searched the web and found this solution from some website. If you are having problems (Blank screen and inaccessible phone) while incoming/outgoing calls it has to do with the proximity sensor. It goes out of alignment and that results in the black screen during the call. While the call is active, since the screen is essentially turned off by the proximity sensor, I can’t use the keypad or even hang up the call!
The fix is to press down hard on the area where the proximity sensor is. It’s located at the top of the screen – pretty much where the HTC logo is. Just press hard on that area and that should move the sensor back into place.
Backup Internet explorer's Favorites
Browse to /Windows/Favourites and copy all the content to a folder of your choice. Put them back in after you've reset your phone or installed a new firmware. You can also use IE fav Backup by Sh4d0w86 that's also a pretty good app for doing this task.
Saved Office mobile files OR copy Documents from computer to phone
All your Word, Excel, Powerpoint files you saved on your phone are stored in My documents. If you have files in your computer and you want them on your phone. Just copy all those to My documents and they will be in your files list.
Record incoming/outgoing calls complete with environmental effects
This trick does not even need any sort of unlock. Call any number on speaker and press the camera button Switch to Video Recording mode and tap Record. Your call will be recorded in a video use VirtualDub(or any other audio extraction software) to extract the audio and Audacity to reduce environmental effects if there are any.
ZIP files
By default downloaded ZIP file's content (Which can open by default in Windows Phone 7)is in Applications/Volatile/ZipView/(This folder gets deleted when you close the ZIP file, So you have to keep the ZIP file open until you've copied). but the limitation is that you have to open each file individually. But if you want to download the complete file without any content limitation. Do the following method :-
»Open your file manager on your phone OR windows explorer on PC.
»Goto \Windows\Profiles\Guest\Temporary Internet Files\
»There should be folders with names like 9FADAF33, Q110E4PZ, U0GWIYEF and U2QKY63D(exact names can differ)
»Your downloaded ZIP file will be in one of these four folders.
»Copy/Paste downloaded ZIP file to another location where you keep your files.
This method is helpful if you are downloading ZIP files which contains DLLs, EXE or any other format files which WP7 cannot open.
Download WinRar, CAB, 7Z files
Windows phone 7 does not recognize these file types so it will not download these files if you want to. With the following tip you can download these files to your phone.
»Start your phone's Registry Editor and tap HKEY_CLASSES_ROOT
»Create three new keys .Rar, .cab, .7z
»Open each key and create String "Default" with "Zipfile" as a value
»Now you can download Winrar, 7Zip, and CAB files in Internet Explorer.
If any of the above tips helps u out a little please hit thanx or reply if you have any question or suggestion.
I will add shortly:
xap handler = new registry key HKCR/.zmz and string value: Default -xapfile
unique file manager extract zipfile
Download WinRar, CAB, 7Z files
Windows phone 7 does not recognize these file types so it will not download these files if you want to. With the following tip you can download these files to your phone.
»Start your phone's Registry Editor and tap HKEY_CLASSES_ROOT
»Create three new keys .Rar, .cab, .7z
»Open each key and create String "Default" with "Zipfile" as a value
»Now you can download Winrar, 7Zip, and CAB files in Internet Explorer.
If any of the above tips helps u out a little please hit thanx or reply if you have any question or suggestion.[/QUOTE]
Thanks for the valuable info.
Great job
It did and did not work
The rar file can be downloaded, but wp7 cannot read it or recognize it, it shows corrupted file or unreadable file by the system.
It seems we need rar code to be native so we will be to open rar files.
meover said:
Download WinRar, CAB, 7Z files
Windows phone 7 does not recognize these file types so it will not download these files if you want to. With the following tip you can download these files to your phone.
»Start your phone's Registry Editor and tap HKEY_CLASSES_ROOT
»Create three new keys .Rar, .cab, .7z
»Open each key and create String "Default" with "Zipfile" as a value
»Now you can download Winrar, 7Zip, and CAB files in Internet Explorer.
If any of the above tips helps u out a little please hit thanx or reply if you have any question or suggestion.
Click to expand...
Click to collapse
Thanks for the valuable info.
Great job
It did and did not work
The rar file can be downloaded, but wp7 cannot read it or recognize it, it shows corrupted file or unreadable file by the system.
It seems we need rar code to be native so we will be to open rar files.
Click to expand...
Click to collapse
The reason why i posted that registry key wasn't to open RAR files but to download them on your phone so you can copy that file to your computer. Because sometimes the content you wanna download is in RAR format.
jashd7 said:
Thanks for the valuable info.
Great job
It did and did not work
The rar file can be downloaded, but wp7 cannot read it or recognize it, it shows corrupted file or unreadable file by the system.
It seems we need rar code to be native so we will be to open rar files.
Click to expand...
Click to collapse
The reason why i posted that registry key wasn't to open RAR files but to download them on your phone so you can copy that file to your computer. Because sometimes the content you wanna download is in RAR format[/QUOTE]
thanks again, really great job.
I see.
But I hope we can:
Open rar file and extract content like PDF, media file, etc.
I really need 2 task:
Open PDF file within the browser.
Can print the PDF over wireless printer.
they are not accomplished missions yet
meover said:
The reason why i posted that registry key wasn't to open RAR files but to download them on your phone so you can copy that file to your computer. Because sometimes the content you wanna download is in RAR format
Click to expand...
Click to collapse
thanks again, really great job.
I see.
But I hope we can:
Open rar file and extract content like PDF, media file, etc.
I really need 2 task:
Open PDF file within the browser.
Can print the PDF over wireless printer.
they are not accomplished missions yet [/QUOTE]
i hope too but WP7 is closed like a fort, it's not developer friendly and it's really hard and time consuming to do modifications or add new features. You can put some minor things here and there but nothing too big.
Hello!
I copied and moved some .zmz file in my pc.
I renamed them in .xap and tried to deploy them into my HTC 7 Pro with Dynamics 1.21 ROM.
I tried with WPH Xap Deployer, wf Phone Tools and Phone7Deployer, but I only got errors (failed to open the manifest file. This may not be a valid xap).
I suppose this should be related to app encription...
So now, also without Reinstaller working, if we make whatever can delete the apps from the phone, we will have to pass through the marketplace, with app list opened on Zune on our pc... :crying:
Otherwise, a way could be:
1) to know an app's guid, i.e. with cache clearer
2) use a storage explorer on pc, like windows phone device manager and go to
application/Install/(application guid);
3) copy that folder into pc
4) right click on the folder to create a zip file
5) change the extension of the zip file to xap (you can do it at the end, there
some softwares for file renaming...)
A long way if you have some tenth apps installed...
lordmago said:
Hello!
I copied and moved some .zmz file in my pc.
I renamed them in .xap and tried to deploy them into my HTC 7 Pro with Dynamics 1.21 ROM.
I tried with WPH Xap Deployer, wf Phone Tools and Phone7Deployer, but I only got errors (failed to open the manifest file. This may not be a valid xap).
I suppose this should be related to app encription...
So now, also without Reinstaller working, if we make whatever can delete the apps from the phone, we will have to pass through the marketplace, with app list opened on Zune on our pc... :crying:
Otherwise, a way could be:
1) to know an app's guid, i.e. with cache clearer
2) use a storage explorer on pc, like windows phone device manager and go to
application/Install/(application guid);
3) copy that folder into pc
4) right click on the folder to create a zip file
5) change the extension of the zip file to xap (you can do it at the end, there
some softwares for file renaming...)
A long way if you have some tenth apps installed...
Click to expand...
Click to collapse
You are right about apps encryption. Microsoft recently encrypted all their XAPs on marketplace.
jashd7 said:
You are right about apps encryption. Microsoft recently encrypted all their XAPs on marketplace.
Click to expand...
Click to collapse
Nonetheless, if we've got encrypted XAPs specific to our devices, we ought to be able to install them on the device somehow from within the device. We'd just need to initiate the install routine. Does anyone know how to do this?
Thanks
What I am interested in, is a way to take my games save states and back them up. I'm sick of restarting Angery Birds every time I flash my phone. lol Rest of this is super interesting stuff though.
TheXev said:
What I am interested in, is a way to take my games save states and back them up. I'm sick of restarting Angery Birds every time I flash my phone. lol Rest of this is super interesting stuff though.
Click to expand...
Click to collapse
Did you try to look into the Angry Birds folders in your device if it saves something,
for example using FileBrowser (http://forum.xda-developers.com/showthread.php?t=1544399) or Webserver from GoodDayToDie?
If there's something there, you should be able to copy your states in your pc and put them back in your device, I think...
TheXev said:
What I am interested in, is a way to take my games save states and back them up. I'm sick of restarting Angery Birds every time I flash my phone. lol Rest of this is super interesting stuff though.
Click to expand...
Click to collapse
You can use Program Manager by ego Zheng to backup your angry birds settings. You just have to put your saved settings in your angry birds folder after you've flashed.
Here's the link to program manager
http://forum.xda-developers.com/showthread.php?t=1922454
Your saved XAP files will be in Applications\Data\12345678-87bf-4d87-a529-0dff41efd592\Data\IsolatedStore\Xap
Your Data backups will be in \Applications\Data\12345678-87bf-4d87-a529-0dff41efd592\Data\IsolatedStore\Data

Categories

Resources