Knock, knock! Who's there?

Dealing with OS and Identity

Playing with Windows Phone 7 as USB Storage

Playing with Windows Phone 7 as USB Storage

  • Comments 4
  • Likes

Disclaimer: Procedures here are fully unsupported. Use at your own risk.

Today I will post about my experiences trying to use Windows Phone 7 as a USB storage device. These “hacks” are already covered at many places and forums dedicated to Zune and Zune HD devices, but not for WP7. As long as I experienced some quirks playing with , I want to share them here.

By default, WP7 is not visible in Windows 7 as a portable device, so it is not possible to transfer files to it except by uploading to SkyDrive or them as attachments to yourself, for example. It is not shown up in “Computer” applet, and in “Devices and Printers” applet it is shown as a portable MP3 player.

imageimage

 

 

 

 

 

 

Enabling device storage visibility in Windows shell

First attempt was modify the following registry key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_045E&PID_04EC&MI_00\6&53be20e&0&0000\Device Parameters]
“PortableDeviceNameSpaceExcludeFromShell”=dword:00000000

Doing so has the following effects (Zune software must be closed for most of the screenshots to show up like as here):

  • WP7 appears (twice) as Portable Media Player in Computer applet. 

image

  • The following additional registry hack helps on removing the duplicate:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_045E&PID_04EC&MI_00\6&53be20e&0&0000\Device Parameters\ZuneDriver]
“UseWpdPrivateInterface”=dword:00000000

 

  • You can inspect some device details.Battery charge is wrongSmile.

image

  • You can see how much space you have free.

image

  • You may format the disk (WARNING: I did not have enough courage to try this, so you are alone here if you do so!)

image

  • You can see some disk details.

image

  • You get “Import pictures and videos” option from device’s context menu (does fail though Sad smile).

imageimage

  • In “Devices and Printers” applet the context menu shows file system browsing option.

image

As covered in other blogs and forums, there are some other registry changes that are in theory needed for content access to work for Zune HD devices, such as:

EnableLegacySupport = dword:00000001
ShowInShell = dword:00000001

However, for me it worked with just the specified setting for WP7 device. I was even able to create a “Documents” folder and add content to it:

image

Unfortunately, documents are not visible to applications on the phone and it only serves as a carry-on device. That is, you can open files for viewing (pictures need to use Open from context menu). When opening files, they are first copied to user’s %Temp% folder, and opened from there. Files in tempo folder are read-only, and save attempts do not update the device copy and trying to save directly to device also fails. The only option is save somewhere else and then copy the updated file back to the device using Windows Explorer.

image

 

A look at “Pictures” folder

When opening the WP7 device storage, you will only see a “Pictures” folder with your pictures and videos. Let’s take a quick look at it.

image

Interesting folder structures:

  • Named folders. The ones you see with normal ones are just synched from your “Pictures” folder, with the folder structure you have in that folder. For example, if you inspect your pictures in your computer with Zune software and drag “%userprofile%\Pictures\Holidays\2010\On The Beach\DSC001.jpg” to the phone icon, you will get “Holidays\2010\On The Beach” folder hierarchy in WP7 storage, and then your JPG file inside. The good thing is that once copied to the WP7 device, you can freely reorganize the folder structure if you do not like having same folder depth or naming as on PC, for example.
  •                 {9ae241c6-e6cc-4080-a2ba-245e0f7c47c5}”. This folder serves as location to save images and videos from WP7 camera.
  •                 {1e544589-04c4-492f-87ca-294a52149279}”. This folder serves as location to save images downloaded from the Internet.
  •                {4915925E-FB2A-11DE-AE1C-DD6355D89593}”. This folder holds sample pictures that come with the device.
  •                 {9ae241c6-e6cc-4080-a2ba-245e0f7c47c6}”. No idea what this empty folder is for yet, it looks empty in my device…. Smile

I don’t know if these GUIDs are global or device-based, as I only plugged my own WP7 device. 
Those spaces on the left are important though. If you rename those GUID’ed folders, you will experience that and it seems impossible to rename them back to the original names with those spaces at the beginning of the folder name. First time I rename one of those, I had to call my “               {4915925E-FB2A-11DE-AE1C-DD6355D89593}” to “Sample Pictures” Winking smile. However, here is how you can get your names back:

  • Create a folder with the desired GUID in a hard disk, i.e. c:\tmp\{4915925E-FB2A-11DE-AE1C-DD6355D89593}”.
  • Using command prompt, rename the folder to add those spaces:

image

  • Drag the folder on the device.

 

 

Trying to disable exclusive access… just fails .. Confused smile

If you launch Zune software with storage opened, you will see the following message:

image

