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?

cddiede 2012-01-03 14:44

Re: Changing the User Agent on the N9/N950
 
Could someone post a desktop browser user agent string? Mobile is nice and all, but I'm really hoping to get back to something closer to the N900's mobile experience where 90% of all sites just treated me to the grown up version of their pages without a fuss.

rcs1000 2012-01-03 15:09

Re: Changing the User Agent on the N9/N950
 
Does anyone know:

If I change the UA string to desktop Chrome, will Amazon Cloud Reader work?

isfr21 2012-01-03 15:23

Re: Changing the User Agent on the N9/N950
 
What's the chmod command to enter once I put the grob file back in usr/bin ?

rcs1000 2012-01-03 15:36

Re: Changing the User Agent on the N9/N950
 
you need to do:
chown root /usr/bin/grob
chmod 755 /usr/bin/grob

(and Amazon cloud reader does not appear to work. or at least, not with the user agent setting i used. boo.)

isfr21 2012-01-03 15:52

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

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

Thanks. I tried using the iOS 5 string but now Web browser doesn't start. I'm gonna revert to original again.

I really want this to happen. Anyone willing to make this an easy solution as simple as a script or maybe even making it into app? Really tired of not being able to access different sites especially google features such as Maps or just being directed to a basic mobile version of it.

thedead1440 2012-01-03 15:56

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

Originally Posted by isfr21 (Post 1145131)
Thanks. I tried using the iOS 5 string but it still shows my user agent as Meego. I edited the file using Hex Fiend for mac. What went wrong?

i think it's the length of the string. The browser in my opinion works only if the length of the user agent matches the characters of the default settings.

Hence, having to add a "0" at the end of the android string to match the default's length. The iOS string on the other hand is much longer.

rcs1000 2012-01-03 15:57

Re: Changing the User Agent on the N9/N950
 
The iOS 5 string appears to be too long, therefore it overwrites some other parts of the file.

Has anyone done this stuff with Fennec yet? (I would *love* to get the FT HTML5 app running, and also Kindle Cloud Reader.)

thedead1440 2012-01-03 16:01

Re: Changing the User Agent on the N9/N950
 
on fennec, simply install the extension "Phonny" and change the UA.

Its much more convenient and you can choose from: default, ios, android (nexus), android (galaxy tab), firefox desktop and ie.

rcs1000 2012-01-03 16:03

Re: Changing the User Agent on the N9/N950
 
OK: try this to get the iOS user agent:

Mozilla/5.0 (iPhone) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3

rcs1000 2012-01-03 16:05

Re: Changing the User Agent on the N9/N950
 
Hmmm: the FT app might be actually working...
It's got to 'loading' which is a nice start.
Google Music, by the way, fails with a DOM security error

isfr21 2012-01-03 16:15

Re: Changing the User Agent on the N9/N950
 
Wow the iOS works with google services. The maps asks for allowing geolocation but then stops loading after that. Google music doesn't work showing security error. BoFA.mobi works. Amazon reader doesn't work on iPhone anyways only on iPads. Mobile youtube works fine and same as before.
Html5 test now shows N9 browser scoring 305 with the iOS user agent. This is a nice improvement from scoring 283 at its default UA string.
Thanks!

rcs1000 2012-01-03 16:38

Re: Changing the User Agent on the N9/N950
 
thedead: I can't seem to install the 'phonny' (or 'phony') extension as it claims its not compatible with fennec 10.0

thedead1440 2012-01-03 17:01

Re: Changing the User Agent on the N9/N950
 
i'm using fennec 10.0 too you need to install "Add-on Compatibility Reporter" first then install phony (sorry for the earlier typo). Once phony is installed, you need to mark it as compatible.
The option to change the UA is located at the preferences menu of fennec (just below the start page preference) and not the options menu of phony(this should be greyed out)

jalyst 2012-01-03 17:02

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

Originally Posted by rcs1000 (Post 1145151)
thedead: I can't seem to install the 'phonny' (or 'phony') extension as it claims its not compatible with fennec 10.0

You also need the compatibility check/reporter extension (so that you can mark it as compatible).
It's mentioned in the google doc guide, linked to in the thread, stickied at the top of this sub-forum.

rcs1000 2012-01-03 17:11

Re: Changing the User Agent on the N9/N950
 
Sorry for slightly cross-posting...

So near, and yet so far,

I've installed Fennec.

Then, I've gone into about:config and added:
"general.useragent.override" = "Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:10.0.1) Gecko/20100101 Firefox/10.0.1"

Now, going to read.amazon.com, I get my list of books (yay!) but it doesn't seem that Fennec is giving the local storage needed to download and read a boo (boo).

(I get the 'Error Opening Content' error message)

Darn...

