HTC Home weather customization. - HTC Excalibur

Hello everyone...
I am currently trying to make the HTC weather plugin that is included with the new Rose rom floating around (I am currently using Ricky/Stylez version) and would like some help.
I've searched dozens and dozens of threads it seems on how to add your own city (closest it shows by default is Cincinnati, nearly 45 minutes from me.)
As it stands, I have editied the registry, edited an XML file to add in my citys location information, and attempted to hex edit the .exe file to manually change the lookup address.
The problem I am running into is that I do not have enough room to change it to what it needs to be changed to. Currently, the address that the .exe has is http://www.accuweather.com/?ad=htc, the address I need to change it to is http://weather.not2advanced.com/htcweather/forecastdata.php?locCode=45036 which as you can easily see is much longer than the room alotted. I have tried replacing the string (accuweather) with the n2a one. This leads to the problem of not being able to sign the file afterwards meaning it wouldn't run on my phone.
Can anyone shed some light on how to add more space into an exe via hex? Any time I seem to add in more space, the program fails to sign....please help
**edit**
Has anyone perhaps found a .dll file pertaining the the weather plugin? The only things I have found so far are just pictures the plugin itself uses, the XML file with all the cities + my added location, an exe called weatherapp (the one I have been hex editing) and another exe called weatherupdateservice.
Sorry if anything is hard to understand. I am fairly new to the whole aspect of hex editing. If you need clarifacation on anything, please let me know.

Related

HTC Homeplug Weather fix - get your LOCAL weather! [New universal patch uploaded!]

