Joe Levi:
a cross-discipline, multi-dimensional problem solver who thinks outside the box – but within reality™

Recovering data from your .menc file

It seems that my “What is a .MENC File?” article was HUGELY popular (pulling in around 750 page views per month)! That tells me there are a lot of people that had the same questions that I did:

  1. What on earth is a .MENC file?, and
  2. How do I get my data out of a .MENC file?

So, let’s jump right in…

What on earth is a .MENC file?

Here’s what Microsoft has to say:

What’s with the MENC extension?

The files are stored on disk with a MENC extension – this lets the encryption filter know quickly which files are encrypted and if they match the key on the device. If you put the storage card in a desktop card reader, or put it in another device, you will see that the files have a MENC extension. The point of the extension is that you can’t read those files, so the extension makes it harder for you to try to load those files into an application that won’t be able to read them anyway. We also were able to associate a lock icon with the extension to add an additional hint.

If the encryption filter on the device is able to read and decrypt the files, it hides the MENC extension so the file looks like normal.

Basically, Microsoft introduced a rather novel file encryption technique with Windows Mobile 6 to help keep your data secure in the event of a lost or stolen mobile phone (or storage card). WinMo can use what’s called “Windows Mobile 6 Storage Card Encryption” to encrypt your files so that they can be easily accessed by the unlocked device, but are very secure otherwise.

When you unlock your phone you have access to your internal and external storage just like normal, no delays, no passwords, nada. The OS takes care of the encryption and decryption on the fly, similar to EFS in the desktop version of Windows.

When you remove your storage card and try to read it on a desktop computer, you can’t get into the files, they’re encrypted, and that computer doesn’t have the key (or method) to unlock them.

So, back to the phone, if you can’t unlock the phone (because you don’t know the PIN or password to the device) you can’t access the card. If you hard-reset the phone the encryption key is lost and a new one is generated, so you still don’t have access to the files.

In the scenario it was designed for, the system functions great!


Where it runs into complications is (1) if you want to transfer a bunch of files (images, photos, documents, etc.) off the phone to a desktop computer via a card reader and (2) if you get a new device (or have to hard-reset your old device).

In the first scenario it’s just frustrating, you have to go through a process to get the files onto the desktop/laptop/netbook. In the second scenario, your data is inaccessible, kiss it goodbye.

That leads us to the next question…

How do I get my data out of a .MENC file?

Do you still have access to the phone that you created the file on?

  • If the answer is no, it’s time to cut your losses and mourn over the fact that your data is gone.
  • If you do have access to the phone that created the file, continue on… your adventure is just beginning.

Have you had to hard-reset (or replace) the phone that created the file(s)?

  • If you’ve replaced your phone (warranty replacement, upgrade, etc.) the encryption/decryption keys are no longer the same and your files are inaccessible.
  • If you’ve had to hard-reset (erase everything back to factory defaults), again, the encryption/decryption keys are no longer the same and your files are inaccessible.

So, the other scenario is that you still have access to the phone, and it hasn’t been hard-reset, great! We can probably get your files off! W00T!

But what if you’ve forgotten the PIN or password to the phone? Then what? Well, if you sync with an Exchange Server, you can potentially recover the PIN (and then have access to the files)… Here’s what MSDN has to say about how to do that:

“You can escrow a recovery pin up to the exchange server. Retrieve the recovery pin via OWA and use that to locally reset the password on the device.”

Next thing you need to do is figure out how you want to get your data off. You can email it to yourself, you can use Live Mesh or some other syncing strategy, or if you have an FTP client you could even FTP it somewhere… You could Facebook the pictures… yadda yadda…

But if you want to unencrypt the files and copy them off the memory card, you’re doing to have to turn the storage card encryption off (at least temporarily). Go to Start, Settings, System, Encryption (or someplace similar) and uncheck the “Encrypt files when placed on a storage card” box. Now all NEW files will be in-the-clear, but existing files will still be encrypted. (Don’t forget to toggle this back when you’re done if you want to.)

Next, navigate to your File Explorer, then to your Storage Card. Make a new folder (name it something obvious like “Unencrypted Stuff”). Now, find whatever files you want to unencrypt and move (or copy) them into this folder.

Tada! Your files are no longer encrypted.

You can now pop your storage card out and read them on any other computer (or on any phone for that matter). You also freed up between 8K and 16K per encrypted file.

I’d suggest moving the files back into the folders that you got them from to ensure they’re still accessible by your programs.

You can thank me later™.

Share

You may also like...

20 Responses

  1. renu says:

    Good

  2. Danny says:

    Didn’t work :'( Thanks for the tutorial anyway.

  3. vishalwins says:

    Thanks so much dude.

    Nice work!!
    🙂

  4. Abe says:

    Our corporate policy settings make it a forced mandatory setting for card encryption to be enabled (you cannot turn it off, even temporarily). How else can you pull data from the card? I imagine active sync to a PC may work (haven't tried it yet)…
    Thanks

  5. fordcook says:

    sooo… this sounded great… except i cut/paste the files to my laptop, and then deleted them from the card, moved the card to another (non-encrypted) phone; then i attempted to put the card back in the original handset and copy them back onto the card to attempt salvaging them- no dice.

    any ideas?

  6. joelevi says:

    Glad I could help!

  7. joelevi says:

    ActiveSync over the PC might work, if the Explorer view sees the files as “normal” files (“book.xls” rather than “book.xls.menc”), otherwise, you could email the files to yourself, or obtain an FTP client and upload them to yourself.

  8. joelevi says:

    Put the .menc files back on the original Windows Mobile device and start the steps over again. So long as you still have access to the original device and it hasn't been reset, you should be good to go! Otherwise, all gone, bye bye.

  9. joelevi says:

    Glad I could help!

  10. joelevi says:

    ActiveSync over the PC might work, if the Explorer view sees the files as “normal” files (“book.xls” rather than “book.xls.menc”), otherwise, you could email the files to yourself, or obtain an FTP client and upload them to yourself.

  11. joelevi says:

    Put the .menc files back on the original Windows Mobile device and start the steps over again. So long as you still have access to the original device and it hasn't been reset, you should be good to go! Otherwise, all gone, bye bye.

  12. joelevi says:

    My latest article -> Recovering data from your .menc file http://www.joelevi.com/blog/index.php/20

  13. rentaw says:

    U ARE AWESOME!!! it totally worked!! thank you!!!

  14. sisi says:

    so neat!

  15. Stew says:

    The source files are around 120kb. After I paste the file, the copied file is always 0 bytes.

    Any advice for my situation?

    Thanks in advance.

Leave a Reply