diff options
author | 2016-02-06 19:46:09 -0700 | |
---|---|---|
committer | 2016-02-06 20:17:47 -0700 | |
commit | cc6281cf8146cddb8ace7cbd58c67321639c1520 (patch) | |
tree | 0cf32fa461f00b148a110aadebe37a103067b603 /cmds/installd/installd.cpp | |
parent | 6a45fb96bcc67f8266ec4c3aac513d64cd751610 (diff) |
Migrate default app data on non-FBE devices.
When a system app requests "forceDeviceEncrypted" they expect their
default app storage to point at a consistent location regardless of
device FBE support. So when booting upgraded non-FBE devices, we
may need to migrate any data from CE to DE. Note that on non-FBE
devices these are just semantic locations with identical protection.
This migration *only* works for non-FBE devices; changing
forceDeviceEncrypted flags on an FBE device always requires a full
data wipe.
Bug: 26668510
Change-Id: I8bd5b8ba882e6bd067c0381041b27c35d6e47788
Diffstat (limited to 'cmds/installd/installd.cpp')
-rw-r--r-- | cmds/installd/installd.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmds/installd/installd.cpp b/cmds/installd/installd.cpp index c0ae5b7905..63290a9ba8 100644 --- a/cmds/installd/installd.cpp +++ b/cmds/installd/installd.cpp @@ -201,6 +201,11 @@ static int do_restorecon_app_data(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UN return restorecon_app_data(parse_null(arg[0]), arg[1], atoi(arg[2]), atoi(arg[3]), atoi(arg[4]), arg[5]); } +static int do_migrate_app_data(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED) { + /* const char *uuid, const char *pkgname, userid_t userid, int flags */ + return migrate_app_data(parse_null(arg[0]), arg[1], atoi(arg[2]), atoi(arg[3])); +} + static int do_clear_app_data(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED) { /* const char *uuid, const char *pkgname, userid_t userid, int flags */ return clear_app_data(parse_null(arg[0]), arg[1], atoi(arg[2]), atoi(arg[3])); @@ -342,6 +347,7 @@ struct cmdinfo cmds[] = { { "create_app_data", 7, do_create_app_data }, { "restorecon_app_data", 6, do_restorecon_app_data }, + { "migrate_app_data", 4, do_migrate_app_data }, { "clear_app_data", 4, do_clear_app_data }, { "destroy_app_data", 4, do_destroy_app_data }, { "move_complete_app", 7, do_move_complete_app }, |