summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitriy Ivanov <dimitry@google.com>2014-11-11 16:08:29 -0800
committerDmitriy Ivanov <dimitry@google.com>2014-11-11 16:08:29 -0800
commit741625a17e80bc0ad8e728ba73536386efb1fb4d (patch)
tree0b9740e3cfcd40930950d6e3d07ba81b9dd07b28
parent32dc54a1c9a717ee5a7ebdf417bfeafa115c9c59 (diff)
parent37878b1e57ee25629f0d9aff5edf599afcc8c6eb (diff)
downloadframeworks_native-741625a17e80bc0ad8e728ba73536386efb1fb4d.zip
frameworks_native-741625a17e80bc0ad8e728ba73536386efb1fb4d.tar.gz
frameworks_native-741625a17e80bc0ad8e728ba73536386efb1fb4d.tar.bz2
resolved conflicts for merge of 37878b1e to lmp-mr1-dev-plus-aosp
Change-Id: I748a7d2fb43fd63189f4688edbd0991e2b609dba
-rw-r--r--cmds/installd/commands.c15
-rw-r--r--cmds/installd/installd.c6
-rw-r--r--cmds/installd/installd.h1
3 files changed, 22 insertions, 0 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index f2d8bef..082574e 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -1069,6 +1069,21 @@ fail:
return -1;
}
+int mark_boot_complete(const char* instruction_set)
+{
+ char boot_marker_path[PKG_PATH_MAX];
+ sprintf(boot_marker_path,"%s%s/.booting", DALVIK_CACHE_PREFIX, instruction_set);
+
+ ALOGV("mark_boot_complete : %s", boot_marker_path);
+ if (unlink(boot_marker_path) != 0) {
+ ALOGE("Unable to unlink boot marker at %s, error=%s", boot_marker_path,
+ strerror(errno));
+ return -1;
+ }
+
+ return 0;
+}
+
void mkinnerdirs(char* path, int basepos, mode_t mode, int uid, int gid,
struct stat* statbuf)
{
diff --git a/cmds/installd/installd.c b/cmds/installd/installd.c
index 4864516..86f7468 100644
--- a/cmds/installd/installd.c
+++ b/cmds/installd/installd.c
@@ -42,6 +42,11 @@ static int do_dexopt(char **arg, char reply[REPLY_MAX] __unused)
return dexopt(arg[0], atoi(arg[1]), atoi(arg[2]), arg[3], arg[4], atoi(arg[5]), 0);
}
+static int do_mark_boot_complete(char **arg, char reply[REPLY_MAX] __unused)
+{
+ return mark_boot_complete(arg[0] /* instruction set */);
+}
+
static int do_move_dex(char **arg, char reply[REPLY_MAX] __unused)
{
return move_dex(arg[0], arg[1], arg[2]); /* src, dst, instruction_set */
@@ -160,6 +165,7 @@ struct cmdinfo cmds[] = {
{ "ping", 0, do_ping },
{ "install", 4, do_install },
{ "dexopt", 6, do_dexopt },
+ { "markbootcomplete", 1, do_mark_boot_complete },
{ "movedex", 3, do_move_dex },
{ "rmdex", 2, do_rm_dex },
{ "remove", 2, do_remove },
diff --git a/cmds/installd/installd.h b/cmds/installd/installd.h
index 36c3e8c..a3a5c16 100644
--- a/cmds/installd/installd.h
+++ b/cmds/installd/installd.h
@@ -221,6 +221,7 @@ int get_size(const char *pkgname, userid_t userid, const char *apkpath, const ch
int free_cache(int64_t free_size);
int dexopt(const char *apk_path, uid_t uid, bool is_public, const char *pkgName,
const char *instruction_set, bool vm_safe_mode, bool should_relocate);
+int mark_boot_complete(const char *instruction_set);
int movefiles();
int linklib(const char* target, const char* source, int userId);
int idmap(const char *target_path, const char *overlay_path, uid_t uid);