Contrary to a lot of advice on the Internet, the Zune HD can be used in Linux. Support has been integrated into libmtp for the mtpz protocol thanks to some awesome work by Sajid Anwar.
libmtp however, does not and will not contain the encryption keys required, so it will seem like the Zune isn’t recognised. Running mtp-detect on the command line gives
shane@ratbert:~$ mtp-detect
Unable to open ~/.mtpz-data for reading, MTPZ disabled.libmtp version: 1.1.6
Listing raw device(s)
Device 0 (VID=045e and PID=063e) is a Microsoft Zune HD.
Found 1 device(s):
Microsoft: Zune HD (045e:063e) @ bus 1, dev 6
It’s simple to get this to work however.
Just create a file in your home directory called .mtpz-data and add to it the following string of numbers. This is the encryption key needed to interface with the Zune.
Now, run mtp-detect and you should see the encrypted handshake take place, gmtp, Clementine, Rhythmbox and any media player that supports mtp should now be able to copy music to and from the Zune HD.
cotko
April 10, 2014 — 2:27 am
Thank you!!! 🙂
El Pato
May 6, 2014 — 4:33 am
Awesome! Sajid Anwar is my new hero, I’ve been wanting this for years!
And thank you for the keys as well 🙂
MB
July 9, 2014 — 4:59 am
I’m having trouble figuring out how to integrate mtpz with libmtp. I downloaded the mtpz zip from github but I’m not sure what to do with it. Could you explain it to me or point me toward a guide? Thank you.
shane
July 9, 2014 — 9:58 am
If you install libmtp, mtpz is already integrated. You don’t need to download anything from the GitHub.
Subhamoy
September 4, 2014 — 8:35 pm
This method is not really working for me. After the encryption key is in place, I open Clementine and see my ZuneHD in unmounted state. I double click on it, and get an option to ‘open device’. Clementine asks me to ‘connect’ the device, because this is the first time I would be using it, and then it keeps syncing at 0% forever and ever. Tried with Ubuntu 13.10 and Xubuntu 14.04. Any suggestions?
Subhamoy
September 4, 2014 — 9:11 pm
It seems like I am getting an error caused by the well known Libgcrypt bug. When I look at syslog, I see this:
“clementine: Libgcrypt warning: missing initialization – please fix the application”
shane
September 10, 2014 — 4:20 pm
No suggestions I’m afraid, I haven’t used this in a while, so the instructions may be out of date. Did you fix your problem and I can add how you did it to the blog post?
Subhamoy
September 10, 2014 — 7:25 pm
Unfortunately, no. I have found similar errors in a few other places, like libpam, for example, but no clue where it is coming from.
shane
September 16, 2014 — 3:09 pm
You’ve tried other applications like Rhythmbox I assume? It’s odd, because it sounds like the mtp handshake is happening ok, but there’s something else going on. Does mtp-detect seem to carry out the handshake and all that correctly?
A Martinez
September 12, 2014 — 6:43 pm
Maybe I am missing something but this does not do anything for me. While Ubuntu can identify my Zune as a Zune, there is no adding songs to it in Rhythmbox nor can I access any files through Nautilus. Am I missing something here? I created an empty file, titled it as direct in your post, copy and pasted the encryption key, then dumped it in my Home folder.
shane
September 16, 2014 — 3:08 pm
Hi there,
Unfortunately I don’t have my Zune (it’s back at home in another country) at the moment, so I can’t test things out again, but this should still work. Are you sure the file is named .mtpz-data and nothing else? What happens when you run the mtp-detect command after you’ve made the file?
Shane
A Martinez
September 16, 2014 — 7:59 pm
Here is the bulk of it, the rest was device info:
libmtp version: 1.1.6
Listing raw device(s)
Device 0 (VID=045e and PID=063e) is a Microsoft Zune HD.
Found 1 device(s):
Microsoft: Zune HD (045e:063e) @ bus 2, dev 5
Attempting to connect device(s)
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
MTPZ device detected. Authenticating…
(MTPZ) Setting session initiator info.
(MTPZ) Resetting handshake.
(MTPZ) Sending application certificate message.
(MTPZ) Getting and validating handshake response.
(MTPZ) Sending confirmation message.
(MTPZ) Opening secure sync session.
(MTPZ) Successfully authenticated with device.
Error 2: PTP Layer error 02ff: get_all_metadata_fast(): could not get proplist of all objects.
Error 2: Error 02ff: PTP: I/O error
Error 2: PTP Layer error 02ff: get_handles_recursively(): could not get object handles.
Error 2: Error 02ff: PTP: I/O erro
Pheria
December 11, 2014 — 9:06 pm
Very cool. This is the first time I’ve seen the handshake key be broken open for Zune HD. I wonder how much longer until plugins for Winamp / Musicbee / etc start cropping up, or could they not use the same handshake?
shane
December 11, 2014 — 10:03 pm
It seems like this would be possible, however there just doesn’t seem to be the interest or demand to do it, unless you would like to take up the baton. From a technical point of view there’s no reason that this shouldn’t work. The key is there to be used.
AJ
March 6, 2017 — 1:20 am
Dead link.
shane
March 6, 2017 — 9:57 am
That should be fixed now. Thanks for the heads up.
paul
April 16, 2017 — 9:57 pm
im not sure how you write the encryption to a file. im admittedly still new to linux
shane
April 18, 2017 — 9:32 am
You just need to create a file and add the text to it. Any normal text editor will do this, just save the file with the correct name.
David
December 24, 2017 — 11:57 am
I couldn’t make it work on Linux Mint. Just says ‘unable to mount location’ when I try to open it file-manager.
mtp-detect finds it as Device 0, but then says ‘failed to open session….’ after a few seconds of trying.