HTC Sense and weather widget - add your city
Today I will tell you how to teach the weather app included with HTC Sense to recognize your city. By default, the application knows very few cities, and auto-location sometimes misfires, which happened in my case.
WTF? There should be a city of Ukhta.
Well, let's try to help the patient.
First you need to get root access to the device and fill in the custom recovery image. This is a separate issue, and I don’t want to touch on it here. Read on the example of HTC Desire here and there .
Having rummaged a little in the file system of the patient, we find out that the list of cities is stored in the file
We pack back our modified file and fill it into the root of the patient card. We reboot the device in recovery-mode, connect via usb and run adb:
It remains only to restart the patient and clear the data of the Weather Provider application.
Now we are confidently launching the Weather and find our freshly added city. Voila, magic has happened!
Let me bow to this, I hope the information is useful to someone.
PS: If you can check on devices other than Desire, please comment.
Update : as prompted by MainNika , loading recovery-mode is optional:
WTF? There should be a city of Ukhta.
Well, let's try to help the patient.
First you need to get root access to the device and fill in the custom recovery image. This is a separate issue, and I don’t want to touch on it here. Read on the example of HTC Desire here and there .
Having rummaged a little in the file system of the patient, we find out that the list of cities is stored in the file
/system/etc/WP.zip
. We need a fileWP_0419RUS.db
from this archive (for other locales - by analogy). A closer look at the file turns out to be nothing more than a SQLite base. Well, we take the first teardown tool that comes to hand (for example, Lita - SQLite Administration Tool ) and find the table “locationlist”
. Now it remains to add a new record to the table. The main attribute here is “code”
, view часть_света|страна|регион|город
. The easiest way is to copy this field from an existing city in your region, replacing the city with your own. You can check the spelling of the city on accuweather.com . We pack back our modified file and fill it into the root of the patient card. We reboot the device in recovery-mode, connect via usb and run adb:
C:\android-sdk\tools\>adb shell
# mount /system
# mount /sdcard
# rm /system/etc/WP.zip
# cp /sdcard/WP.zip /system/etc
It remains only to restart the patient and clear the data of the Weather Provider application.
Now we are confidently launching the Weather and find our freshly added city. Voila, magic has happened!
Let me bow to this, I hope the information is useful to someone.
PS: If you can check on devices other than Desire, please comment.
Update : as prompted by MainNika , loading recovery-mode is optional:
In USB debugging mode, you can enter
./adb remount
and / system will be writable
then back
./adb remount