Thursday, October 22, 2009

Sync iPhone or iPod on multiple computers - iTunes PC/Mac

You've probably noticed that it is impossible to sync your iPhone on two or more computer. It's a really annoying limitation! Here is how you can get rid of that :

1. First, backup the "iTunes Music Library.xml" and "iTunes Music Library" (Tunes Music Library.itl for PC user). They are located in Music / iTunes Folder

2. On the machine your iPhone is currently synched with, open "iTunes Music Library.xml" with a text editor (TextEdit on mac, Notepad on Windows).

3. Find the entry between the tags, after "Library Persistent ID" . It should be an alphanumeric string containing 16 characters/digits. Copy this entry in a text document or write it on paper. ex : 8B6C633F7DACB74B

4. Now go to the computer you want to synch with and make sure iTunes is not running.

5. You will need to change the Persistent ID in two file. An XML File and a Binary File.

6. First, open the XML File "iTunes Music Library.xml" and find the entry between the tags, after "Library Persistent ID". Copy the string that is here (you will need it later) then replace it with the string you copied at step 3(the one from the computer your iPhone is synched with). MAKE SURE YOU DON'T CHANGE ANYTHING ELSE.

7. Save the XML File and close it.

8. Now open the binary file ("iTunes Music Library" on Mac and "Tunes Music Library.itl" on PC) in an Hex Editor (Windows : HxD , Mac : HexEdit)

9. With the command "Find and Replace" look for the ID you copy in step 6 and replace it with the ID in step 3. Make sure you search type is Hezadecimal not ASCII. Replace all occurences.

10. Save the file and close it.

11. That's it!

12. Launch iTunes on the second machine you wish to sync with and plug in your iPhone. When you select "Manually manage music and videos" you will no longer be prompted to delete music, nor will the files on your iPhone be grayed out.

Visit http://www.andrewgrant.org/2008/03/30/how-to-sync-an-iphone-with-two-or-more-computers.html for screenshot of the process

Show Hidden Files in Mac OS X

Here is how you can view all the hidden files in your Finder. It is very useful for web developer who want to view the .htaccess file that is automatically hidden by Mac OS X.

Go to Applications / Utilities and launch the Terminal

In the Terminal window, write the following commands :

defaults write com.apple.finder AppleShowAllFiles TRUE

killall Finder


That's it!

If you want to hide the hidden files, the command is :

defaults write com.apple.finder AppleShowAllFiles FALSE

killall Finder