diff options
author | 2016-12-05 11:18:55 -0700 | |
---|---|---|
committer | 2016-12-05 12:04:57 -0700 | |
commit | 9087400f3c82b97aa17a74329c7e65c0a5ff4062 (patch) | |
tree | 2274fb76c4690fc01e1ed7dfbf3c532fdbe68da5 /cmds/installd/installd.cpp | |
parent | 00b6f68c5c72252542a1e8c5dda4b420ed02c947 (diff) |
Initial Binder interface for installd.
Define an AIDL for installd, starting with a single method. Publish
that interface for the system to start using. We'll circle back and
migrate more methods in future CLs.
Migrating installd to Binder will allow us to get rid of one of
the few lingering text-based command protocols, improving system
maintainability and security.
Test: builds, boots
Bug: 13758960, 30944031
Change-Id: Icdb5320082567e0355d8f76f413f01cfacf0fb99
Diffstat (limited to 'cmds/installd/installd.cpp')
-rw-r--r-- | cmds/installd/installd.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmds/installd/installd.cpp b/cmds/installd/installd.cpp index c81a33965c..332bc5e175 100644 --- a/cmds/installd/installd.cpp +++ b/cmds/installd/installd.cpp @@ -30,6 +30,8 @@ #include <cutils/sockets.h> #include <private/android_filesystem_config.h> +#include <InstalldNativeService.h> + #include <commands.h> #include <globals.h> #include <installd_constants.h> @@ -705,7 +707,7 @@ static int installd_main(const int argc ATTRIBUTE_UNUSED, char *argv[]) { char buf[BUFFER_MAX]; struct sockaddr addr; socklen_t alen; - int lsocket, s; + int lsocket, s, ret; int selinux_enabled = (is_selinux_enabled() > 0); setenv("ANDROID_LOG_TAGS", "*:v", 1); @@ -732,6 +734,11 @@ static int installd_main(const int argc ATTRIBUTE_UNUSED, char *argv[]) { exit(1); } + if ((ret = InstalldNativeService::start()) != android::OK) { + ALOGE("Unable to start InstalldNativeService: %d", ret); + exit(1); + } + lsocket = android_get_control_socket(SOCKET_PATH); if (lsocket < 0) { ALOGE("Failed to get socket from environment: %s\n", strerror(errno)); |