summaryrefslogtreecommitdiff
path: root/cmds/installd/installd.cpp
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2016-09-09 17:07:04 -0700
committer Andreas Gampe <agampe@google.com> 2016-09-28 13:58:17 -0700
commitb31206b67805617c79fb46ca39ccc5b26cdefd63 (patch)
tree7e9a6471dfbc09703d89fd9d7019e5e5897cbcb3 /cmds/installd/installd.cpp
parentc4dd0c3b83a825af0b4d1d140240c7cd4aa4816c (diff)
Installd: Add a delete_odex command
Add a command to delete odex files. Bug: 31347757 Change-Id: I29bca8751bcee8d6981c682fbbc816c73b78ac68 (cherry picked from commit 3964da0636624ff9af42d1f316bed0752e37c490)
Diffstat (limited to 'cmds/installd/installd.cpp')
-rw-r--r--cmds/installd/installd.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmds/installd/installd.cpp b/cmds/installd/installd.cpp
index 531c6df200..c81a33965c 100644
--- a/cmds/installd/installd.cpp
+++ b/cmds/installd/installd.cpp
@@ -418,6 +418,11 @@ static int do_move_ab(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED) {
return move_ab(arg[0], arg[1], arg[2]);
}
+static int do_delete_odex(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED) {
+ // apk_path, instruction_set, oat_dir
+ return delete_odex(arg[0], arg[1], arg[2]) ? 0 : -1;
+}
+
struct cmdinfo {
const char *name;
unsigned numargs;
@@ -453,6 +458,7 @@ struct cmdinfo cmds[] = {
{ "move_ab", 3, do_move_ab },
{ "merge_profiles", 2, do_merge_profiles },
{ "dump_profiles", 3, do_dump_profiles },
+ { "delete_odex", 3, do_delete_odex },
};
static int readx(int s, void *_buf, int count)