The Blog

iPod Shuffle file structure

Apple has put several restrictions on the iPod Shuffle use. You can only update songs from one PC/Mac, through iTunes. You can’t copy songs from Shuffle to another PC or Mac. You can’t manually copy the songs to Shuffle (must use iTunes).
At least one of those claims is not true. For now.

Indeed, Apple’s iPod Shuffle support FAQ makes it pretty much clear. However, things are not that bad. Apple Matters has detailed the procedure for finding the songs through Mac terminal and copying them over to Mac. Let’s see how it looks like on PC.

File structure

Songs are hidden away in the folder called iPod_Control.

Shuffle root dir

This folder has Music and iTunes folders.

inside the iPod_Control folder

iTunes folder contains the binary files that govern the way Shuffle works. More on this later.

iTunes folder

The songs are separated in several F?? folders. I’m not sure how iTunes distribute the files over these folders; I could not figure out any rule…it seems random.

Music folder

From here, you can simply copy the songs to any computer you connect the Shuffle to.

here are the songs!

How to manually add songs to Shuffle?

Simply copying the .mp3 files over to Shuffle into one of the folders does not work. File is there, but Shuffle is ignoring it, as well as iTunes (when you open the Shuffle playlist in it). I sense that the key is in \iPod_Control\iTunes\iTunesDB and/or in the iTunesSD file.

iTunesDB file

I can see the names of all the songs currently loaded to Shuffle through iTunes, written in some sort of binary format. I believe it to be a matter of time until someone, with enough programming skills, will reverse-engineer this and make an editor for it.
This seems to be the order of information for one song:

  • Title
  • Author
  • Album
  • ?
  • Type (MPEG audio etc.)
  • Publisher (rec. company)
  • Full path on the Shuffle
iTunesSD file

File iTunesSD has similar content (song names and locations are repeated there too).

One guess: iTunesSD contains the file distribution in the Shuffle’s Music folder, while iTunesDB contains the songs info, taken from the iTunes library on your computer.
I’m positive that Apple engineers reading these lines are mirthing their asses off. :)

DeviceInfo file contains the custom name you have set in iTunes for this Shuffle, as well as name of the machine and the username you used to login to that machine.

Rest of the files in the iTunes folder does not look interesting at the moment. Any ideas people?

Banca

Banca

Beautiful and functional currency converter, supports just about any currency in the world.

Go Couch to 5k

Go Couch to 5k

The most popular starter running program in beautiful feature-rich app (GPS tracking, charts, detailed history etc)

Quickie to do

Quickie to do

The fastest short-term task-list / check-list app on the App Store. Really.

Guerrilla Cardio

Guerrilla Cardio

The most challenging high-impulse interval training in the world.

Run Mate

Run Mate

A versatile running coach app, with unlimited number of running programs. Perfect for casual runners.

38 Comments

