PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   HTC Apache Development (http://forum.ppcgeeks.com/forumdisplay.php?f=53)
-   -   Sprint Users: Want a working Picture Mail site? Here you go! WM6 ONLY (http://forum.ppcgeeks.com/showthread.php?t=9845)

luv2chill 10-12-2007 11:06 PM

Sprint Users: Want a working Picture Mail site? Here you go! WM6 ONLY
 
1 Attachment(s)
OK guys I can take credit for this one--I spent a long time trying to figure out why Picture Mail broke on the Apache beginning with AKU3. I'm happy to report that the problem is solved for WM6 users. Read on for the details or if you just want the hack scroll down to the end.

Background

The reason this whole problem happened on the Apache is that the User Agent String changed. That is a small text blurb that gets sent to every site you visit that basically tries to tell the web site what kind of web browser and device is being used. Web servers use that information for many reasons, but one use is to send different "views" of the same information to different users depending on what kind of device they're using to view it.

That is exactly what Sprint does for their Picture Mail web site. The problem is that they use very specific rules about which UA Strings get sent to the WAP Picture Mail site (which is the one that works on our devices). If your UA String doesn't match exactly one of the ones they've programmed in then you get sent to the desktop version of the site--which doesn't work in PIE at all, as you no doubt know. Sprint programmed in the UA Strings that match with all of their devices in the their default configuration, but when you updated your ROM to WM5 AKU3 or to WM6 (which are not configurations Sprint offered nor supports) then your UA String no longer matched and you got sent to the default desktop site.

In versions of WM5 prior to AKU3 you'd always been able to modify the user agent string in the registry. However, Microsoft in AKU3 decided to hard-code a specific UA String and did not allow it to be changed--only appended to. So that's why, despite peoples' best efforts, you had to resort to using a 3rd party browser in order to get the WAP site. And I'm sorry to say that that is still the case--if you stick with WM5 you can't use this solution--it will have no effect.

However, in doing some research I found that Microsoft, in response to many complaints about the UA String restrictions in WM5, added the ability to prepend information to the UA String beginning with WM6. You still can't totally get rid of what is hard-coded into browser.dll, but you can put anything you want in front of it--which is what is going to help us solve this picture mail problem once and for all.

The Mogul (6800) by Sprint also had its default UA String hard-coded into Sprint's servers to get sent the WAP version of the Picture Mail site. So what I did was obtain the entire UA String from the Mogul and add it into this new prepend reg entry on the Apache. As a result, the Apache sends two UA Strings--the entire mogul UA String first (which is enough for Sprint's Picture Mail site to recognize it as a mogul and therefore send the WAP site) and then it sends the version hard-coded into the Apache.

Caveats? Well it's possible there are web sites you visit that don't like getting two UA Strings--but in the testing I have done I haven't seen any problems. So at this point I think it's reasonable to put this out there. Remember that your device's actual UA string is never removed or overwritten, so if this causes problems for some of your "must-visit" sites, then you can simply remove the reg entry (or uninstall the cab, depending on what method you use to install it) and you're back to normal.

Note that this hack will also be necessary for moguls that get flashed with custom ROMs (using newer AKUs of WM6). You can go to www.useragentstring.com using PIE on your device to see what its current UA String is--then compare it to this one. If it doesn't match exactly then you'll need this hack in order to view Sprint's picture mail site successfully using PIE.

The Hack

For those of you who are comfortable editing your own registry, then here is what you need to add. I suggest copying and pasting it into a .reg file and importing it directly onto your device so you can be absolutely sure it's entered exactly as written.

Code:

;Allow Sprint Picturemail site to work in WM6 (Makes PIE report as a PPC6800/Mogul)
[HKEY_LOCAL_MACHINE\Security\Internet Explorer\User Agent]
"CustomBase"="Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 6.12) Sprint:PPC6800"

If you'd rather not go through all that hassle then just download and install the cab file I've created and attached to this post (unzip it first). If PIE is open at the time you should close it and reopen it (or soft reset to be sure). Then try and open a picture mail link. It should work!

If it does not, please go to www.useragentstring.com using PIE on your device, copy and paste the string it shows you into a message in this thread and we'll figure it out. I really don't expect many problems at all--this is pretty straightforward.

Enjoy! One more long-running bug squashed.

Trident 10-12-2007 11:26 PM

You da man.
This was a frustrating thing.
It never worked well for me, even when I had the OEM WM5 ROM installed.
I'll be installing this tonight to give it a try.

zizo72 10-13-2007 01:13 AM

luv2cill how do I LOG TO MIRC? WHAT SERVER?

varaff 10-13-2007 10:31 PM

Oooh Crap!!! you are the man!!!
Thanks Luv2chil....

KINYA 10-13-2007 11:27 PM

I don't see the cab file how do I edit the registry

omegax 10-14-2007 10:15 AM

Quote:

Originally Posted by KINYA (Post 101220)
I don't see the cab file how do I edit the registry

first of all you have to be logged in to see the files. Just download the zip and extract. good luck!

scotbotmosh 10-14-2007 11:18 AM

Sweet, can't wait, this has been chapping my hide for a while now.

nkawal 10-14-2007 10:25 PM

I Bow before you my friend...........It Finally Works

Tomn8tr 10-15-2007 02:59 PM

Wow, it works! Great stuff!

Thanks Luv2Chill - This was one of those damn annoying things. That description of what caused this problem makes a lot of sense.

Just pulled ina picture mail- ahhhh, just like the good ole days!

Tomn8tr

takmsdsm 10-15-2007 05:00 PM

NICE! good job


All times are GMT -4. The time now is 10:54 AM.

Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0