Sync iPhone 4 to more than one computer

Step 1:

Download Hex editor.

Step 2:

On "Computer B", backup "iTunes Music Library.xml" and "iTunes Music Library " safely.

Step 3:

On "Computer A", open "iTunes Music Library.xml" with Notepad and search (Ctrl+F) for "<key>Library Persistent ID</key>".

Step 4:

Following "<key>Library Persistent ID</key>", copy the code between <string> and </string>.

Step 5:

Find the same code on Computer B, then replace it with the code from Computer A.

Step 6:

Open "iTunes Music Library" by using the Hex Editor on Computer B.

Step 7:

Go to Edit > Replace in the Hex Editor.

Step 8

Insert code from computer B in "Find", insert code from Computer A in "Replace With"

Step 9:

Save this file, then close it.

Step 10:

Open iTunes on Computer B, and plug in your iPhone.

Step 11:

Select "Manually manage music and videos".

Step 12:

Now, you will no longer be alerted to erase your data, and you could sync your iPhone 4 to more than one computers now.