Android has sqlite3 as its database engine. Some useful examples on using sqlite3 are:
1. To open the system settings database:
sqlite3 /data/data/com.android.providers.settings/databases/settings.db
2. To check out tables of current database:
sqlite>.tables
3. To dump a table:
sqlite> .dump secure
BEGIN TRANSACTION;
CREATE TABLE secure (_id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT UNIQUE ON CONFLICT REPLACE,value TEXT);
INSERT INTO "secure" VALUES(1,'bluetooth_on','0');
INSERT INTO "secure" VALUES(2,'data_roaming','0');
INSERT INTO "secure" VALUES(3,'install_non_market_apps','0');
INSERT INTO "secure" VALUES(4,'location_providers_allowed','network');
INSERT INTO "secure" VALUES(5,'device_provisioned','1');
INSERT INTO "secure" VALUES(6,'network_preference','1');
INSERT INTO "secure" VALUES(7,'usb_mass_storage_enabled','1');
INSERT INTO "secure" VALUES(9,'wifi_networks_available_notification_on','1');
INSERT INTO "secure" VALUES(10,'mock_location','1');
INSERT INTO "secure" VALUES(11,'enabled_input_methods','com.android.inputmethod.latin/.LatinIME');
INSERT INTO "secure" VALUES(17,'wifi_on','1');
INSERT INTO "secure" VALUES(20,'default_input_method','com.android.inputmethod.latin/.LatinIME');
INSERT INTO "secure" VALUES(21,'adb_enabled','1');
CREATE INDEX secureIndex1 ON secure (name);
COMMIT;
sqlite>
4. To insert an entry in the 'system' table
sqlite> insert into system (name, value) values ('an_example','7');
5. To update an entry in the 'system' table
sqlite> update system set value='8' where name='an_example';
6. To delete an entry in the 'system' table
sqlite> delete from system where name='an_example';
Reference:
http://www.shokhirev.com/nikolai/abc/sql/sql.html
2009年8月13日 星期四
2009年8月4日 星期二
Android build name decoding
JBQ at Google provides how to interpret Android build names at http://groups.google.com/group/android-platform/browse_thread/thread/3670ed63a7d9e3ab?hl=en.
Also mentioned in the above URL are status of branches and who should use what.
Also mentioned in the above URL are status of branches and who should use what.
訂閱:
文章 (Atom)