maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   Changing the User Agent on the N9/N950. Simple(ish) downloads to change to Andoird 2.3.7 or iOS 5 (https://talk.maemo.org/showthread.php?t=81291)

legoman666 2012-01-02 23:36

Changing the User Agent on the N9/N950. Simple(ish) downloads to change to Andoird 2.3.7 or iOS 5
 
It was difficult, but I was able to do it:
http://i.imgur.com/HB7P8.png http://i.imgur.com/NhFqe.png

If you don't know how to reverse this, I wouldn't suggest trying it.

From a desktop, fire up your favorite sftp client and browse to your N9. Log in with the user account.

Browse to /usr/bin, copy the file "grob" and paste it somewhere on your machine.

Open "grob" with a hex editor and search for "Mobile" (case sensitive). The first result should be in the middle of the UA.

Edit the UA from
Code:

Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13
to:
Code:

Mozilla/5.0 (Linux; Android 4.0.1) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
You will need to pad the end of the UA hex with "00" because the Android string is a little shorter than the original. The new UA MUST be the same length as the old one in grob. That is, the final file size must be exactly 1,143,292 bytes.

Other users, including myself, have been unable to get an iOS UA to work, though you can try your luck. Someone shared an iOS grob, but it appears to have changed when he uploaded it.

Backup the original grob, and copy the edited "grob" back to your N9. Make sure the permissions were maintained (probably weren't, so check!)
Quote:

Originally Posted by rcs1000 (Post 1145127)
you need to do:
chown root /usr/bin/grob
chmod 755 /usr/bin/grob


That's it! You might need to reboot your phone for the changes to take effect, I didn't though.

For the Lazy:
http://dl.dropbox.com/u/52619173/grob.iOS.zip
http://dl.dropbox.com/u/52619173/grob.Andoird2.3.7.zip

Download, unpack. Copy to N9 /home/user via sftp
SSH into N9, get root command line:
Code:

rm /usr/bin/grob
cp /home/user/grob.XXXXXXX /usr/bin
mv /usr/bin/grob.XXXXXXXX /usr/bin/grob
chown root /usr/bin/grob
chmod 755 /usr/bin/grob

I've tried a few sites:
Facebook loads the Android specific mobile version and seems to work perfectly, including where they recommend you install the Facebook Android App ;)
Gmail loads the swanky Android-only mobile version instead of the dumb-phone version that it used to. Everything seems to work.
Google Maps loads the fully featured Android mobile version, but doesn't really work. It just says "loading" after asking to allow geolocation.
Google+ works great (It did before with the old UA anyway)
Google Voice loads the dumb phone version still (I don't think they have a decent web interface?).
Google Music throws a security error. (Might be because I didn't put a "U;" in the UA)
Youtube now refreshes the page when you click play with an Android UA. Maybe trying an older Android UA string would fix this. With iOS UA, it tells me to enable videos in Safari settings. Seems like we just can't win.
With the iOS UA, the BBC iPlayer loads, but I live in the US and don't feel like messing with proxies, so I can't actually test.

Anyway, I can give more specific instructions if required, but I don't want to encourage users to do this who don't understand the basic instructions above.

isfr21 2012-01-03 05:54

Re: Changing the User Agent on the N9/N950
 
Would it work better if you used latest iOS user agent? I tried it on my N900 and it works great, even google maps loaded on it.

TheToimelias 2012-01-03 07:44

Re: Changing the User Agent on the N9/N950
 
Quote:

Originally Posted by isfr21 (Post 1144908)
Would it work better if you used latest iOS user agent? I tried it on my N900 and it works great, even google maps loaded on it.

What is the latest iOS user agent?

Im trying to get google music work on N9 and if i could change user agent to iOS, google music should work.

isfr21 2012-01-03 08:06

Re: Changing the User Agent on the N9/N950
 
This is what I got from searching google:
Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7

See if it works and let me know if it does. I don't want to mess with my N9 just yet.

isfr21 2012-01-03 08:14

Re: Changing the User Agent on the N9/N950
 
Actually that was iOS 4.
heres more recent iOS 5:
Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3

isfr21 2012-01-03 08:43

Re: Changing the User Agent on the N9/N950
 
Ok figured out how to do it via terminal. So I went ahead and did it with the iPhone user string. However, Fennec doesn't start up now. So I had to revert to original settings. Why doesn't Fennec start up from just editing the user string to iOS? Was it the method I used because I downloaded HexFiend for my Mac and used that to edit the grob file?

thedead1440 2012-01-03 10:48

Re: Changing the User Agent on the N9/N950
 
tried the android string... gmail.com works though abit laggy. youtube.com doesn't play any videos instead simply refreshing the page everytime play is clicked. could someone give a solution for this.

thanks.

thedead1440 2012-01-03 10:57

Re: Changing the User Agent on the N9/N950
 
also could somebody guide on which UA is better; iOS or Android.

legoman666 2012-01-03 14:29

Re: Changing the User Agent on the N9/N950
 
Quote:

Originally Posted by isfr21 (Post 1144946)
Ok figured out how to do it via terminal. So I went ahead and did it with the iPhone user string. However, Fennec doesn't start up now. So I had to revert to original settings. Why doesn't Fennec start up from just editing the user string to iOS? Was it the method I used because I downloaded HexFiend for my Mac and used that to edit the grob file?

I had the same issue at first. Make sure the permissions are the same as before. After editing it on my PC and copying it back, it seemed to have lost its executable permission and I had to chmod it back to normal.

Quote:

tried the android string... gmail.com works though abit laggy. youtube.com doesn't play any videos instead simply refreshing the page everytime play is clicked. could someone give a solution for this.

thanks.
I noticed the same thing. I'm going to try 2.3.7 instead of 4.0.1, maybe it'll be more compatible. If that fails, I'll try iOS.

isfr21 2012-01-03 14:37

Re: Changing the User Agent on the N9/N950
 
Quote:

Originally Posted by legoman666 (Post 1145091)
I had the same issue at first. Make sure the permissions are the same as before. After editing it on my PC and copying it back, it seemed to have lost its executable permission and I had to chmod it back to normal.

Thanks for the reply. I'm not familiar with chmod. Any chance I can get help on how to go about that?


All times are GMT. The time now is 13:14.

vBulletin® Version 3.8.8