N2A's Weather Patched Files

Before you install...

You must install the SDK Certificates on your device before installing any of the below packages or using the new patcher system, or the patched HTC home plugins won't work correctly. This must be copied to your device and executed on there manually - you can't CABviaActiveSync it. Copy to your device, and execute using your favorite file manager. You might also need to disable the HTC Home plugin, if you have one running already, from Start -> Settings -> Today -> Items if you have any issues installing (such as access denied errors, or unable to install errors).

NEW! Universal Patch Kit and Package Creator

I've created a new universal patch kit, which will take your existing HTCHome.dll file, automatically decompress it if necessary, patch it, re-sign it, and automatically recompress it with UPX if possible. I expect some issues with the WM5 versions, although I welcome feedback on it. Decompress it into a folder, copy your htchome.dll folder from your device into the created N2A-Patcher folder, run the n2a-patcher batch file, and watch it do it's thing. You should end up with an installable cabfile, to be used either with CABviaActiveSync or to be copied to the device and executed. You will need to install the SDK Certificates on the phone before installing the created package. Please report any errors, although I've tried to make it as foolproof as possible. I've also created an automatic packager, for those who already have a modified DLL and just want it in a CAB file, and an automatic patcher, which will automatically do the hexedit and re-sign required on an unmodified DLL file, ready for cooking for example.

Device Patchers

These are for specific devices, where the existing HTC Home plugin in ROM can be directly replaced with an easy installer. These do NOT change the graphics or add extra features, they just patch what is already there to use my server. You need to seperately edit your \WINDOWS\HH_0409_WeatherCities.xml (or corresponding localized file) afterwards. I suggest something like Crimson Editor (use the link for the cedt-215-setup.exe file) to do it. Notepad can be unreliable for the purpose. You may also need the likes of Resco Explorer to copy the XML file back into \WINDOWS (ie you may have to save it somewhere else then copy it across to \WINDOWS using Resco Explorer). These are only generally for the devices specified - other devices will need the whole plugin install.

For original HTC ROMs or with specific cooked HTC Home plugins installed

Specific ROM overlays

These are for specific ROM releases, where the existing HTC Home plugin in ROM can be directly replaced with an easy installer. These do NOT change the graphics or add extra features, they just patch what is already there to use my server. You need to seperately edit your \WINDOWS\HH_0409_WeatherCities.xml (or corresponding localized file) afterwards. I suggest something like Crimson Editor (use the link for the cedt-215-setup.exe file) to do it. Notepad can be unreliable for the purpose. You may also need the likes of Resco Explorer to copy the XML file back into \WINDOWS (ie you may have to save it somewhere else then copy it across to \WINDOWS using Resco Explorer). These are only generally for the ROMs specified.

Released patched versions of HTC Home

I have patched the latest 2.1 version of Schen's HTC Home cab, and the xplode HTC Home cab. The xplode cab was originally released for the Blue Angel device, so if you have a BA and the Schen version isn't working for you, try the xplode one. There's also two versions of the Schen one - with a fix for the brightness shortcut for Hermes/TyTN/Vario II devices, and one for all other devices. There is also a version for WM5 below, but this doesn't seem to update over GPRS - if someone can provide one that does, I'll happily patch that too.

I suggest removing any other HTC Home versions from Remove Programs (or Add/Remove Programs in ActiveSync) before installing any of the ones below if possible.

The WM6 packages all put their weather XML files in \HTCHome, with the exception of the Touch version.

Server-side script

The latest server-side script is available below (version 0.2.5, the same as the currently live one), if you wish to run your own server for use either via a hexedit or IP redirection. However, if you don't know what you're doing with this, you're more than welcome to keep using my server for your weather translation needs.

How do I use this, and customise my cities?

