The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 16, 2019, 05:42:49 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Sync iPhone to Multiple iTunes Instances  (Read 3312 times)
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« on: October 08, 2008, 04:13:09 PM »

The. Best. Hack. Ever. (Well, lately at least)

I haven't seen as smooth and relatively effortless hack in a long while. Here's the deal: I have my main machine and a notebook. Obviously, I take the notebook with me when I travel. Since I have a bunch of my scraped movies on the notebook as well, what I want to do is be able to modify the movies on my iPhone from my iTunes library while on the road.

The problem, for anyone that has tried this before, is you get a "Do you want to erase this iPhone and sync with this machine" message - to which the appropriate answer is f$%k no, but there's no button for THAT.

I found this hack posted on a blog by a guy named Andrew Grant and it covers how to "re-serial number" a machine so that the library codes between two machines match. What I mean by this, is that when you sync your iPhone on machine A, the iPhone will carry the unique ID of <that> iTunes library with it - if you try to hook up with another, that's how it knows it's not on the right box. Blissfully, this hack works on both PCs and Macs.

The thing's you'll need for this hack are a straight-up text editor and a hex editor. I recommend Text Wrangler for text - it can be gotten HERE and Hex Fiend which can be gotten HERE.

First Step: Acquire your Main Machine's iTunes serial number
Using Text Wranger, open up "iTunes Music Library.xml" - on a Mac this is in your ~/Music/iTunes directory. You'll find that the file looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>Major Version</key><integer>1</integer>
   <key>Minor Version</key><integer>1</integer>
   <key>Application Version</key><string>8.0</string>
   <key>Features</key><integer>5</integer>
   <key>Show Content Ratings</key><true/>
   <key>Music Folder</key><string>file://localhost/Users/ed/Music/iTunes/iTunes%20Music/</string>
   <key>Library Persistent ID</key><string>41C6E315C3C7202F</string>
   <key>Tracks</key>
   <dict>
      <key>3264</key>
      <dict>
         <key>Track ID</key><integer>3264</integer>
         <key>Name</key><string>U + Ur Hand</string>
         <key>Artist</key><string>P!nk</string>
         <key>Album Artist</key><string>P!nk</string>
         <key>Composer</key><string>Lukasz Gottwald, Max Martin &#38; P!nk</string>
         <key>Album</key><string>I'm Not Dead (Bonus Track Version)</string>
...


Note that I have highlighted what we are looking for: the 16 byte number in the <string> portion of the Library Persistent ID line.  Select that string and copy it to the clipboard, we'll be needing it. Now you might open a new TextWrangler document and put it there, or you might email it to an address on the target machine - but in any case, we'll be needing this number EXACTLY as it appears on the new box.

Step 2: Modify the iTunes lib xml file on the target machine
First off, make sure that iTunes is not running on the target machine. Then, in much the same way as in the first step, open the iTunes Music Library.xml file on the target machine and find the same string of data. BEFORE YOU START TYPING: open up a new text document and copy the EXISTING NUMBER onto it. We'll be needing it in a moment. Once you have the ORIGINAL TARGET NUMBER in a new text document, you may replace it with your master number. Note that this number is EXACTLY 16 chars long. Save this file and close it.

Step 3: Modify the iTunes data file to reflect the new serial number change
This step is just a little more creepy, but just as simple. Start Hex Fiend and open your iTunes Music Library file (no suffix) (on a PC, it's iTunesMusicLibrary.itl) and select "Find." In the WHAT TO FIND box, put your ORIGINAL TARGET MACHINE NUMBER. In the WHAT TO REPLACE IT WITH box, put your new master number. Click the Replace All, and it should report that there was 1 replacement. Save the file and close it.

At this point, you can reopen iTunes and it should behave completely normally. But when you hook up your phone, it will not require that you sync to this machine - in addition, the files in the "iPhone" category of iTunes will no longer be grayed out and you can edit them freely.

In my case, I turned off Automatic Sync and selected Manually Sync music and video. Now I can easily delete movies from then iPhone, then while in the "Movies" tab of iTunes I can just drag one onto my phone and it copies straight away - note that this does nothing to my music or anything else.

For those of you with  Devilish on your mind, yes of course - this means that if you can do it with one, you could do it with many... however this will not get past Apple's DRM system for what can be played where, so far as I know. But I'd imagine there are some reading this that will experiment Wink

Enjoy!

/Perk
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #1 on: October 09, 2008, 06:42:40 AM »

Well you should check out how I sync mine to linux over wifi

 ROFLMAO

Nah, actually I un-jailbroke yesterday for the trip. Figured I'd finally check out the app store. After having used a jailbroken iphone for several months, I'm severely underwhelmed.

Seriously Apple, learn from the hacker community that's built itself up around your product.
Logged

hai
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!