Any file (from any directory) editing in built-in WP7 Office application - Windows Phone 7 Development and Hacking

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?

Related

Mp3 ringtones , where is the problem ?

I know that on Magician(MDA Compact) we can use mp3 as a ringtone . My question is , why we can't do it on MDA III ? Maybe someone have any idea how to fix it, or maybe we have to add something from MDA Compact rom ? Who knows ??
My Magican lost the MP3 as ringtune function..
Found out that associate .mp3 to Windows Media Player got the funktion back .. Used Resco File Explorer to do it.. but any of Ur file associating tool will do the job..
Dont know if it helped ..
Carlis
ok...so where in Registry with Resco do you make the change?
This would be helpful!
WinCE file associations are managed through the registry - here's something which you might find useful, as it describes what's eneded... It's an article I wrote aimed at those writing installers, but it might be useful.
File Associations in Windows CE
File associations in Windows CE are handled through the registry: there is no "user friendly" way to manage file associations built into the operating system. For example, double click on something with a three letter extension that is not managed, and what do you get? A requester telling you to that there's no application associated with the file type, and that you should "run the application first, then open this file from within the application".
Helpful, eh?
The solution is fairly straightforward, but is best off left to either an installation routine or an application initiation routine as it involves adding entries to the registry.
To associate a file with an application, you need to create four entries in the HKEY_CLASSES_ROOT registry hive:
- a mapping between the extension and class name (ie .xyz to xyzfile)
- a class name with description of what that file type is that will mean something to the user (ie xyzfile to "XYZZY data file"
- A pointer to the default icon to use for the class in explorer
- The command with which to open the file type
As an example, let's show adding the ".z5" (Infocom Story file) extension to a machine to be opened by FrotzCE (an infocom interpreter). The following keys would be needed:
HKCR\.z5 with the default value set to "z5game"
HKCR\z5game with the default value set to "Infocom Story File"
HKCR\z5game\DefaultIcon set to the path to FrotzCE, followed by the icon number to use from the file. As an example "\Program Files\FrotzCE\FrotzCE.exe," will use the first icon in the application
HKCR\z5game\Shell\Open\Command set to the path to FrotzCE with any parameters to pass. The filename is stored in the variable %1%, so something along the lines of '"\program files\frotzce\frotzce.exe" %1'.
The best place to set this up is within a CabWiz installation file. One thing to be aware of is the handling of quote marks within CabWiz, and also of % symbols, which are used for internal variables.
Here's an example from the CabWiz INI file for MagnetiCE, which associates .mag files with the installed application:
[RegSettings]
HKCR,.mag,,,magfile
HKCR,magfile,,,"MagnetiCE Game file"
HKCR,magfile\DefaultIcon,,,"%InstallDir%\MagnetiCE.exe,"
HKCR,magfile\Shell\Open\Command,,,""""%InstallDir%\MagnetiCE.exe"""" %%1

WM6 Registry Hacks (Different to WM5)

Hi guys,
I've been scouring the net and these forums for about 3 days trying to find the registry hack to change the default location of the 'My Documents' folder to my storage card as the reg key normally used (as per the wiki) under WM5 doesnt exist. I also want to do the same with the default ringtone location, changing it to 'My Ringtones' located in the 'My Documents' folder instead of '/windows/rings'.
Maybe we could use this thread to post known WM6 reg hacks that are different to the method used for WM5 which could be of some use to members, including myself, and hoping I get the answer to the ones I mentioned above,
Feel free to add reg hack queries, and any hacks you know of that are WM6 specific.
Enjoy your day,
Neil.
Nobody?
I noticed the same a while back, but since WM6 is not technically even out there, and if it is in very little numbers. Us here included, it might take a little while before we start seeing a load of hacks.
sassenach74 said:
Hi guys,
I've been scouring the net and these forums for about 3 days trying to find the registry hack to change the default location of the 'My Documents' folder to my storage card as the reg key normally used (as per the wiki) under WM5 doesnt exist. I also want to do the same with the default ringtone location, changing it to 'My Ringtones' located in the 'My Documents' folder instead of '/windows/rings'.
Maybe we could use this thread to post known WM6 reg hacks that are different to the method used for WM5 which could be of some use to members, including myself, and hoping I get the answer to the ones I mentioned above,
Feel free to add reg hack queries, and any hacks you know of that are WM6 specific.
Enjoy your day,
Neil.
Click to expand...
Click to collapse
Has anyone found a solution for this yet. My Documents sync path to Storage card
Why don't you just try creating the registry key referenced for WM5? If it doesn't work, you can always delete it...
Guys,
just creating the keys work like a charm
TyTn with black 2.0 was used to test.
Doesn't work for me
I tried creating the hacks as per this thread:
http://wiki.xda-developers.com/index.php?pagename=WM5_Tweaks_Other
But it doesn't work for me - anyone have any ideas?
Found a way to move My Documents ... BUT ...
Found this on:
http://www.inspectmygadget.com/2007/07/17/how-to-hack-your-windows-mobile-registry/
*****************************************************
Change the location of My Documents to the SD Card.
This one is complicated but possible. I had to play around with this one for a while trying and failing with several methods, succeeding with this one. The order in which you do this is essential.
Please ensure that your SD card and My Documents are backed up. It is recommended that you do this on a fresh install of your ROM. This cleared out my “My Documents” folder but I was able to restore it.
1. Reset your device
2. Synchronise your device with your PC
3. Navigate to
“HKLM\System\StorageManager\Profiles\SDMemory“
4. Change the “Folder” key to “My Documents”
5. Rename your original “My Documents” folder to “My Docs”. This is a crucial step, but it does not matter what you name it.
6. Power off and reset your device.
7. Sync your Device
You should see in “File Explorer that your “My Documents” folder has an SD card icon next to it.
Copy your files back into your My Documents.
*****************************************************
Only problem with doing this on an already set up system is that if you have anything installed to your Storage Card, then all the links become invalid - you can resolve this by using Resco Explorer / Total Commander to reset all of the links.
Haven't tried to install any apps after doing this, would be interested in hearing if it still installs there like normal - decided to reset the name to Storage Card, rather than have to remake 200+ links to all the apps / games that are on there - think I'll wait until I remake the system next time!
Bird
Update
Worth doing ... but only on a new install
Backed up my system, then had a go at this - spent an hour in front of the telly changing all the links over to the new addresses, etc.
All seems to work, but a load of little bugs started to occur - all related to where certain software is located, and files that have been installed, and where,etc.
No issues related to the system in general, but I think this method would be best used if you are doing a brand new install - don't even install the EXTROM before you do it and you'll have no problems at all, and no more issuses with the build up of crap on your system. Just don't think it's feasible on an existing build, to many hidden links and file misplacements can occur.
Still - if you backup first, it's worth a try!
Bird
Sorry for digging this up but... will this workaround let you sync with the 'my documents' on the storage card? I'm trying to get this to work but numerous threads say that wm6 can only sync to the my documents on the phone memory.
It can just manage its own my documents. Not the My Documents folder of M$ Windows. So what ever you want to add or update do it there as well.
When you will select the settings for Sync, select files and it will make a shortcut on your desktop for the folder of my documents of your device that is available on your PC also.
I found a simple solution on the net
I found this simple solution on the net:
1. Create a subfolder called "My Documents" in your Storage Card folder.
2. Copy the contents of \My Documents to \Storage Card\My Documents
3. Delete \My Documents
4. Open a text editor and paste the following text into a new document: 33#"\Storage Card\My Documents"
5. Save this as "My Documents.lnk"
6. Copy this to the root of your WM6 device
http://social.microsoft.com/Forums/en-US/windowsmobile/thread/df005e15-7116-43a8-aeb5-3e0122442487
Internetpo said:
I found this simple solution on the net:
1. Create a subfolder called "My Documents" in your Storage Card folder.
2. Copy the contents of \My Documents to \Storage Card\My Documents
3. Delete \My Documents
4. Open a text editor and paste the following text into a new document: 33#"\Storage Card\My Documents"
5. Save this as "My Documents.lnk"
6. Copy this to the root of your WM6 device
http://social.microsoft.com/Forums/en-US/windowsmobile/thread/df005e15-7116-43a8-aeb5-3e0122442487
Click to expand...
Click to collapse
After sync with PC, the folder "My Document" will automatically created again in root folder and the files in \Storage Card\My Document" can not sync with pc

importing registry keys

hey guys, after miri's recent v19 rom release, i've got to the point where manually reinstalling stuff is getting more of a chore than a pleasure, so i've been playing around with sdconfig.txt and self-built .cab files...
however, there are some things i cant configure due to them being in the registry.
so far this is what ive done:
- used 'CeRegEditor' to capture the active registry (both stock rom, and fully configured the way i want it to be)
- compared the 2 files, and saved the output to another file
- copied this file (i've tried both .cereg, and .reg formats) to sd card, and attempted to run. when executed from my HD, the file format is unrecognised and will not import the registry values.
so, what have i missed? why wont a .cereg or .reg file 'install' on my HD?
the idea is to have this registry file in the sdconfig.txt (or a cab, and exec'd from sdconfig.txt), so on hard reset it is a completely 'hands-off' re-install.
Create a Cab file. You can create Cab files that only install registry settings. Take the '2_Way_Plus_InCall_Recording' cab file and build upon that maybe. Edit the '_Setup.xml' to include your registry settings and then you can install them just as you would install a Cab file.
How many registry setting do you want to change?
.reg file is 260 line file - 25kb.
while there seems to be a limit on what the registry is holding, it is configuring some of the more simplier and silly things...
- Device name
- Owner info
- Manila Weather
- power settings
- 'changescreen' app settings (app found on these forums)
- 'HD tweak' app settings (again, found on these forums)
at this point in time, it's more of a proof of concept, rather than finalized version. now i know how to get things working, i can fine tune the reg settings and provision my phone.
it seems 'ceregedit' does not correctly convert reg > XML (or reg > CAB).
however, i found another tool called 'SDConfigGen', which does correctly convert reg > XML. i've been able to use the XML in my sdconfig.txt, which is what i wanted!
while the above reg keys work, it's not an exact build of how i had my phone before...
there are some things i would like to automatically configure:
- pre-configured Wifi profiles (theres maybe 4 AP's i use)
- automatically set 'touchflo 3d' as the default theme.
- a complete hands-off install. (things like pre-setup the HTC auto-configure "sim card change")
- automatically accept a security certificate from our activesync server (i have activesync config in a .cab file, but it requires you to manually click 'yes' to the security cert install box)
im sure a google will help with a few points above!
Ok I'm not sure if you program at all or if this would really easy your pain much but you can download a trial version of Visual Studio 2008. It has a project option to build cab files for ppc devices. Might be worth a look if you have a lot of keys to do. Its not much better than doing them by hand though. I've included a screen shot of VS doing it so you can see. BTW its obviously been scrunched up.
Try this
veehexx said:
hey guys, after miri's recent v19 rom release, i've got to the point where manually reinstalling stuff is getting more of a chore than a pleasure, so i've been playing around with sdconfig.txt and self-built .cab files...
however, there are some things i cant configure due to them being in the registry.
so far this is what ive done:
- used 'CeRegEditor' to capture the active registry (both stock rom, and fully configured the way i want it to be)
- compared the 2 files, and saved the output to another file
- copied this file (i've tried both .cereg, and .reg formats) to sd card, and attempted to run. when executed from my HD, the file format is unrecognised and will not import the registry values.
so, what have i missed? why wont a .cereg or .reg file 'install' on my HD?
the idea is to have this registry file in the sdconfig.txt (or a cab, and exec'd from sdconfig.txt), so on hard reset it is a completely 'hands-off' re-install.
Click to expand...
Click to collapse
I used this to do what your trying to do, it will not import .reg files on the trial version but theres an older version on piratebay that will:
Heres a link to a trial for 30 days: http://www.ocpsoftware.com/products.php?nm=cecabmgr
SDConfig Builder
Hi,
try SDConfig Builder

[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

Categories

Resources