THIS SERVER HAS NOW BEEN DEACTIVATED - See below / my final post
WARNING! The old IP-based/Pocket Hosts method using my server HAS BEEN DEACTIVATED, as I have had to remove the code in question from the direct IP. This means that selecting the custom weather server purely via the HTC home customizing utilities without installing a patched version of the HTC Home DLL, it WILL NOT WORK and you will just get "unable to retrieve data" messages. If this is the case, please uninstall your existing HTC Home plugin, and use one of the ones off the download page.
You can, if necessary, set up your own IP address to base it on, if you can't use my system for some reason, and use the pocket host method that way (requires your own server). Otherwise, please use the cabs below.
NEW! UNIVERSAL PATCH PACKAGE
I've written a universal patcher, so people can now get the HTC Home package they want, and just patch the HTCHome.dll from \WINDOWS. Simply get the package, unzip, drop your HTCHome.dll file in the N2A-Patcher folder, and run the n2a-patcher script inside. It'll magically create you a package! (This won't work for DLLs which people have already patched, you need to use the unmodified original.) This should negate the need for me to create individual packages anymore. Feedback welcome! As a result, I won't be releasing any more complete packages - just install your personal favorite, get the \WINDOWS\HTCHome.dll from your device, drop it in the packager, and let it do it's magic, then install the newly created cab.
Coming soon, if I can figure it out - drop the installer in, and get a patched full installer out! Of course, I have to figure out how to batch extract the cabfile correctly first... *laughs*
I've also just created a DLL to CAB packager (so you can drop your own pre-patched DLL in, and it'll turn it into a ready-to-install cabfile), and a DLL patcher (which just patches the DLL itself, ready for cooking etc - perfect for all you flashers out there!) - all on the download page.
PLEASE DON'T PM ME ABOUT THIS - KEEP IT TO THE THREAD UNLESS I SPECIFICALLY REQUEST A PM OR PM YOU!
Help Request
If anyone has an unpatched Sprint Touch XML file, I could do with a backup copy, for those who corrupt their XML files...
If you've got a Touch, Kaiser/TyTN II or Sprint Touch...
There are specific device DLL replacement packages on the new file download page.
NEW DOWNLOAD AND INSTRUCTION SITE
I've moved all the downloads and instructions to a new page, which will hopefully make it clearer on what people need to download. It also contains full instructions on hexediting the DLL if you wish, and re-signing. I'm not entirely sure if it's more readable or not, but it's certainly more manageable! Feedback welcome. There's some specific overlays now for certain versions of the ROMs too.
FAQ:
Can I install colour customisations to this?
Sure. Take a look around the forum. There's plenty of guides elsewhere.
What does this do?
It reroutes the request to the AccuWeather server to my server instead, which then requests the appropriate data from the AccuWeather server, and translates it into the HTC Weather XML format.
Can I run this via my own server?
Yup. It's running on mine via PHP 5.2.x, using the SimpleXML extension. The code is downloadable from the main download page, and I've even commented it. Once you get it running, you'll need to hexedit the HTCHome.dll file in the same way as described for the ROM chefs. I'd recommend keeping the same length of file for replacement - using directories to pad it out if necessary - it could cause unpredictable results otherwise.
Do I need to run my own server to get my local weather?
Nope, feel free to use mine.
Your server isn't working!
Oops. It's a rarity, but occasionally network outages happen. The server won't be disappearing anytime soon though without any warning! I'm sorry to say that I'll be taking the server down for this shortly as I'm wrapping up my web hosting business and transferring it to another company, but quite a few other people seem to have hosted a copy if people still need it. I hope it's been of use over the years everyone!
Why have you done this?
It was really annoying me that I could only get the weather for a city 25 miles away, that had nothing to do with mine.
Can you make me an XML file for such-a-place?
No, I've done enough already, and it's documented fairly heavily above. If you can't follow instructions, give up and stop trying to hack your phone. I'm not here to hold your hand. I'll help fix bugs and obvious issues, but if you can't edit a textfile, you're on your own.
Release Notes
I've stripped most local data from the return info apart from the town/city and country, but the HTC plugin seems to ignore that anyway. Works for all international locations I've tested. I welcome feedback on anything that's not working though, and I'll try to get it nailed pretty quickly. As said above, also works on zip codes, which will make it easier for our US friends on here.
New release fixes countries that weren't in the list, by removing the country checks altogether - I'm confident it'll "just work" - in theory Report bugs in the usual way.
Known Issues
The WM5 version will NOT update over GPRS/3G, unless you are using an AKU3.3 ROM. WM5 Weather update over GPRS has been proven with Wizard AKU3.3 (like the T-Mobile or WM5SEr5). Other devices/ROM's still to be confirmed.
The temperature in Farhenheit can occasionally be a degree or two out, as I convert from the Celsius scale. To get both readings would mean two calls to the server, which would be more work and bandwidth for my server. I'm sure you can live with a degree out occasionally.
Kudos
Thanks PAPPL for the info on signing files, Schen for his great work on the plugin, and to all those who contributed to getting these plugins (and getting them working!) in the first place!
Enjoy!
As I've taken the server down, I've attached all the relevant files to this post. If someone does want to provide somewhere to point the weather.not2advanced.com domain to, I still own the domain and can add the appropriate A address to it for the purpose if they want to continue hosting for the many users that still seem to be using this plugin. Sorry I had to take it down, but I no longer run the hosting operation this was being held on, and it can be a bit heavy on resources at times.
- Rick
Wow, sounds like a lot of work went into this.
Do you think it would be possible, using this framework, to pull data from the NWS website instead of Accuweather?
Theroetically, I could, providing they set up an appropriate XML feed. However, I can only do one such setup per IP address (and the IP addresses I have are somewhat limited), but if someone wanted to set it up, I've no doubt it'd be possible. However, it wouldn't be trivial - I've had to manually grab bits of data from the XML and process it into the format the home plugin expects. As a UK resident, the NWS isn't huge amounts of use to me
On a more technical note though, it'd require a similar format - at least 5 days in advance for a particular area, and the exact parameters (or something that can be adjusted / mangled / processed into the exact parameters) that the plugin needs. (Take a look at the code in the zipfile if you want to see how much of a pain in the neck THAT was!) Adapting it would also need a complete conversion matrix, or a hacky method using (say) the RSS feed ID for the BBC, or however the NWS does it.
Will this work for cingular/att customer?
If it works already for the major cities, then it'll work the same way, but with more localised weather available.
If you're having trouble with the normal weather plugin setup though, you may still have trouble. Then again, it might work! I've no idea. Try it and find out
Yeeaah
Hi N2A / Rick.
Great job - really! I can't thank you enough.
It finally works for me.
Thanks
HTC Homeplug Weather
Hello,
Thanks for sharing your great work. (I am french so sorry for my poor english)
However, I working on HTC Homeplug Weather because it wont let me download weather forecast when I am using 3G connection.
It works great when I an using wifi connection so I think it is coming from the proxy of vodaphone France (SFR) wich is blocking the access. So I was wondering if I will be able to connect to your server ? (for the moment it is not working) or redirecting the plugin to my tunnel...
Second is there a way to be sure that htc weather plugin is trying to connect to htc.accuweather.com and not to another web site.
Thanks in advance
A french guy wich is also living in a small city and wishto have his weather forecast ;-)
TorbenKB said:
Hi N2A / Rick.
Great job - really! I can't thank you enough.
It finally works for me.
Thanks
Click to expand...
Click to collapse
You're most welcome Glad I could help.
gdbtg said:
Hello,
However, I working on HTC Homeplug Weather because it wont let me download weather forecast when I am using 3G connection.
It works great when I an using wifi connection so I think it is coming from the proxy of vodaphone France (SFR) wich is blocking the access. So I was wondering if I will be able to connect to your server ? (for the moment it is not working) or redirecting the plugin to my tunnel...
Second is there a way to be sure that htc weather plugin is trying to connect to htc.accuweather.com and not to another web site.
Thanks in advance
A french guy wich is also living in a small city and wishto have his weather forecast ;-)
Click to expand...
Click to collapse
Well, if it's the HTC accuweather site specifically blocked, then it will help you. If it's generically blocking sites, then it won't.
Re a tunnel - depends what you mean by it.
The HTC home plugin *always* tries to connect to htc.accuweather.com - hence the host file change, which diverts it to my server instead, which provides the correct data. (NO LONGER APPLIES WITH NEW PLUGINS!)
However, if it's still not working with the hosts file modification (may require soft reset, not sure!), then I'm afraid there's not a lot I can do, unless you can tunnel it as you said, but it depends on what you're using to tunnel.
HTC Homeplug Weather
Thanks for your quick answer !
It's still not worling ;-(
But I wondering how can I test if Pockets Hosts is redirecting properly the htc weather address.
Sincerely
gdbtg said:
Thanks for your quick answer !
It's still not worling ;-(
But I wondering how can I test if Pockets Hosts is redirecting properly the htc weather address.
Sincerely
Click to expand...
Click to collapse
***************** REMOVED OLD CONTENT, NO LONGER APPLIES WITH THE NEW PLUGINS *****************
HTC Homeplug Weather
Ok, I have got the web site and not the error message.
So there is something wrong.
Thanks for your help.
Befor I can try your nice work, I have a problem with the write protection of the hh_0407_weather... file. I dont get my own file in the folder. I tried some things but it didnt work.
Can you help me? I'm runing a B&B v3.7 Ger beta.
Thanks
gdbtg said:
Ok, I have got the web site and not the error message.
So there is something wrong.
Thanks for your help.
Click to expand...
Click to collapse
Reload pocket hosts - it should look something like the attached thumbnail. If it does, try a soft reset. However, if it's still refusing point blank, it's highly possible you're going via a proxy, and that is handling the DNS lookups. To bypass that will require a hack to the HTC plugin itself. I can set it up server side for it (which was going to be my initial approach!), but it'll need an appropriate hostname hacking into the binary. I'll see what I can do on that score tomorrow, both on the home plugin front and the server-side setup.
smallgermanboy said:
Befor I can try your nice work, I have a problem with the write protection of the hh_0407_weather... file. I dont get my own file in the folder. I tried some things but it didnt work.
Can you help me? I'm runing a B&B v3.7 Ger beta.
Thanks
Click to expand...
Click to collapse
I suggest using Total Commander - you can remove the read-only flag from there, and even edit it inside it. Works beautifully.
I use the Total Com, too. But when I open the file the Internet Explorer opens and displays the xml file. I tried to remove the flag but he didnt adopt it. So I looked at the attributes again and nothing has changed.
smallgermanboy said:
I use the Total Com, too. But when I open the file the Internet Explorer opens and displays the xml file. I tried to remove the flag but he didnt adopt it. So I looked at the attributes again nothing has changed.
Click to expand...
Click to collapse
I'm assuming that's after you've gone to the file properties. You should be able to unclick "Read-only" and "System" on it.
There's quite a bit of information on doing this scattered around the forums. Is it cooked into your ROM? (It'll have a tickbox by the "In ROM" box if that's the case.) But you want to clear the Read Only and System attributes from the file properties if you can, THEN edit it.
More information on this thread.
N2A said:
I'm assuming that's after you've gone to the file properties. You should be able to unclick "Read-only" and "System" on it.
Click to expand...
Click to collapse
I did this but when I open the properties again the attributes for "Read-only" and "System" are still on.
There's quite a bit of information on doing this scattered around the forums. Is it cooked into your ROM? (It'll have a tickbox by the "In ROM" box if that's the case.) But you want to clear the Read Only and System attributes from the file properties if you can, THEN edit it.
Click to expand...
Click to collapse
Its in the ROM.
There's your problem. I suggest copying it somewhere else on the device, editing it, and copying it back, but it may have issues doing it.
If you can't copy it back, apparently Resco Explorer is able to do it.
I used resco to do it. you have 14 days free trial so you can test it first.
http://www.resco.net/pocketpc/explorer/downloads.asp
And thanks N2A this is realy great. And works perfectly can find all the small places in Norway
ialu said:
I used resco to do it. you have 14 days free trial so you can test it first.
http://www.resco.net/pocketpc/explorer/downloads.asp
And thanks N2A this is realy great. And works perfectly can find all the small places in Norway
Click to expand...
Click to collapse
Thanks for both
I copied it with the resco and now it works perfekt. I tried several small cities in Germany and he found all. THANKS again
Thanks. works great. now i know it's going to rain all week here in abergavenny