Here's a quick step-by-step guide.

  1. First of all, install the above SDK certificates if you haven't already.
  2. Uninstall any existing HTC Home plugin if possible. If it's in the ROM, deactivate it from Start -> Settings -> Today -> Items.
  3. Download and install an appropriate package from below.
  4. Ensure the HTC Home plugin is not enabled from Start-> Settings-> Today-> Items.
  5. Edit the \HTCHome\HH_0409_WeatherCities.xml (WM6 6-tab versions) or \WINDOWS\HH_0409_WeatherCities.xml. (all others, including device patchers) or corresponding localized file - the number can vary, e.g. 040C, depending on language. I suggest something like Crimson Editor (use the link for the cedt-215-setup.exe file) to do it, as notepad can be unreliable for the purpose. Copy an existing line from the file, beginning with <city, and paste a copy below it. Change the newly pasted line to have your information on it. If you aren't in the US using the ZIP code method, you'll need to follow these steps to get your international location code:
    • Go to the AccuWeather International World Weather page.
    • Put your local city/town in the Your Local Forecast box, e.g. Manchester, UK
    • If you don't see something like EUR|UK|UK174|Manchester in the URL, click the top link with the town/city name (directly above "Forecast Center"). You'll then magically get that part of the URL.
    • Make a note of this code, e.g. EUR|UK|UK174|Manchester for Manchester, UK. You'll need to enter this into the XML file. Make sure there's no trailing pipe (ie "|") at the end.
    Examples are as follows (please ignore word wrapping!)
    • Most versions - USA ZIP code: <city name="Fort Belvoir, US" loca="22060" land="United States"/>
    • Most versions - International: <city name="Manchester, UK" loca="EUR|UK|UK174|Manchester" land="United Kingdom"/>
    • 3 button HTC Touch Home plugin - USA ZIP code: <city name="Fort Belvoir, US" locationcode="22060"/>
    • 3 button HTC Touch Home plugin - International: <city name="Manchester, UK" locationcode="EUR|UK|UK174|Manchester"/>
  6. Save your file somewhere, ready for transfer back to your device.
  7. Attempt to copy it to \HTCHome or \WINDOWS respectively (where you found it in the first place) on the device (via ActiveSync -> Explore). If this fails, I suggest you use something along the likes of Resco Explorer, and do the following:
    • Save the file somewhere on the device, e.g. \My Documents
    • Use Resco Explorer (or an alternative) to copy the XML file back into \WINDOWS.
  8. Re-enable the HTC Home plugin from Start-> Settings-> Today-> Items.
  9. Tap on the "Select city" or the city that is already there, to pull up the city list.
  10. Select your newly created city.
  11. Cross your fingers, and tap "Select" (left softkey).

That should hopefully be it!

OEM packages

I'm taking the current OEM packages offline until I can fully test them. Hopefully I'll have them back up and tested, and ready to drop into your local friendly kitchen soon. In the meantime, you can always roll your own hack as seen below.

Roll-your-own hack - MOST PEOPLE DON'T NEED TO DO THIS, IF YOU'RE AN ORDINARY USER, IGNORE THIS SECTION COMPLETELY!

You'll need a hex editor (I recommend XVI32) and a signature tool and signature (here's the one I use, SignCode.zip - type "sign filename" at a command line to sign it - you must have a full path specified though, or be in the same directory as the signcode tools, e.g. sign c:\temp\htchome.dll!).

Open up the DLL with the hex editor, and replace the first line with the second one:

From:
http://htc.accuweather.com/widget/htc/forecast-data_v3.asp?ac=TR2cra9U&locCode=
To:
http://weather.not2advanced.com/htcweather/forecastdata.php?ac=XDADevs&locCode=

Please note that the text is in 16-bit Unicode, so you'll need to set your hexeditor to search and replace accordingly (e.g. in XVI32, tick both boxes for "as Unicode Latin (UTF-16LE)", and set it to be case sensitive, just to be on the safe side). Once you've edited the file, re-sign it.

Comments, questions, etc

Please see the original thread on the XDA developers board. Please don't PM me unless I ask you to, try to keep it on the thread! I'm normally fairly fast at replying and support.

File hosting courtesy of HyperInfinity

HyperInfinity Hosting