Installd: Pass debuggable flag
Pass the debuggable flag from the package manager to dex2oat.
Change-Id: Id17ec72babe2ee88713a0d274eff86508de30666
diff --git a/cmds/installd/installd.c b/cmds/installd/installd.c
index 4dd83ae..8f94170 100644
--- a/cmds/installd/installd.c
+++ b/cmds/installd/installd.c
@@ -38,8 +38,10 @@
static int do_dexopt(char **arg, char reply[REPLY_MAX] __unused)
{
- /* apk_path, uid, is_public, pkgname, instruction_set, vm_safe_mode, should_relocate */
- return dexopt(arg[0], atoi(arg[1]), atoi(arg[2]), arg[3], arg[4], atoi(arg[5]), 0);
+ /* apk_path, uid, is_public, pkgname, instruction_set, vm_safe_mode, should_relocate,
+ debuggable */
+ return dexopt(arg[0], atoi(arg[1]), atoi(arg[2]), arg[3], arg[4], atoi(arg[5]), 0,
+ atoi(arg[6]));
}
static int do_mark_boot_complete(char **arg, char reply[REPLY_MAX] __unused)
@@ -151,8 +153,9 @@
}
static int do_patchoat(char **arg, char reply[REPLY_MAX] __unused) {
- /* apk_path, uid, is_public, pkgname, instruction_set, vm_safe_mode, should_relocate */
- return dexopt(arg[0], atoi(arg[1]), atoi(arg[2]), arg[3], arg[4], 0, 1);
+ /* apk_path, uid, is_public, pkgname, instruction_set, vm_safe_mode, should_relocate,
+ debuggable */
+ return dexopt(arg[0], atoi(arg[1]), atoi(arg[2]), arg[3], arg[4], 0, 1, 0);
}
struct cmdinfo {
@@ -164,7 +167,7 @@
struct cmdinfo cmds[] = {
{ "ping", 0, do_ping },
{ "install", 4, do_install },
- { "dexopt", 6, do_dexopt },
+ { "dexopt", 7, do_dexopt },
{ "markbootcomplete", 1, do_mark_boot_complete },
{ "movedex", 3, do_move_dex },
{ "rmdex", 2, do_rm_dex },