Page 45 of 46 FirstFirst ... 3540414243444546 LastLast
Results 881 to 900 of 913
Like Tree8Likes
  1. #881  
    I used the most recent one (linked on page 38 of this thread), and then needed to modify it. I wasn't sure what all needed modification, so I just changed the variables to

    OLD_UA='Mozilla/5.0 (webOS/%s; U; %s) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 %s'
    NEW_UA='Mozilla/5.0 (iPhone; U; en)(webOS/%s; U; %s) AppleWebKit/532.2 Version/1.0 Safari/532.2 %s -CET'
    based purely on what they had been, but modified to match what I grepped from /usr/lib/libWebKitLuna.so (from memory, the file might be called something else).

    My patching gave the following error:
    ./change-user-agent: line 88: 2.1.2: not found
    but I assume that's fixable. I'm trying a similar process for 2.2.4 on the pre2, but it's not clear that will work.

    UPDATE: doing something similar on 2.2.4 rendered the pre2 unbootable, as it crashes BrowserServer.
    Last edited by summatusmentis; 12/25/2011 at 12:52 AM. Reason: updated info
  2. sbhas2k's Avatar
    Posts
    32 Posts
    Global Posts
    38 Global Posts
    #882  
    Any update to make it work on 2.2.4 ?

    -- Sent from my Palm Pre using Forums
  3. hape's Avatar
    Posts
    556 Posts
    Global Posts
    578 Global Posts
    #883  
    Quote Originally Posted by sbhas2k View Post
    Any update to make it work on 2.2.4 ?

    -- Sent from my Palm Pre using Forums
    here it is. The backup file is written to /media/internal.

    HaPe
    Attached Files Attached Files
  4. sbhas2k's Avatar
    Posts
    32 Posts
    Global Posts
    38 Global Posts
    #884  
    ^^Thanks.. Will try and let you know the observation...

    Update: Worked as expected. Thanks
    Last edited by sbhas2k; 01/09/2012 at 01:17 AM.
  5. roams11's Avatar
    Posts
    137 Posts
    Global Posts
    140 Global Posts
    #885  
    Thanks.
    The new version on 2.2.4 worked well. The one disappointment on some web sites using this is it won't allow you to view Flash content, as the iPhone can't. If you are okay with this, this is an excellent way to get the mobile content link automatically.
    Sprint Franken-Pre 2
  6. #886  
    Quote Originally Posted by HaPe View Post
    here it is. The backup file is written to /media/internal.

    HaPe
    This worked for me on 2.2.4, but I now get a "database error: Error: SECURITY_ERR: DOM Exception 18" when I try to use Google Music. I recognize this is off topic for this thread, just reporting back.
  7. #887  
    Quote Originally Posted by UpTheRams View Post
    Pre 3
    So the file on page 38 works for the Pre 3 (I haven't tried uninstalling yet as I don't want to break it now it works, but the install is working), but note the following:
    1. Youtube and Dailymotion videos do not work from the mobile sites (haven't tried others).
    2. Youtube and Dailymotion videos do work from the desktop sites:
    - click the small square of squares in the top right corner of the mobile sites;
    - select the desktop version;
    - Youtube video opened for me in new window as was previously the case, played fine;
    - Dailymotion (and possibly others): rotate to landscape, double tap video for "full-screen" zoom.
    3. Annoying pop ups telling you that there is "an app for that". Anyone know how to turn these off?
    Can someone please fix this!!! So annoying! I tried showing my boss a video on Youtube and forgot about the workaround...how embarrassing. It would be nice if it worked
  8. getsun's Avatar
    Posts
    60 Posts
    Global Posts
    62 Global Posts
    #888  
    Any work on getting drupal / joomla / etc to natively detect webOS as a mobile device? e.g. I believe there's a drupal patch for its mobile module, but yet to be integrated into is latest release.
  9. #889  
    How about we try setting the useragent as the browser from an Android phone with the same screen res as the Pre3 ?
  10. #890  
    This wont work for webos 3.0.5... it says it cant find the file specified...any idea why? THanks

    Quote Originally Posted by zingalala View Post
    I did a quick hack for HP TouchPad running webOS 3.0.2. I patched the user agent string to that of iPad. See if you can use this.

    Code:
    #!/bin/sh
    
    # Edited by Anonymous to support HP TouchPad, webOS 3.0.2
    
    # User Agent Spoofer for webOS devices (universal)
    # Copyright 2009-2010 Carl E. Thompson (devel-webos [at] carlthompson.net)
    # Much help from hofs1 and wtgreen at PreCentral.net . Thank you.
    
    PATCH_VERSION="2.5"
    
    # these must be the same length
    # these are for webOS 3.0.2
    OLD_UA='Mozilla/5.0 (%s; Linux; %s/%s; U; %s) AppleWebKit/534.6 (KHTML, like Gecko) %s/234.40.1 Safari/534.6 %s/%s'
    NEW_UA='Mozilla/5.0 (iPad; U; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/'
    
    # these are for webOS 2.0
    OLD_UA_2_0='Mozilla/5.0 (webOS/%s; U; %s) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 %s'
    NEW_UA_2_0='Mozilla/5.0 (iPhone; U; en)(webOS/%s; U; %s) AppleWebKit/532.2 Version/1.0 Safari/532.2 %s -CET'
    
    # these are for webOS 1.2 and 1.3
    OLD_UA_1_2='Mozilla/5.0 (webOS/%s; U; %s) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/1.0 Safari/525.27.1 %s'
    NEW_UA_1_2='Mozilla/5.0 (iPhone; U; en)(webOS/%s; U; %s) AppleWebKit/525.27.1 Version/1.0 Safari/525.27.1 %s -CET'
    
    # these are for webOS 1.1
    OLD_UA_1_1='Mozilla/5.0 (webOS/1.1; U; %s) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/1.0 Safari/525.27.1 Pre/1.0'
    NEW_UA_1_1='Mozilla/5.0 (iPhone; U; en)(webOS/1.1; U; %s) AppleWebKit/525.27.1 Version/1.0 Safari/525.27.1 Pre/1.0 -CET'
    
    WEBOS_VERSION=$(cat /etc/palm-build-info | sed -nre "s/^PRODUCT_VERSION_STRING\s*=\s*HP webOS\s*(.*)/\1/p")
    
    FILE="/usr/lib/libWebKitLuna.so"
    BACKUP_FILE="/usr/lib/libWebKitLuna.so-iphone_user_agent-${WEBOS_VERSION}.bak"
    TEMP_FILE="/tmp/libWebKitLuna.so-iphone_user_agent.patched"
    
    do_error() { while [ -n "$1" ]; do echo "ERROR: $1" >&2; shift; done; exit 1; }
    
    options() { echo "Available command line options: install, uninstall, restore-backup, help"; }
    
    clear_browser_cookies()
    {
        cp -f /var/palm/data/browser-cookies.db . || do_error "Could not copy browser cookies database"
        sqlite3 browser-cookies.db "delete from Cookies;" || do_error "Could not clear browser cookies"
        mv -f browser-cookies.db /var/palm/data/browser-cookies.db || do_error "Could not update browser cookies database"
    }
    
    remove_all_backups() { rm -f /usr/lib/libWebKitLuna.so-iphone_user_agent*; }
    
    sedify() { echo "$1" | sed -e 's/\//\\\//g' -e 's/(/\\(/g' -e 's/)/\\)/g'; }
    
    do_patch()
    {
            if grep -Fq "$2" $FILE
            then
                echo "User agent already in desired state so no action appears necessary. Exiting."
                exit 0
            fi
            grep -Fq "$1" $FILE || do_error "Could not find area to patch (unknown file version?)"
            OLD=$(sedify "$1")
            NEW=$(sedify "$2")
            sed -re "s/$OLD/$NEW/" $FILE > $TEMP_FILE || do_error "Could not patch file"
            mv -f $TEMP_FILE $FILE || do_error "Could not rename patched file to original name"
    }
    
    remount() { mount / -oremount,rw || do_error "Could not remount root filesystem read/write"; }
    
    echo "User Agent Spoofer version $PATCH_VERSION for all Palm webOS devices"
    echo "Copyright 2009 - 2010 Carl E. Thompson (devel-webos [at] carlthompson.net)"
    echo "Much help from hofs1 and wtgreen at PreCentral.net . Thank you."
    echo
    echo "This program patches the web browser on a webOS device to add an \"iPhone\" tag"
    echo "to the identifying string it sends to web sites (along with the normal webOS"
    echo "and Palm device tags). This causes most web sites that don't know about webOS"
    echo "devices to think that it is an iPhone and send the iPhone optimized version"
    echo "of the web page rather than a generic unoptimized version. Since the browser"
    echo "on webOS devices can display the iPhone version of web pages correctly, this"
    echo "allows nearly all mobile web sites to display an optimized version on webOS"
    echo "devices even without direct support for them."
    echo
    
    [ -n "$WEBOS_VERSION" ] || do_error "This patch only runs on Palm webOS devices"
    
    # if this is webOS 1.2 or 1.3
    if echo "$WEBOS_VERSION" | grep -Eq "^1\.[23]($|[^0-9])"
    then
        OLD_UA="$OLD_UA_1_2"
        NEW_UA="$NEW_UA_1_2"
    # if this is webOS 1.1
    elif echo "$WEBOS_VERSION" | grep -Eq "^1\.1($|[^0-9])"
    then
        OLD_UA="$OLD_UA_1_1"
        NEW_UA="$NEW_UA_1_1"
    elif echo "$WEBOS_VERSION" | grep -Eq "^2\.0($|[^0-9])"
    then
        OLD_UA="$OLD_UA_2_0"
        NEW_UA="$NEW_UA_2_0"
    fi
    
    # Make sure user agent strings are the same length
    [ "${#OLD_UA}" = "${#NEW_UA}" ] || do_error "Old and new user agent strings are not the same length"
    
    [ -n "$1" ] && OPT="$1" || OPT="install"
    
    case "$OPT" in
        -u|--uninstall|-uninstall|uninstall)
            echo "Removing user agent spoof patch. Phone will reboot when done."
            remount
            do_patch "$NEW_UA" "$OLD_UA"
            remove_all_backups
            ;;
    
        -i|--install|-install|install)
            echo "Applying user agent spoof patch. Phone will reboot when done."
            remount
            remove_all_backups
            cp -f $FILE $BACKUP_FILE || do_error "Could not copy original file to backup"
            do_patch "$OLD_UA" "$NEW_UA"
            ;;
    
        -r|--restore-backup|-restore-backup|restore-backup)
            echo "Restoring library file from backup. Phone will reboot when done."
            [ -r $BACKUP_FILE ] || do_error "Backup file for this version of webOS not found (not installed?)"
            remount
            mv -f $BACKUP_FILE $FILE || do_error "Restoring from backup failed"
            remove_all_backups
            ;;
    
        -c|--clear-cookies|-clear-cookies|clear-cookies)
            echo "Clearing browser cookies only. Phone will reboot when done."
            ;;
    
        -h|--help|-help|help)
            options
            exit 0
            ;;
    
        *)
            do_error "Unknown option: $OPT" "$(options)"
            ;;
    esac
    
    clear_browser_cookies
    sync
    /sbin/reboot || do_error "Reboot failed"
  11. #891  
    The method described in this topic doesn't work on 2.1.2 Veers. The update script fails with "Could not rename patched file to original name" error message. This obviously happens because libWebKitLuna.so is ~12MB, and there's no 12 MBs left on the parition hosting the /usr/lib directory. (Actually, I didn't try rebooting the phone after the fail, but I'm pretty sure it would have been "bricked" - ie. need a doctoring -, because there was the original .so backed up, and a slightly shorter patched libWebKitLuna.so, which most likely would have failed to load at startup.)

    The solution is to use novabrowser to download the original libWebKitLuna.so from the phone, patch the file on your computer (any binary-safe file editor can be used), and then delete the original libWebKitLuna.so from the phone and upload the patched libWebKitLuna.so to the Veer again.
    Last edited by felrefordit; 02/29/2012 at 06:44 PM.
  12. grd787's Avatar
    Posts
    11 Posts
    Global Posts
    13 Global Posts
    #892  
    Quote Originally Posted by HaPe View Post
    here it is. The backup file is written to /media/internal.

    HaPe
    I just tried this on a 2.2.4 pre3 and tried a mobile banking site and can't get the site to switch over to the iOS version. Ill report back if anything changes.

    UPDATE getting the same Google music errors....annoying
    Last edited by greg787; 03/24/2012 at 09:40 PM.
    samsung sgh-e317 --> iPhone 2g --> Blackberry Pearl --> iPhone 2g --> iPhone 3g --> Blackberry Curve 8310 --> Palm Pre + --> Palm Pre 3/ iPhone 4/HD2
  13. #893  
    Quote Originally Posted by HaPe View Post
    here it is. The backup file is written to /media/internal.

    HaPe
    This did it for my Pre 3 2.2.4 WR. Any updates for the TouchPad 3.0.5?
  14. veerar's Avatar
    Posts
    180 Posts
    Global Posts
    192 Global Posts
    #894  
    Quote Originally Posted by Furuboru View Post
    This did it for my Pre 3 2.2.4 WR. Any updates for the TouchPad 3.0.5?
    Works on my pre3 , but youtube does not work anymore
  15. #895  
    For TouchPad webOS 3.0.5 we should change OLD_UA to :

    OLD_UA='Mozilla/5.0 (%s; Linux; %s/%s; U; %s) AppleWebKit/534.6 (KHTML, like Gecko) %s/234.83 Safari/534.6 %s/%s'

    I have tested on my TouchPad webOs 3.0.5 with NEW_UA from ipad /iphone and Macintosh , works fine !
    But when we used UA of ipad , we have no control bar on Youtube , i dont know why , but i think because it's difference between webOS browser and iOS browser .

    Now I used UA of Macintosh ( thanks eieiosoftware ) and It's work amazing on my TouchPad .

    P/S : Change this file to change-user-agent.sh
    And from the command line type :
    /media/internal/change-user-agent.sh
    Attached Files Attached Files
  16. #896  
    Had a sync problem with Chapura's PocketMirror on my Pre 3 after the spoof, turns out they need the last %s/%s part of the string (i.e. Pre/3.0) to verify your phone with their servers.

    Edited the patch to this instead:

    OLD_UA='Mozilla/5.0 (Linux; webOS/%s; U; %s) AppleWebKit/534.6 (KHTML, like Gecko) %s/221.56 Safari/534.6 %s/%s' #webOS 2.2.4
    #OLD_UA='Mozilla/5.0 (Linux; webOS/%s; U; %s) AppleWebKit/534.6 (KHTML, like Gecko) %s/221.54 Safari/534.6 %s/%s' #webOS 2.2.3
    NEW_UA='Mozilla/5.0 (iPhone; U; en)(webOS/%s; U; %s) AppleWebKit/534.6 Version/1.0 Safari/534.6 %s/221.56 %s/%s'
    Best of both worlds now

    Tempted to merge all these patches into an ALL-IN-ONE patch (TouchPad 3.0.5, Pre 3 2.2.4, etc.) but no time yet.

    Oh, and the youtube problem? Just surf to Youtube from the browser and search from there. Videos play nicely. Haven't tried it without my mod though. But the separate Youtube app will default to the iPhone UA.
  17. Goyena's Avatar
    Posts
    893 Posts
    Global Posts
    894 Global Posts
    #897  
    I have a Pre 3 with 2.2.4. Thanks for this; I have YouTube with the workaround to use the desktop link. i do need Flash from time to time, so I have a few questions that I didn't see answered above:

    - Is there a way to adjust the resolution for the Pre 3 by using another UA?
    - Is there a way to switch on the fly (without reboot, like Chrome 17)
    - Is there a way to install/uninstall on the road (without a computer/WOSQI)?
    Pixi Plus - Pre Plus - Pre 2 - Pre 3 - Touchpad 1 ;-)
  18. #898  
  19. Goyena's Avatar
    Posts
    893 Posts
    Global Posts
    894 Global Posts
    #899  
    Quote Originally Posted by matteebee13 View Post
    Why? Does the patch replace the need for the user agent change script, or does it enable Flash after having applied the UA change? I wasn't able to glean this from the thread.

    I did try to start /media/internal/user-agent-change from wTerm directly on the Pre 3, but it said I didn't have the permission; perhaps I didn't have root. I'm not a Linux person; can you tell me how to get it? From what little I know, I tried "su" but was asked for a password (which is what?) and "sudo" but was told "not found".

    Help?

    -- Sent from my Palm Pre3 using Forums
    Pixi Plus - Pre Plus - Pre 2 - Pre 3 - Touchpad 1 ;-)
  20. #900  
    Quote Originally Posted by Goyena View Post
    Why? Does the patch replace the need for the user agent change script, or does it enable Flash after having applied the UA change? I wasn't able to glean this from the thread.

    I did try to start /media/internal/user-agent-change from wTerm directly on the Pre 3, but it said I didn't have the permission; perhaps I didn't have root. I'm not a Linux person; can you tell me how to get it? From what little I know, I tried "su" but was asked for a password (which is what?) and "sudo" but was told "not found".

    Help?

    -- Sent from my Palm Pre3 using Forums
    What exactly are you trying to achieve? Change screen resolution? What user agent are you trying to change it to and for what purpose? The Pre3 user agent spoof described in the link I provided has instructions for on device install/uninstall "on the fly" (using xecutah). The patch changes your user agent to spoof hulu and several other sites along with the flash player id (I think). From my personal experience, I am able to watch slingbox and hulu with the patch installed. Youtube has to be changed to the desktop version to work and most websites are shown as desktop version, which is much harder to view on a mobile device. So I only use the patch when I want to watch live tv or tivo and uninstall it for browsing (using xecutah). Some advice: Always make a backup and know how to uninstall a patch before you install in case something goes wrong. I can probably help if you can be slightly more specific about what you are trying to do. And a reboot is really not so bad, but I hear you, it can be slightly inconvenient.

Posting Permissions