Feel free to chime in, looking forward to it. Leave a Comment

  1. Jeff Wheeler says:

    Nice tutorial, however I believe many of those three things also apply for all iPods, not just the Shuffle.

  2. Aleksandar says:

    Probably; I never checked other iPods up close. The thing is — it would be cool to be able to copy songs without iTunes — it would add so much to portability.

  3. Goran Raki says:

    Look at http://gtkpod.sourceforge.net/

    From changelog:
    gtkpod V0.88
    NEW FEATURE: Support for iPod Shuffle. Thanks to Steve Wahl.

  4. Justin says:

    All iPods require you use iTunes. I don’t think this would be a problem though, as many new computers are coming shipped with iTunes pre-installed. I bought a new HP in August 2004 and it already had iTunes preloaded. I’m not sure if this will work or not, but I’m sure if you found a song you wanted on a different computer you could put it on the shuffle as a file (it works as a traditional flash drive as well) and then when you get home you could copy the song to the shuffle through iTunes. Is this right or am I missing something? In theory I would think it would work unless Apple has put restrictions on this as well (I doubt they have).

  5. Sean Shrum says:

    iTunes blows under Windows. The current version has a memory leak problem that nearly chokes my 1 gig PC.

    I’m a open-source programmer and I’m having a uber-hard time finding tech docs on the “iPod Shuffle” in regards to transfering to/from it (Apple design is not something that I deal with on an everyday basis). I’m in talks with various existing Windows-based iPod management programmers (ie: EphPod, YAIMA, etc) to see about having someone write a command line file transfer engine that I will call ipodftp. Then, anyone (myself included) can write front-ends that can transfer to the iPod.

    My first project will be a automatic AutoFill app (since I want to get away from iPuke (iTunes I mean) and later will tie this into pulling playlists from WMP (yes, I know about XPlay but it blows…I’ve already talked to them and most of my initial “issues” with their app are being addressed “later” = most likely never).

  6. Richard says:

    Re #4

    What if you are using a platform not supported by itunes? I’m using debian linux (testing version). Itunes is available on windows and mac.

    So ima going to go look at gtkpod. The version debian testing’s APT repository at the moment is 0.85 so I need to go to the gtkpod site and install it manually.

  7. Aleksandar says:

    I lost any free time that I could spend playing more with this. :( I found several apps through Google, but did not have time to try them out.
    My main goal is small app (preferably one-file) that I can keep on hard disk part of the Shuffle, fire up and use it to add/delete songs. Even a command-line utility would be enough.

    Sean, I used iTunes as player on a small party recently. It played for about 5h without any noticeable perfomance loss. How did you detect the leak?

    I wouldn’t mind using iTunes, if it wasn’t for the stupid behavior that only one computer can control the song list. If I want to add a song or two from another comp then, if only using iTunes, I must delete all songs on the Shuffle.

  8. Aleksandar says:

    Just spoted, on Endgadget: Shuffle database builder.

    I’ll certainly check this out and report back.

  9. Sean Shrum says:

    Freaking Sweet!!!

    Based on the writeup, this works for me too. I am off to build a front end!

    Dewd, thanks for the info.

  10. Aleksandar says:

    It works like a charm.

    I cleared the songs using iTunes and closed it. Deleted all files I put there, leaving just the basic Shuffle structure. BACKUP of entire structure.
    Then copied the songs I want into the folder I created, copied the .exe into root, started it, it done its job and I could play the songs.

    No side effect at all — I tried order play, random play, paused, stoped, continued, moved to next songs…everything worked as it should. I need to try it out on the office computer as well, but I doubt there will be any problems.

    Perfect program, simply perfect. I’ll be looking for PayPal donation link for this one.

    One thing to have in mind. Since iTunes will see an empty song locations on the Shuffle, but iTunesSD file that has song references, it will rewrite iTunesSD file to nothing (18 bytes long). This is natural initialization to expect, really. Your songs are not touched and reruning rebuild_db.exe brings things back in order.

  11. Sean Shrum says:

    Agreed…no problems here either.

    Songs can be placed anywhere on the shuffle and the rebuild_db finds them. Since the ipod_control folder is hidden but still needed, I just don’t see it. What I did was created a Music folder and copied 140 tunes there, ran the rebuild_db which took like 4 seconds and it was done.

    Super quick…faster than iPuke.

    FYI: Keep an eye on my site over the next few weeks as I will be building a Autofiller:

    1. plug in your shuffle
    2. auto-detects and launches
    3. deletes all the songs in a predefined location
    4. refills the folder from a local folder of songs or playlist to a predefined size
    5. runs rebuild_db

    This means that you can have a folder structure like:

    \iPod_control (hidden)
    \music
    +-\my_favs
    +-\my_random
    \data

    You should be able to run my app (once I have it done) and have it clear out the \my_random folder, leaving the tunes in \my_favs entact. This way you can keep your favs and mix out the rest.

    At least that’s the plan so far. Need to get this down on paper. Ideas welcome: “sean[at]shrum[dot]net?subject=[ Coding ] Autofiller”.

    More later at http://www.shrum.net most likely in the coding area.

  12. Ben says:

    I tried the rebuild_db.pya but it gives me this error:

    Rebuilding iTunesSD file header from scratch.
    Rebuilding iTunesSD entry header from scratch.
    Critical error: cannot write iTunesSD database file!

    Anyone know how to fix it?

  13. Aleksandar says:

    Sean, sounds just fine, keep up the work. Add the option “do not erase files in my_random when autofilling” to the feature list. That way I can fine tune that list over time — letting it autofill, yet deleting few songs I don’t like at the moment.

    Ben, which OS? Maybe a permission problem. Did you try contacting the author of the rebuild_db?

  14. Sean Shrum says:

    I’m almost done…still need a few things but it semi-works:

    http://www.shrum.net/code/shuffler

    It’s alpha…still need to do some more coding and documentation but it’s straight forward enough right now. Put rebuild_db.exe on the root of your properly formatted iPod Shuffle and run the shuffler.exe.

    Coded with AutoIT:

    http://www.autoitscript.com

    Enjoy and thanks again.

  15. Sean Shrum says:

    Very close to done. Full functionality is there.

    In regards to #13 — You can move those files to a \permenant subfolder. Shuffler needs the delete the contents of the shuffle folder in order to move in fresh files.

    I have a source lib of about 1000+ songs. I have a \permenant folder of about 30 songs (which will grow over time a little).

    I did however make a “Import to source” option but that has to do with people who are fine-tuning their source library I still need to implement a user-defined file type filter as the current version takes everything in your source folder (including album art files, etc).

    Everything is up (docs, code, binaries, etc) for more details.

  16. Gibbono says:

    Wow, great program. thankyou all! found you via google and this has saved the day. well done.

  17. Alexander says:

    You also can use shuffle-db, a little python program, you can put on the shuffle. Then you can copy your mp3-files to the device and run shuffle-db. It generates the necessary entries in the database.

    URL: http://shuffle-db.sourceforge.net/

  18. Jarod says:

    Nice info, and nice application, you must be very proud of yoy, for contributing to build a more accesible society, and an open wold for old.

    Your program is by far better tan iPuke.
    you save the day, congratulations.

    Thank you

  19. soltani says:

    Does this work with other ipods? Can one figure out the structure of the db files for other ipods?

  20. Susanna says:

    Thanks! The file structure info was helpful. But my Shuffle has the song file names changed to DLCK.mp3, HQAN.mp3, etc. This may be because I loaded the Shuffle on a Mac.

  21. James says:

    I have spent weeks trying to find a decent application to load MP3s onto my girlfriend’s Shuffle. GNUpod, GTKPOD, EphPod, I’ve tried them all. Everytime I make even the smallest change, the iPod pukes and refuses to play, even though they claim to be compatiable with the Shuffle. The only thing I had found until now that worked was ml_ipod, but it crashed on her computer. Finally, FINALLY I find something that works the way I want! No ugly GUIs, no platform-restricted applications, just a simple tool to fix a simple problem. Thanks to your blog, I finally found the answer. I hope more people find this here.

  22. A K says:

    I got iPod shuffle yesterday and didn’t want to be under iTune. So, googled for “iPod Shuffle Hack” and found this site. Downloaded the program and load on my iPod. Done! everything is working the way I want to be. Even the developer perfers python version, I think win32 version is still working with iPod latest Update(1711-2005) version. Thanks guys.

  23. martida says:

    Sorry, new Shuffle user and not as technical as all of you. How do I get songs from my Shuffle onto my PC? Postings indicate you’ve figured out the reverse (from computer to Shuffle). Can anyone provide info? Thx!

  24. Aleksandar says:

    No Martida, the screenshots I posted are for getting the files of the Shuffle to PC. The screens show Total Commander (file manager utility), but you can do the same with Windows Explorer — turn on “show hidden files” (in options, somewhere) and then access Shuffle — you will see these folders then and be able to copy files.

  25. Alexandra says:

    Hi there,
    I’ve followed all your instructions above but unfortunately, all I find are weirdly named (with random letters) m4a files that my PC can’t read.
    Here is my problem: I bought my Ipod in Singapore where my sister lives and connected it to the Itune on her computer, downloading many songs from it. I didnt know you could only use one itune, on one computer! So when I came back home, a few continents away, I now have to connect my ipod to my own computer, with my own itune and lose all the music i downloaded… which is quite frustrating! Thats how i found this blog… Do you think i am having this problem bc when i formatted my shuffle on my sister’s itune, i didnt enable the flash drive, thus enabling it as a proper usb stick?
    Your help would really be appreciated!
    A

  26. Aleksandar says:

    Alexandra, you did all you could do. The problem you’re having a problem with Apple’s DRM (look for FairPlay explanation on Apple’s site). .m4a are probably songs not in MP3 format (which is MPEG 1 Layer 3) but in Apple’s AAC format (I might be wrong on this).

    I reckon that those songs were bought from iTunes store, through iTunes software. Thus, as such, they can only be played through the iTunes on that particular computer where they are bought and on the iPod connected to it. Once you reconnect iPod to your iTunes, it will not work unless you remove all the songs first (exactly the reason why I don’t use iTunes at all).

    I never bought anything from iTunes (even if I wanted — no iTMS in Serbia) so I know about this only from other people.

  27. Alexandra says:

    Thank you for your help!
    Strangely enough these were not itune purchased songs but rather, songs i downloaded myself from CDs. Very strange, then.
    Oh well, too bad, but thanks all the same!

  28. blinky says:

    hi, my ipod shuffle wont play the songs i put on it from windows media player do u have to use itunes or is that jst a request wen ever i put my music on it it ownt play it is charge and the voulume is up but it wont work PLEASE HELP ME!!!!

  29. Patrick says:

    written in some sort of binary format”

    Also known as “Unicode”… haha.

  30. George says:

    i deleted some folder on my ipod shuffle n i think it was a folder that has like the memory or sumtin on it now its stuffed, where can i download this folder?

  31. cdouglas says:

    Hello everyone,
    I too am having problems listening to the songs. I’ve added songs to the ipod(which may i mention belongs to my 9 year-old daughter) and am unable to hear them. This was one of her xmas presents and here we are 2 months later and i don’t have the guts to tell her it doesn’t work. so i told her it’s at work. I am able to listen to the songs through my computer on the e drive. But when i plug the pretty white headphones up the light blinks first green then orangish. PLEASE HELP!

  32. m says:

    i think you need to reset your ipod using the RESET function in the iPod software that you got from apple. It should be on the CD you got with the iPOD but if not just search the “ipod updater” at the apple website…

  33. zencd says:

    Thanks for the link to http://shuffle-db.sourceforge.net/
    It works and acts the most true way possible :)

    Goodbuy fucking fat ugly slooow iTunes!

  34. Bunny says:

    hey.. i have an ipod shuffle… and supposedly it can store upto 512 mb.. well.. i looked at my contents of the shuffle.. and there are no music files there because i erased it.. well.. for some reason.. about 412 mb are being used… but i see no music file there.. can you please tell me why and what can i do to actually have more songs on my shuffle.. Since the other 412mb are being used up for something that says “others”, i can only have upto 30 songs on there.

  35. Spackie says:

    Who ever wrote this awesome script is a genius.

    Itunes is the most horrid program!

  36. Tom Wilson says:

    Winamp now recognizes iPods and allows you to copy songs from it library

Trackbacks for this post

  1. StevenHarman.net
  2. StevenHarman.net

Comments are now closed for this article.