when I searched the web for a tutorial how to add a city to MIUI-Weather app and found nothing yet, I started to try to add my own city to the database of MIUI. I was succesful and I thought that it would be a good idea to write a tutorial how to add your own city to the db.
You need the following:
- SQLite Database Browser: sourceforge.net/projects/sqlitebrowser/
- OR Root Explorer && SQlite Editor (thanks to Fisher_9511)
I'm not responsible if you damage your phone, brick it or it does not start anymore. You're the one who's responsible for your device. You should know what you do
I explain the process on the database of Europe and Germany, because there's nothing added for Germany.
First thing to do is to download the database of your desired location. Save it somewhere where you find it again. Now start "SQLite Database Browser" and open the database. It should now look like thid (Attached Image 1). Switch to the tab "Browse Data" and select "hotcity" as the table (Attached Image 2).
Now search for the abbreviation of your country, in my case it's "DE" for "Deutschland" (Germany). Remember the abbreviation and the posID of your country. So in my case I need "DE" and "110000001"
Now head over to weather.com and search for your city, where you live in. In my case I search for "Cloppenburg, Germany". Now you should have an url like this: "weather.com/weather/today/GMXX0017:1:GM". The part which is necessary is "GMXX0017", the GM stands for Germany, the XX is a placeholder I think and 0017 is the ID we need.
Now we have the posID of our country and the ID of our city. Now we have to sum the posID and the ID of our city. In my case it's "110000001" + "0017" which ends up in "110000018". This is the posID for our city.
Now we switch back again to our SQLite Database Browser and select "city" as our table (Attached Image 3). Now we have to go to the last page (Attached Image 7) and look for the last ID used in the database. In my case it's "16619" (Attached Image 4), so the next ID is "16620".
Now we create a new record and insert all our information we have, this happens when you double click the specific field of the new added empty line.
This should look like this (Attached Image 5).
When you entered every information it should look like this (Attached Image 6). Save your database and push it back to your device.
adb push miui_city_entire_eu.db /data/data/com.miui.weather/databases/miui_city.db
(I hope it was the right forum (: )