Add 'rmprofiles' command to installd
Adds a new command to installd which clears all profile data of
a given package.
Bug: 27516490
Change-Id: I92cc374b5b6d95ca7755e08b95a9bc9060df2178
diff --git a/cmds/installd/installd.cpp b/cmds/installd/installd.cpp
index 54d3970..7ca7527 100644
--- a/cmds/installd/installd.cpp
+++ b/cmds/installd/installd.cpp
@@ -330,6 +330,12 @@
return rm_package_dir(arg[0]);
}
+static int do_rm_profiles(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED)
+{
+ /* package_name */
+ return rm_profiles(arg[0]);
+}
+
static int do_link_file(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED)
{
/* relative_path, from_base, to_base */
@@ -368,6 +374,7 @@
{ "idmap", 3, do_idmap },
{ "createoatdir", 2, do_create_oat_dir },
{ "rmpackagedir", 1, do_rm_package_dir },
+ { "rmprofiles", 1, do_rm_profiles },
{ "linkfile", 3, do_link_file },
{ "move_ab", 3, do_move_ab },
};