It so happened that I became the owner of the new HTC Hero.
When you first turn on the phone, set up a Google account. All contacts are synchronized with the phone. According to Google’s video presentations, this is very convenient. For example, if you lose your phone, contacts will still remain on Google.
Everything is good, but I just don’t really want to store personal data on Googl’s remote server. I looked in the settings of contacts - there is no change of types. That is, when creating a contact, you can choose: google, phone, SIM. But in the future, change the type of contact nelya.
But for every tricky, there will definitely be something.
')
1) Install on the Android SDK computer.
2) Using the adb utility (from the SDK kit, located in the TOOLS directory), we connect to the phone:
./adb shell
3) Next, open the contact database:
# sqlite3 /data/data/com.android.providers.contacts/databases/contacts.db
Note: I have unofficial custom firmware. In official firmware this method did not check.
4) For especially curious, you can enable the display of table headers:
sqlite> .headers ON
and still see the list of all tables in the database:
sqlite> .tables
5) We look at all contacts:
sqlite> select * from people;
Note: remember the '_id' (the first number in the line) of the contact we need. For example, 164.
6) And, lo and behold, we change the type of contact with Google to Phone:
sqlite> update people set extra_group='2' where _id='164';
Or if you need to change all contacts (step 5 - skip
):
sqlite> update people set extra_group='2';
Now this contact will be stored on your phone, and you can turn off the display of Google contacts.
PS: I hope the article will help someone. Comments are welcome!
UPD:If there is no firmware without root and sqlite3 in the phone, then we will use it on the computer. Download the database on the computer:
adb pull /data/data/com.android.providers.contacts/databases/contacts.db contacts.db
run sqlite3 on your computer:
sqlite3 contacts.db
then we change the type of contacts and exit sqlite3.
And then upload the modified file to the body:
adb push contacts.db /data/data/com.android.providers.contacts/databases/contacts.db
Installing sqlite3 on a computer is easier than in a non-armed hero.