-
-
Notifications
You must be signed in to change notification settings - Fork 21
configkey: update.settings
Tarek edited this page Jun 11, 2015
·
5 revisions
Most of android's default sqlite settings databases consist of tables that are key-value base with table schemas that are mostly similar. For most databases, inception allows you to fill the values for all keys, for all tables. For example here is a config which generates a database containing device's lock settings
{
"update": {
"settings": {
"locksettings": {
"col_key": "name",
"version": "2",
"col_val": "value",
"path": "/data/system/locksettings.db",
"data": {
"locksettings": {
"migrated": "true",
"lockscreen.options": "enable_facelock",
"migrated_user_specific": "true",
"lockscreen.disabled": "1",
"lock_screen_owner_info_enabled": "0"
}
},
"schema": "/path/to/schemafile"
}
}
}
}
-
update
-
settings
-
database_name [str] Some identifier name for the target database
- path [str/required] Path on devices
- version[int/required] Database version, see below how to find it
- schema[str/required] Path to a text file containing the database schema, or just the actual schema content. See below how to find it
- col_key[str/optonal] Name of the tables' key column, default is "name"
- col_val[str/optional] Name of the tablet's value column, default is "value"
-
data
-
tablename_1 Target table name, contains key[str] value[str] data that will populate this table
- key_1 : value_1
- key_2: value_2
- ...
-
tablename_2
- key_3:
- key_4:
- ...
- ....
-
tablename_1 Target table name, contains key[str] value[str] data that will populate this table
-
database_name [str] Some identifier name for the target database
-
settings
For any database you must obtain the following information about it:
- Its path
- Its schema
- Its version
You can get the schema by running the following query against the database:
SELECT sql FROM sqlite_master where sql is not null;
You can get the database version using the following query:
pragma user_version
Inception can also save you this manual work if you use the "incept learn" action.