On the same hand, when Zune software is accessing the WP7 device, device storage looks empty.

image

If this is the case, check your favorite task manager for Zune.exe process. Sometimes Zune does not exit in a timely manner and remains opened for a while when you close its window. When Zune.exe is running, the device content cannot be accesed. Just kill existing instances (you may have two sometimes) to get access to storage content again.

Sometimes also even when Zune.exe is not running, storage still looks emtpy and Zune software complains about “Portable Devices Namespace is using your device”. If this happens, you can try kill all Zune.exe instances, unplug the device, launch Zune so it promptf

 

I tried to enable both Explorer shell and Zune software to access the device simultaneously by modifying the following registry key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_045E&PID_04EC&MI_00\6&53be20e&0&0000\Device Parameters\WUDF]
“Exclusive”=dword:00000000

However, this value did not get the desired effect. Unplug/replug the device did not help neither. Nevertheless, I would prefer to leave exclusive access as it is by default, and go kill Zune.exe process when needed, just to avoid chances of data corruption Smile.

 

Different device types

There is an interesting registry value there… “PortableDeviceType”. It says “2” by default. If set to “0” it says “Portable Device”. “1” as “Digital Camera”. “3” as “Mobile Phone”. “4” and up as “Portable Device” again. None of these changes did not help with direct-editing attempts, but Zune software stops seeing it as a WP7 device.

imageimage

image

 

Messing with drivers, Part 1

I have an old MP3 player that shows as portable device by default, and behaves just like WP7 in terms of Windows Explorer usage. I wanted to copy music to my MP3 using robocopy tool. Do do so, it worked to force the device driver from “Portable Device” to “USB Mass Storage Device” and it did the trick perfectly, opening the device storage as a regular USB memory stick. So I wanted to give a try to this with WP7 … unfortunately “USB Mass Storage Device” was not an option, so I tried a few of what showed up as available …

imageimageimage

First attempt: “Windows Mobile-based device”. The driver does not load properly, and unplug/replug the device just updates to WP7 drivers and fixes it. The same happened with “WPD FileSystem Volume Driver”.

image

imageimage

However, “Zune” drivers did load properly. However, Zune software does not recognize the phone properly, and doing the reghacks does not make the device appear in Explorer shell Confused smile.

imageimage

With all these driver hacks, a few interesting registry values appeared: AutoPlaySourceOnly, OptimalTransferSize, ConvertSerialNumberToANSI, DeviceSelectiveSuspended or PortableDeviceIsMassStorage. 

With all this messing, Zune software and Explorer stop viewing the WP7 device Smile.
To get back to work, I had to open regedit as SYSTEM account (used psexec.exe –s –d –i cmd.exe) and delete existing messed “Device Parameters” subkey. Then unplug/replug the device, choose “Update driver” and pick “Windows Phone 7” in Device Manager to reload the right driver and “Device Parameters” subkey values.

image

Once restored original functionality, I gave a try to “PortableDeviceIsMassStorage” value. Though promising, setting to “1” hided the device in Windows shell, and 0 or deleting the value got back to good-old known visibility effects described above.

 

Messing with drivers, Part 2

As messing with drivers from Windows side did not took me to any results, I tried from the WP7 device side. By using MFG tool I changed my WP7 device from “MS COMPOSITE” USB mode (default) to “MS DEFAULT”. For more information about MFG tool, search here Smile.

When plugging the phone back, I got the following:

imageimageimageimage

image

No luck going further… Neither Windows Mobile Device Center nor Zune software can see the device …

 

If you know other/better USB storage tricks, please share them!
Thanks!

Update: There is now a tool that ease the process. You can find its (translated) descriptioin here. Download link here.

Comments
  • Thanks for the thorough investigation, I was able to remove the duplicate Portable Media Player from Computer by following these instructions.

    Also I note that behaviour must differ between brands, my Samsung Focus doesn't bring up the (false) battery status.

    One benefit of enabling your WP7 handset as a portable device is greater video support. You can just change the container of a typical AVI file (to MP4) and it will play quite happily even though Zune software would reject it as an invalid media type. Although it would be great if handsets appeared in the Device Stage as a fully supported device with the ability to drag and drop videos on the fly.

  • Hi.

    did you manage to revert the last change in "Messing with drivers, part 2". I reinstalled my computer, but I'm still not able to connect my WP7-phone. It still loads Microsoft USB sync driver...

    Regards

    Martin

  • I guess your problem now is that Zune does not recognizes your phone.

    This happened to me already, but the fix was simple: Change USB mode back to "MS COMPOSITE" and restart the phone.

    Hope this helps!

  • I actually found that one the other day. thanks!

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment