Add an installd command to mark the end of boot.

bug: 18280671

(cherry picked from commit b1a6c2f95a455aa2829340fcc8d233493855f4d4)

Change-Id: I97542875ffff1b68ab324e9b04fb9266c82633cc
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index 5cd2593..b161614 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -1076,6 +1076,21 @@
     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)
 {