maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   [Announce] The Easiest way to Change Useragent On Stock Browser (https://talk.maemo.org/showthread.php?t=85098)

jorge 2012-12-08 12:26

Re: [Announce] The Easiest way to Change Useragent On Stock Browser
 
Quote:

Originally Posted by thedead1440 (Post 1302468)
jorge,

Use N9QTweak it has added a new option whereby an icon is created on your home screen to allow you to fast-switch between stock, iOS and Android UAs...

thanks, but iOS/Android is not what I need... I need to pretend I'm using a desktop

ladoga 2012-12-08 14:31

Re: [Announce] The Easiest way to Change Useragent On Stock Browser
 
I'd also like to have desktop user agent in stock web browser. If someone knows how to do this, please share.

Akkumaru 2012-12-08 14:57

Re: [Announce] The Easiest way to Change Useragent On Stock Browser
 
Quote:

Originally Posted by ladoga (Post 1302507)
I'd also like to have desktop user agent in stock web browser. If someone knows how to do this, please share.

Use this as the line for GROB:
Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.15 (KHTML, like Gecko) Chrome/24.0.1295.0 Safari/537.15

Fits perfectly ;)

jorge 2012-12-10 13:35

Re: [Announce] The Easiest way to Change Useragent On Stock Browser
 
So, back to my question, is there a way to keep more than one user agents simultaneously? Or at least switch between original and a desktop quickly (like the tweak app does but with desktop instead or except iOs/Android)?

thedead1440 2012-12-10 13:37

Re: [Announce] The Easiest way to Change Useragent On Stock Browser
 
Quote:

Originally Posted by jorge (Post 1303089)
So, back to my question, is there a way to keep more than one user agents simultaneously? Or at least switch between original and a desktop quickly (like the tweak app does but with desktop instead or except iOs/Android)?

Just post the desktop UA on the N9QTweak thread and request Schturman to include it in the next update; then you get all the options you require ;)

coderus 2012-12-24 07:35

Re: [Announce] The Easiest way to Change Useragent On Stock Browser
 
faster refhashlist script on shell
Code:

#!/bin/sh
#refhashlist patcher

cp /var/lib/aegis/refhashlist /var/lib/aegis/refhashlist.backup

pathname=$1
if [ "$pathname" == "" ]; then exit 1; fi

line=$(grep "${pathname}" /var/lib/aegis/refhashlist)
if [ "$line" == "" ]; then exit 2;
else
        #oldsha1=$(for ii in $(sha1sum /${pathname}); do echo $ii; break; done) #real file sha1
        #oldsha1=$(i=0; for ii in $line; do i=$((i+1)); if [ $i -eq 6 ]; then echo $ii; break; fi; done;) #sha1 parsed from line, not real sha1
        oldsha1=$(echo ${line} | sed -re "s/.*([a-f0-9]{40}).*/\1/") #faster sha1 extraction using regexp
        newsha1=$(for ii in $(sha1sum "/${pathname}"); do echo $ii; break; done)
        newline=$(echo ${line} | sed -e "s/${oldsha1}/${newsha1}/")
        sed -i -e "s@${line}@${newline}@" /var/lib/aegis/refhashlist

        accli -c tcb-sign -F /var/lib/aegis/refhashlist < /var/lib/aegis/refhashlist
fi

changing sha1 only for choosed file
refhashlist.sh usr/bin/grob #without first slash

thedead1440 2012-12-24 07:40

Re: [Announce] The Easiest way to Change Useragent On Stock Browser
 
coderus,

What would be the difference between using sh and perl script based on rainisto's post in the swap thread:

Code:

RM696-21-3_PR_001:/# export A=`sha1sum /tmp/enable-swap.conf |cut -b1-40`;
RM696-21-3_PR_001:/# perl -pi -w -e 's#40 (.*) A(.*)enable-swap#40 $ENV{A} A$2enable-swap#smg' /var/lib/aegis/refhashlist
RM696-21-3_PR_001:/# accli -c tcb-sign -F /var/lib/aegis/refhashlist -i /var/lib/aegis/refhashlist
RM696-21-3_PR_001:/# validator-init; aegis-loader;echo 1 > /sys/kernel/security/validator/flush
RM696-21-3_PR_001:~# reboot


coderus 2012-12-24 08:00

Re: [Announce] The Easiest way to Change Useragent On Stock Browser
 
speed. perl is slow.

soryuuha 2012-12-24 08:15

Re: [Announce] The Easiest way to Change Useragent On Stock Browser
 
Changed.UA via.n9qt, works great!

such a shame cant access fb mobile on ios UA haha

ruplee76 2013-06-25 01:46

Re: [Announce] The Easiest way to Change Useragent On Stock Browser
 
Quote:

Originally Posted by soryuuha (Post 1307244)
Changed.UA via.n9qt, works great!

such a shame cant access fb mobile on ios UA haha

Even i tried ios and android, but with both UA, can't use touch.facebook.com. Is there anybody facing same problem and someone can suggest a solution for this?


All times are GMT. The time now is 20:53.

vBulletin® Version 3.8.8