webOS Nation Forums >  Homebrew >  webOS patches > iPhone User Agent Spoof - How to make all mobile websites display perfectly
iPhone User Agent Spoof - How to make all mobile websites display perfectly

  Reply
Like Tree7Likes

 
LinkBack Thread Tools Display Modes
Old 10/09/2009, 10:41 PM   #201 (permalink)
Member
 
Join Date: Feb 2008
Posts: 48
Likes Received: 0
Thanks: 27
Thanked 13 Times in 7 Posts
Default

Quote:
Originally Posted by pdog197804 View Post
is this not the same patch as the iphone spoof agent???
Yes, this is the iphone spoof agent patch.
stflush is offline   Reply With Quote
Old 10/10/2009, 03:20 AM   #202 (permalink)
Member
 
Join Date: Aug 2007
Posts: 44
Likes Received: 0
Thanks: 28
Thanked 21 Times in 5 Posts
Default

Only problem I'm having is it is not reformatting mobile pages to be viewed correctly. Still coming up with very small text
Zoen22 is offline   Reply With Quote
Old 10/10/2009, 07:22 AM   #203 (permalink)
Member
 
Join Date: Jun 2006
Posts: 314
Likes Received: 0
Thanks: 14
Thanked 10 Times in 10 Posts
Default

wtgreen, thank you. The patch works fine. Have missed it for the pgatour website alone.

I tried looking at the script (change-user-agent) , to try and learn something, and don't understand it. Obviously, I am missing something. All I see is:

#!/bin/sh
#
# Generic installer Copyright 2009 Carl E. Thompson

NAME=$(basename $0)
NUM_LINES=$(( $(grep -n -m 1 -- "^# ---END-SCRIPT---$" $0 | cut -d : -f 1) + 1 ))

do_error()
{
while [ -n "$1" ]
do
echo "ERROR: $1" >&2
shift
done
exit 1
}

TEMPDIR=/tmp/$NAME.install

rm -rf $TEMPDIR || do_error "Could not remove old temporary directory ($TEMPDIR)"
mkdir $TEMPDIR || do_error "Could not create temporary directory ($TEMPDIR)"

tail -n +${NUM_LINES} $0 > $TEMPDIR/data.tar.gz || do_error "Could not create data file"

cd $TEMPDIR || do_error "Could not change to temporary directory ($TEMPDIR)"
tar xzf data.tar.gz || do_error "Could not extract data file"
sh runme.sh "$@" || do_error "Installer exited abnormally"

rm -rf $TEMPDIR
exit 0

# ---END-SCRIPT---

and then gibberish after ---END-SCRIPT--- which I assume is the WebKitLuna.so.

What am I missing?
todivefor is offline   Reply With Quote
Old 10/10/2009, 10:42 AM   #204 (permalink)
Member
 
Join Date: Jul 2009
Posts: 323
Likes Received: 9
Thanks: 42
Thanked 81 Times in 44 Posts
Default

The change_user_agent script is a sophisticated little program. I learned quite a bit by disassembling it myself. It's a text script followed by a binary payload, a compressed archive containing another script, runme.sh, a program that patches binary files, bspatch, and the binary patch instruction data file itself, the *.bsdiff file.

When change_user_agent runs, it searches its body for the END-SCRIPT marker, saving everything after it - the binary payload - to a file called data.tar.gz, and then uncompresses it to a temp directory, and finally executes the runme.sh script that it uncompressed.

The runme.sh script then checks the OS version and md5sum value of the current libWebKitLuna.so file. If these match what it expects, it backs up the existing .so file and runs the bspatch program to actually apply the patch changes described in the .bsdiff file to the libWebKitLuna.so file. If all goes well and the modified file's md5sum checks out, the phone reboots.

The .bsdiff file itself was created ahead of time by running a program called bsdiff to compare the manually revised libWebKitLuna.so file to the original. This produced the small instruction file describing the differences that bspatch then uses to make the changes, and it allows us to avoid distributing the *.so file itself which would be a clear violation of Palm's rights.

It's really a clever little process which I enjoyed figuring out. It's well written with good error handling too. When you understand how it works you can't help but appreciate ClipCarl's work even more.
ALuckyGuy is offline   Reply With Quote
Old 10/10/2009, 11:44 AM   #205 (permalink)
Member
 
Join Date: Jun 2006
Posts: 314
Likes Received: 0
Thanks: 14
Thanked 10 Times in 10 Posts
Default

