ok... heres how I changed my user agent on 1.1.4.
I have not yet tested it on 2.x (although I presume it can be done). If you wish to attempt this on 2.x, you will need to pseudosign the hacked file (/System/Library/Private Frameworks/Webkit.framework/Webkit) BEFORE you restart your phone, otherwise you will be locked out and need to do a restore.
If you're going to try this, obviously im not responsible in the event of damage or loss. This worked for me on 1.1.4 though, and I hope it can help out others too.
Step 1 - SFTP or SSH into iPhone and Grab the following files:
Step 2 - Open the 'Webkit' file in a hex editor (I used 0xED on my Mac)
You need to find this line:
and change it to:
Mozilla/5.0 (%@; U; CPU iPhone OS %@ like Mac OS X; %@) AppleWebKit/%@ (KHTML, like Gecko) %@
(Obviously the new text is much shorter than what was in there, so you need to fill the rest in with spaces. see screenshot)
Step 3 - You need to convert the Info.plist into standard XML format. If you have a Mac you can do this in the terminal using the following command (make sure to change your file path to wherever you have the file saved):
If you aren't on a Mac you will need to install the Perl Framework to run the plutil script in command prompt (available here: http://scw.us/iPhone/plutil). This script has a slightly different syntax but obviously the goal is to convert this file to plain xml so you can edit it.
plutil -convert xml1 /Users/username/Desktop/Info.plist
Step 4 - Now open the converted Info.plist
Look for these lines:
And simply change the string value to whatever user agent you want. Mine Looks like this:
Step 5 - Convert Info.plist back to binary with this command in your terminal (OSX) (again, make sure to change your file path to wherever you have the file saved):
<string>Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaN95/21.0.016; Profile/MIDP-2.0 Configuration/CLD(-1.1) AppleWebKit/413 (KHTML, like Gecko) Safari/413</string>
Step 6 - Upload the two modified files back onto your phone into the same directory you found them.
plutil -convert binary1 /Users/username/Desktop/Info.plist
Step 7 - Reset your phone and test out your new user agent by going to something like useragent.org