Adb SQlLite

adb shell
# find data -name "*.db" -print 
data/data/com.google.android.providers.contacts/databases/contacts.db 
data/data/com.google.android.providers.googleapps/databases/accounts.db 
data/data/com.google.android.providers.im/databases/im.db 
data/data/com.google.android.providers.media/databases/media.db 
data/data/com.google.android.providers.telephony/databases/mms.db 
data/data/com.google.android.providers.telephony/databases/sms.db 
data/data/com.google.android.providers.telephony/databases/telephony.db 
data/data/com.google.android.providers.settings/databases/settings.db 
data/data/com.google.android.maps/databases/maps.db
# sqlite3 data/data/com.google.android.providers.contacts/databases/contacts.db 
sqlite3 data/data/com.google.android.providers.contacts/databases/contacts.db 
SQLite version 3.5.0 
Enter ".help" for instructions 
sqlite>
sqlite> .tables
sqlite> .schema phones 
.schema phones 
CREATE TABLE phones (_id INTEGER PRIMARY KEY,person INTEGER,type INTEGER,number TEXT,number_key TEXT,label TEXT); 
CREATE INDEX phonesIndex1 ON phones (person); 
CREATE INDEX phonesIndex2 ON phones (number_key); 
CREATE TRIGGER phones_delete DELETE ON phones BEGIN UPDATE people SET _sync_dirty=1 WHERE people._id=old.person;END; 
CREATE TRIGGER phones_insert INSERT ON phones BEGIN UPDATE people SET _sync_dirty=1 WHERE people._id=new.person;END; 
CREATE TRIGGER phones_update UPDATE ON phones BEGIN UPDATE people SET _sync_dirty=1 WHERE people._id=old.person;END; 
CREATE TRIGGER preferred_phone_cleanup DELETE ON phones BEGIN UPDATE people SET preferred_phone = NULL WHERE preferred_phone = old._id; END

你可能感兴趣的:(android,sqlite,Google)