Installd: Take boot status as dexopt parameter
Expect the boot status explicitly as a parameter so that we do not
have to rely on dev.bootcomplete, which isn't meaningfully set
when the device needs the decryption screen on boot.
Bug: 23898216
(cherry picked from commit 72ebebed876a62e719b098e43d9d516361bde029)
Change-Id: I9b34298caf70b1e5d40970cc0d04c469016a80a7
diff --git a/cmds/installd/installd.cpp b/cmds/installd/installd.cpp
index 3a86181..3d82663 100644
--- a/cmds/installd/installd.cpp
+++ b/cmds/installd/installd.cpp
@@ -48,9 +48,9 @@
static int do_dexopt(char **arg, char reply[REPLY_MAX] __unused)
{
/* apk_path, uid, is_public, pkgname, instruction_set,
- * dexopt_needed, vm_safe_mode, debuggable, oat_dir */
+ * dexopt_needed, vm_safe_mode, debuggable, oat_dir, boot_complete */
return dexopt(arg[0], atoi(arg[1]), atoi(arg[2]), arg[3], arg[4], atoi(arg[5]),
- atoi(arg[6]), atoi(arg[7]), arg[8]);
+ atoi(arg[6]), atoi(arg[7]), arg[8], atoi(arg[9]));
}
static int do_mark_boot_complete(char **arg, char reply[REPLY_MAX] __unused)
@@ -188,7 +188,7 @@
struct cmdinfo cmds[] = {
{ "ping", 0, do_ping },
{ "install", 5, do_install },
- { "dexopt", 9, do_dexopt },
+ { "dexopt", 10, do_dexopt },
{ "markbootcomplete", 1, do_mark_boot_complete },
{ "movedex", 3, do_move_dex },
{ "rmdex", 2, do_rm_dex },