Detailed weather URL not working

(by McNevin and mloamiller from T-Mobile forums)
On the weather tab, when I click on "More Detail Online" I get a 404 error page. It does the same thing on my PC, if type the address manually. I can look up detailed weather pages, I know that Athens, Greece works.
The correct address is:
http://www.accuweather.com/m/en-us/NAM/US/WA/Seattle/details.aspx
What I get when I click is:
http://www.accuweather.com/m/NAM/US/WA/Seattle/details.aspx
I searched for a registry settng that would define this URL, but the only setting I found pointed to "manila:IDS_WEATHER" or something like that (don't remember the exact syntax). I remember seeing a large number of files named "manila" in the Windows folder, and also remember someone saying this was the app name for the TF3D interface. I took a look at one of those files - they seem to be XML files, and the one I looked at had several tags such as
<trans-unit id="IDS_MENU">
<source>Menu</source>
</trans-unit>
I would be willing to bet that one of these _manila files includes an "IDS_WEATHER" tag with the actual URL that gets used by the weather app; changing that URL may fix the problem. Unfortunately, there are hundreds of these _manila files and I don't have a way to search all of them for "WEATHER".
Any ideas on how to fix this?
Don't have an answer to the specific question, but if you were to copy all of the manilla xml files on to your desktop you could then use the Windows search to search for snippets of the url within them.
However, it's entirely possible that this data is compiled into the applications binary files. If you have no luck, email accuweather and tell them there are embedded devices that have the wrong URL. They surely want the inbound traffic so it's in their interests and relatively trivial for them to set up a redirect from the broken one on their site. To be honest, this would be the best solution as it would work for everyone!
I thought of that, but the files don't have any extension (e.g. 00a49dc2_manila); doesn't Windows Search require an extension, so a specific viewer can be associated with them? I couldn't figure out how to rename all of them to have an XML (or even TXT) extension so they could be searched.
However, I just answered my own question - I remember I had Notepad++ on my machine which allows me to search through files regardless of their extension. I'll give that a shot.
I was able to search through all of the "manila" files for "WEATHER" and found 463 hits among 63 different files. Of those, "accuweather" only showed up 4 times in one file (17ae3d30_manila), but none of them are the URL I was looking for. Back to the drawing board, I guess.
That file looks to be the html page it sends you to when you hit "About" in the weather tab.
How about this:
http://forum.xda-developers.com/showpost.php?p=2488224&postcount=73

Compare REG/RGU files...

I have two *.reg files, the first after Hard Reset and the other after i have customised some stuff. Is there a program that shows the differences between these files (which keys where added,removed or altered) so as to save the differences and add them to my new build without having to do the customization over and over again after every flash? I found a program called CERegEditor but it doesn't allways work. For example if i use the same file for original and altered it shows differences for some reason, so i don't trust it.
Give Windiff a try. That should do what you want to do. http://www.grigsoft.com/download-windiff.htm
The two files don't have the same registry keys so comparing them line by line is pointless. I need a program that understands that these files are registry entries and finds the differences between the entries.
I've done what you're trying to do with WinMerge. It should highlight all changes and completely new reg sections that were added.
Let me know how it goes
I've also used WinMerge for similar stuff. It's a cool app (and a free and OSS one too!).
If the structure of the files is the same except for the keys you want to know it'll be a very easy task.

Read/Write Settings?

I am looking to read and write system settings. I have already found out how to Read the current theme style (Dark or Light), but is it possible to programmatically change it?
I have also looked everywhere for an API to be able to grab the current wallpaper file, and write in a different one, but no luck.
Can anybody point me in the right direction?
Thanks!
afaik I don't think you can change the user's theme, but you can override it.
Download either the DarkStyles.xaml or LightStyles.xaml:
http://www.windowsphonegeek.com/news/theme-forcing-for-windows-phone-7
Then you can merge the xaml file into the resource dictonary of the resources of app.xaml:
Code:
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/DarkStyles.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
I don't think there's an api for grabbing the current wallpaper, but u can use MediaLibrary to check out the currently saved pictures if I remember correctly, otherwise there might be something related to Tasks.
Don't know about wallpaper but I have a thread for adding customs accents and 3 extra themes. Yu could also make your own but im on my phone and it would take forever to type out how.
Sent from my HD7 using XDA Windows Phone 7 App

[Q] making sense of .smali

hey guys.
can one of you masters point me in the correct direction to understanding .smali code?
I'm trying to update the video ringtone app that I had themed back in 2010. I've been able to get most of it done via .xml and .png edits, but I'm running into an issue I never ran back then. there's a check in the code of the program that tells me the app is corrupt. I know it's because it's been edited, but it's a free apk, i'm not breaking any rules. never heard of free apks being so strict.
I'm fairly certain it's down to .smali, as I've poured through all the .xmls and I don't see anything referencing that error except the strings.xml in res/values/.
within the smali i'm fairly certain i'm in the right folder, as I'm seeing different .smali files for specific parts of the program I can recognize based on the name, but nothing makes sense of what's on the smali code.
i can real .xml plainly, but .smali reads like text java...which I'm very bad at. is this something that I can visualize by using Eclipse or another Java compiler? how do you guys find what you need to edit in the code?
any help is greatly appreciated.
nobody? I know someone must know because you awesome guys do smali changes all the time!
I found a "guide" on editing/themeing Android. It mentioned I needed Eclipse. that's ALL it ever said about Eclipse...I need it, for what?!
What does it do when you try to open the program? Does it just fc or does it actually tell you that it's corrupt?
the problem only happens when I try to select a video for a specific contact.
instead of opening the video picker thing, it gives a toast notification saying the application is corrupt. the toast notification goes away and the app stays open.
I can continue to use the app otherwise, and everything else seems to be working. the share/download videos option gives the same message, but that connects to a server, so that is understandable.
the app still works. i just don't want to release it as is since you can only have one video ringtone right now, and I like having custom ringtones and I know so will other people.

Categories

Resources