Quote:
Originally Posted by wtgreen View Post
The change_user_agent script is a sophisticated little program. I learned quite a bit by disassembling it myself. It's a text script followed by a binary payload, a compressed archive containing another script, runme.sh, a program that patches binary files, bspatch, and the binary patch instruction data file itself, the *.bsdiff file.

When change_user_agent runs, it searches its body for the END-SCRIPT marker, saving everything after it - the binary payload - to a file called data.tar.gz, and then uncompresses it to a temp directory, and finally executes the runme.sh script that it uncompressed.

The runme.sh script then checks the OS version and md5sum value of the current libWebKitLuna.so file. If these match what it expects, it backs up the existing .so file and runs the bspatch program to actually apply the patch changes described in the .bsdiff file to the libWebKitLuna.so file. If all goes well and the modified file's md5sum checks out, the phone reboots.

The .bsdiff file itself was created ahead of time by running a program called bsdiff to compare the manually revised libWebKitLuna.so file to the original. This produced the small instruction file describing the differences that bspatch then uses to make the changes, and it allows us to avoid distributing the *.so file itself which would be a clear violation of Palm's rights.

It's really a clever little process which I enjoyed figuring out. It's well written with good error handling too. When you understand how it works you can't help but appreciate ClipCarl's work even more.
Thank you for the excellent explanation. I sort of put some of that together after I asked the question. I think I'll continue looking at it as an exercise.

Thank you again for your work getting this working again. I missed it.
todivefor is offline   Reply With Quote
Old 10/10/2009, 01:22 PM   #206 (permalink)
Member
 
Join Date: Jul 2009
Posts: 323
Likes Received: 9
Thanks: 42
Thanked 81 Times in 44 Posts
Default

Quote:
Originally Posted by jghacker View Post
Does anyone know if it will be incorporated for install via preware soon? Love the new preware patch installs - and so much less hassle than other methods.
No idea. I haven't looked into how they're done myself, and don't know who really manages it.
ALuckyGuy is offline   Reply With Quote
Old 10/10/2009, 02:52 PM   #207 (permalink)
Member
 
mrdavis55's Avatar
 
Join Date: Jun 2007
Posts: 264
Likes Received: 0
Thanks: 48
Thanked 17 Times in 12 Posts
Default

i'm not seeing this in Preware anymore??? what happened???
__________________
palm m103 > palm m130 > palm TlX > 755p > PRE (FINALLY!!!!)
mrdavis55 is offline   Reply With Quote
Old 10/10/2009, 02:57 PM   #208 (permalink)
Member
 
Join Date: Feb 2008
Posts: 48
Likes Received: 0
Thanks: 27
Thanked 13 Times in 7 Posts
Default

Quote:
Originally Posted by mrdavis55 View Post
i'm not seeing this in Preware anymore??? what happened???
The fix that wtgreen posted for webOS 1.2.1 hasn't been set up for Preware yet. I posted a request in the Offical Patch Discussion thread for 1.2.1. Hopefully someone can help out.
stflush is offline   Reply With Quote
Old 10/10/2009, 09:51 PM   #209 (permalink)
Member
 
holley2583's Avatar
 
Join Date: Aug 2009
Location: Boston
Posts: 355
Likes Received: 1
Thanks: 83
Thanked 23 Times in 14 Posts
Default

What do u open the zip with? i cant get it to open correctly with anything...i know it's a dumb question but hey, im pressured.
holley2583 is offline   Reply With Quote
Old 10/11/2009, 07:28 AM   #210 (permalink)
Member
 
Join Date: Jul 2009
Posts: 323
Likes Received: 9
Thanks: 42
Thanked 81 Times in 44 Posts
Default

when you say open correctly, what do you mean? It doesn't take anything special to open it. It extracts to a single file that is a text script with a binary payload following it. It looks odd if you view the file, but it's designed that way intentionally.
ALuckyGuy is offline   Reply With Quote
Old 10/11/2009, 08:52 PM   #211 (permalink)
Member
 
holley2583's Avatar
 
Join Date: Aug 2009
Location: Boston
Posts: 355
Likes Received: 1
Thanks: 83
Thanked 23 Times in 14 Posts
Default

so just put the file in say quick install and that's it?
holley2583 is offline   Reply With Quote
Old 10/11/2009, 09:11 PM   #212 (permalink)
Member
 
Join Date: Jul 2009
Posts: 323
Likes Received: 9
Thanks: 42
Thanked 81 Times in 44 Posts
Default

Quote:
Originally Posted by holley2583 View Post
so just put the file in say quick install and that's it?
Follow the instructions in the first post of the thread.
ALuckyGuy is offline   Reply With Quote
Old 10/12/2009, 12:33 AM   #213 (permalink)
Member
 
Join Date: Feb 2004
Posts: 53
Likes Received: 0
Thanks: 0
Thanked 1 Time in 1 Post
Default

I'm a bit confused. Does this require that I root my Pre first?

I have PreWare installed, and I saw in the posts above that it's not on there yet.

However, I do see this under "tweaks" in WebOS Quick Install, but it gives a warning message that it's not guaranteed to work in WebOS 1.2.1

Should I install the one listed under "tweaks" in WebOS Quick Install?
myculito is offline   Reply With Quote
Old 10/12/2009, 01:04 AM   #214 (permalink)
Member
 
holley2583's Avatar
 
Join Date: Aug 2009
Location: Boston
Posts: 355
Likes Received: 1
Thanks: 83
Thanked 23 Times in 14 Posts
Talking

Quote:
Originally Posted by wtgreen View Post
Follow the instructions in the first post of the thread.
Duh, I guess I wasn't sure if it worked the same way...but I got it workin and THANKS so much...really needed it!
holley2583 is offline   Reply With Quote
Old 10/12/2009, 02:19 AM   #215 (permalink)
Member
 
gage006's Avatar
 
Join Date: Jul 2009
Posts: 547
Likes Received: 0
Thanks: 50
Thanked 53 Times in 41 Posts
Default

Quote:
Originally Posted by myculito View Post
I'm a bit confused. Does this require that I root my Pre first?

I have PreWare installed, and I saw in the posts above that it's not on there yet.

However, I do see this under "tweaks" in WebOS Quick Install, but it gives a warning message that it's not guaranteed to work in WebOS 1.2.1

Should I install the one listed under "tweaks" in WebOS Quick Install?
Required you have it rooted. You need novacom/novaterm installed and working. Quick Install/Preware version coming eventually.
__________________
Twitter
gage006 is offline   Reply With Quote
Old 10/12/2009, 02:59 AM   #216 (permalink)
Member
 
Join Date: Feb 2004
Posts: 53
Likes Received: 0
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by gage006 View Post
Required you have it rooted. You need novacom/novaterm installed and working. Quick Install/Preware version coming eventually.
Gage, thanks. I already have Novacom installed. Am I considered "rooted"?
myculito is offline   Reply With Quote
Old 10/12/2009, 08:17 AM   #217 (permalink)
Member
 
Join Date: Jul 2009
Posts: 323
Likes Received: 9
Thanks: 42
Thanked 81 Times in 44 Posts
Default

myculito,

If you can get to a root@castle prompt on your phone, you're "rooted" my friend.
ALuckyGuy is offline   Reply With Quote
Old 10/12/2009, 11:40 AM   #218 (permalink)
Member
 
Join Date: Sep 2009
Posts: 268
Likes Received: 0
Thanks: 2
Thanked 15 Times in 13 Posts
Default

Say if you go to gmail though a web page on the pre will this help it to show more of the text of the email while in landscape? (standard mode)
Forever92 is offline   Reply With Quote
Old 10/12/2009, 01:06 PM   #219 (permalink)
Member
 
Paladin's Avatar
 
Join Date: Nov 1999
Location: City of Champions!!!
Posts: 617
Likes Received: 0
Thanks: 5
Thanked 54 Times in 36 Posts
Default

Should I still do this manually or use WebOSQuick install? Are they the same now?
What about the one from Preware? I am just confused on which way to do this.

Man I cannot even cut and paste to/from novacom, lame. ?
__________________
Systems Analyst by trade, Drummer by desire and Music Lover by birth. A self proclaimed Geek and gadget nut. ii

Did you know: The Pittsburgh Steelers have more championships than 21 other NFL teams combined!
Pittsburgh Steelers-6 Time Super Bowl Champions!

Pittsburgh Penguins-3 Time Stanley Cup Champions!
Paladin is offline   Reply With Quote
Old 10/12/2009, 01:13 PM   #220 (permalink)
Member
 
Join Date: Jun 2006
Posts: 314
Likes Received: 0
Thanks: 14
Thanked 10 Times in 10 Posts
Default

Quote:
Originally Posted by Paladin View Post
Should I still do this manually or use WebOSQuick install? Are they the same now?
What about the one from Preware? I am just confused on which way to do this.

Man I cannot even cut and paste to/from novacom, lame. ?
You will have to do this manually. Preware does not have it. It may be available in next release of WebOSQuickInstall.
todivefor is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0