legoman666 2012-01-03 17:59

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

Originally Posted by thedead1440 (Post 1145133)
i think it's the length of the string. The browser in my opinion works only if the length of the user agent matches the characters of the default settings.

Hence, having to add a "0" at the end of the android string to match the default's length. The iOS string on the other hand is much longer.

Indeed. I think the final size of the modified grob bin needs to exactly match the stock size. Thus, any new UA's we try need to be the same length or shorter than the stock UA. I had to drop a couple options in the Android 4.0.1 UA when I was messing with this originally because it was a little longer. I ended up with 2 less bits than stock, hence the necessity to add bhex "00" at the end.

For those of you wanting to have a N900-esque experience, why not try the N900 UA? I'm going to try Android 2.3.7 when I get off work and report back.

legoman666 2012-01-03 18:00

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

Originally Posted by rcs1000 (Post 1145174)
Sorry for slightly cross-posting...

So near, and yet so far,

I've installed Fennec.

Then, I've gone into about:config and added:
"general.useragent.override" = "Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:10.0.1) Gecko/20100101 Firefox/10.0.1"

Now, going to read.amazon.com, I get my list of books (yay!) but it doesn't seem that Fennec is giving the local storage needed to download and read a boo (boo).

(I get the 'Error Opening Content' error message)

Darn...

Try a UA for an older desktop browser so that Amazon doesn't try to use all the fancy features the latest Chrome supports. Maybe IE 7 or 8. (Of course, this assumes that read.amazon.com works in IE7/8 to begin with.

ejasmudar 2012-01-03 19:04

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

Originally Posted by jalyst (Post 1145167)
You also need the compatibility check/reporter extension (so that you can mark it as compatible).
It's mentioned in the google doc guide, linked to in the thread, stickied at the top of this sub-forum.

What is the name of this add-on? I cant seem to find it in fennec.

thedead1440 2012-01-03 19:27

Re: Changing the User Agent on the N9/N950
 
"Add-on Compatibility Reporter"

ejasmudar 2012-01-03 19:53

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

Originally Posted by thedead1440 (Post 1145264)
"Add-on Compatibility Reporter"

Thanks a lot! installed that one, and restared my device. After that i searched for phony and phonny. No results :/

EDIT: I installed via going to the site rather than directly from the add on manager. Thanks again for your efforts

Dragoss91 2012-01-03 20:28

Re: Changing the User Agent on the N9/N950
 
Did anyone use N900's UA so far ?

Makeclick 2012-01-03 22:40

Re: Changing the User Agent on the N9/N950
 
If this working good, could someone ask to facebook gods to make that andoid mobile versio to show up, when you signing in with N9?

soredawg 2012-01-03 23:20

Re: Changing the User Agent on the N9/N950
 
Any chance someone could upload a working iOS grob file. Having trouble making it work with hex editor. many thanks

legoman666 2012-01-04 00:28

Re: Changing the User Agent on the N9/N950
 
I can't get an iOS grob to work either. I tried a few variations while making sure the file size was correct. Weird. I'll try a few other ideas....

et3rnal 2012-01-04 02:17

Re: Changing the User Agent on the N9/N950
 
Any Terminal way to do it ? or shell plz :\

It would be nice to see an option to chose UA for the default browser :D

Makeclick 2012-01-04 02:35

Re: Changing the User Agent on the N9/N950
 
Why i get can't create ' /usr/bin/grob': File exists and if i try to delete it, i get permission denied (i am root)

isfr21 2012-01-04 04:38

Re: Changing the User Agent on the N9/N950
 
Here is link to working grob with iOS (iPhone) modification.

http://db.tt/zUlcCAVx

thedead1440 2012-01-04 04:53

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

Originally Posted by Makeclick (Post 1145420)
Why i get can't create ' /usr/bin/grob': File exists and if i try to delete it, i get permission denied (i am root)

don't create. simply make a copy in MyDocs, edit the copy and use terminal to replace it

cp -R /home/user/MyDocs/grob /usr/bin/

godofwar424 2012-01-04 05:15

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

Originally Posted by isfr21 (Post 1145436)
Here is link to working grob with iOS (iPhone) modification.

http://db.tt/zUlcCAVx

Does not work, browser does not start :(

Makeclick 2012-01-04 05:16

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

Originally Posted by thedead1440 (Post 1145438)
don't create. simply make a copy in MyDocs, edit the copy and use terminal to replace it

cp -R /home/user/MyDocs/grob /usr/bin/

Yes, and i get that error "file is already there" or permission denied. I used cp -r if ti different than -R?

If you people want to easy way.. touch.youtube.com it is same witch we see with android phones.


All times are GMT. The time now is 21:38.

vBulletin® Version 3.8.8