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
|
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? |
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
|
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. |
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
|
Quote:
Thank you again for your work getting this working again. I missed it. |
|
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
|
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.
|
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
|
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? |
10/12/2009, 02:19 AM
|
#215 (permalink) | |
|
Member
![]() Join Date: Jul 2009
Posts: 547
Likes Received: 0
Thanks: 50
Thanked 53 Times in 41 Posts
|
Quote:
__________________
|
|
10/12/2009, 01:06 PM
|
#219 (permalink) |
|
Member
![]() Join Date: Nov 1999
Location: City of Champions!!!
Posts: 617
Likes Received: 0
Thanks: 5
Thanked 54 Times in 36 Posts
|
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. i iDid 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!
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|



