简体   繁体   中英

access windows 10 mobile root files and folders

I have a Windows 10 universal app that is running on a Windows 10 Mobile device. I noticed from the Windows 10 Mobile device, it does have a file explorer but it limits you to only see certain "Known Folders" such as music, documents, downloads, etc... and that is all.

Furthermore, when I plug the device into my development machine via USB, I can browse the device but again, only the Known Folders above.

In my app, I am writing to a log file and that log file is stored to LocalStorage, under a folder for my app name, for example:

 var dataPath = ApplicationData.Current.LocalFolder.Path;

I simply need to browse MY LOG FILE, that MY APP CREATES, in MY APP FOLDER. I read about a ton of, in my opinion hacks, to get access to this file/folder. For example, there are some third party applications that still mainly claim to target Windows Phone 8/8.1 but will still technically work for 10 such as:

Windows Phone Power Tools Isolated storage spy etc....

Then I also read articles on how to use a file in Pictures (or voice recording) and go to file properties to then gain access to the root or to create a root shortcut on the development machine and copy it to the mobile device, however, these are typically a year or more old and no longer work on my device (I suspect MS patched these hacks).

So, all that said, I would like to see a good way to access the root drive for development, or at least my app folder in the LocalFolder so I can access my files (such as logs or the sqlite db file). Maybe there is a way already but my google searches haven't turned anything up just yet.

Thanks!

As you've known, we can use some third party tools like IsoStoreSpy or Windows Phone Power Tools to access Isolated Storage. Although they are designed for Windows Phone 8 & 8.1, but they can also be used for Windows 10 Mobile. With these two tools, we can access LocalFolder , TemporaryFolder and RoamingFolder . For more info, see similar question: Accessing storage of simulator/device while debugging .

Besides these third party tools, there is also build-in support in Windows 10. We can use App File Explorer to view and manipulate files stored by your sideloaded apps. This is a new, cross-platform version of the Isolated Storage Explorer from Windows Phone 8.1. This tool should be able to work no matter your application is deployed in Debug mode or Release mode. But please note that this is a new tool added to Windows Device Portal in the Anniversary Update .

To use this feature, we must enable Device discovery and Device Portal . Then we can access application storage in web browser like following:
在此处输入图片说明

For more info, please see Device Portal for Mobile and Using the App File Explorer to see your app data . Also the similar question: Windows 10 Mobile: how can I see inside on my app folder? might be helpful.

I had a similar problem to solve few months back. I ended up doing two things:

  1. I've implemented a 'Send Logs' button in settings that would upload logs to a ftp server. Actually it was a bit more than that, all installations of this app were managed by a central server and there was 'Get logs' button on the server side that would send request via push channel to the device to get the logs.
  2. Got my hands on a Interop-unlocked device that I would use if the app was in a state that would make first option not possible.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM