Installd: Add move_ab command
Add a command to move A/B artifacts into the right position. This
is used for apps that live in data.
Bug: 25612095
Change-Id: I40c3ca54bd0f3b2d646a14b145e733096dabbbb2
diff --git a/cmds/installd/installd.cpp b/cmds/installd/installd.cpp
index 63290a9..54d3970 100644
--- a/cmds/installd/installd.cpp
+++ b/cmds/installd/installd.cpp
@@ -336,6 +336,11 @@
return link_file(arg[0], arg[1], arg[2]);
}
+static int do_move_ab(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED) {
+ // apk_path, instruction_set, oat_dir
+ return move_ab(arg[0], arg[1], arg[2]);
+}
+
struct cmdinfo {
const char *name;
unsigned numargs;
@@ -364,6 +369,7 @@
{ "createoatdir", 2, do_create_oat_dir },
{ "rmpackagedir", 1, do_rm_package_dir },
{ "linkfile", 3, do_link_file },
+ { "move_ab", 3, do_move_ab },
};
static int readx(int s, void *_buf, int count)