Loading cmds/servicemanager/Android.bp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -43,6 +43,9 @@ cc_binary { "service_manager.c", "service_manager.c", "binder.c", "binder.c", ], ], cflags: [ "-DVENDORSERVICEMANAGER=1", ], shared_libs: ["libcutils", "libselinux"], shared_libs: ["libcutils", "libselinux"], init_rc: ["vndservicemanager.rc"], init_rc: ["vndservicemanager.rc"], } } cmds/servicemanager/service_manager.c +14 −4 Original line number Original line Diff line number Diff line Loading @@ -17,13 +17,12 @@ #include "binder.h" #include "binder.h" #if 0 #ifdef VENDORSERVICEMANAGER #define ALOGI(x...) fprintf(stderr, "svcmgr: " x) #define LOG_TAG "VendorServiceManager" #define ALOGE(x...) fprintf(stderr, "svcmgr: " x) #else #else #define LOG_TAG "ServiceManager" #define LOG_TAG "ServiceManager" #include <log/log.h> #endif #endif #include <log/log.h> struct audit_data { struct audit_data { pid_t pid; pid_t pid; Loading Loading @@ -374,7 +373,14 @@ int main(int argc, char** argv) bs = binder_open(driver, 128*1024); bs = binder_open(driver, 128*1024); if (!bs) { if (!bs) { #ifdef VENDORSERVICEMANAGER ALOGW("failed to open binder driver %s\n", driver); while (true) { sleep(UINT_MAX); } #else ALOGE("failed to open binder driver %s\n", driver); ALOGE("failed to open binder driver %s\n", driver); #endif return -1; return -1; } } Loading @@ -388,7 +394,11 @@ int main(int argc, char** argv) cb.func_log = selinux_log_callback; cb.func_log = selinux_log_callback; selinux_set_callback(SELINUX_CB_LOG, cb); selinux_set_callback(SELINUX_CB_LOG, cb); #ifdef VENDORSERVICEMANAGER sehandle = selinux_android_vendor_service_context_handle(); #else sehandle = selinux_android_service_context_handle(); sehandle = selinux_android_service_context_handle(); #endif selinux_status_open(true); selinux_status_open(true); if (sehandle == NULL) { if (sehandle == NULL) { Loading Loading
cmds/servicemanager/Android.bp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -43,6 +43,9 @@ cc_binary { "service_manager.c", "service_manager.c", "binder.c", "binder.c", ], ], cflags: [ "-DVENDORSERVICEMANAGER=1", ], shared_libs: ["libcutils", "libselinux"], shared_libs: ["libcutils", "libselinux"], init_rc: ["vndservicemanager.rc"], init_rc: ["vndservicemanager.rc"], } }
cmds/servicemanager/service_manager.c +14 −4 Original line number Original line Diff line number Diff line Loading @@ -17,13 +17,12 @@ #include "binder.h" #include "binder.h" #if 0 #ifdef VENDORSERVICEMANAGER #define ALOGI(x...) fprintf(stderr, "svcmgr: " x) #define LOG_TAG "VendorServiceManager" #define ALOGE(x...) fprintf(stderr, "svcmgr: " x) #else #else #define LOG_TAG "ServiceManager" #define LOG_TAG "ServiceManager" #include <log/log.h> #endif #endif #include <log/log.h> struct audit_data { struct audit_data { pid_t pid; pid_t pid; Loading Loading @@ -374,7 +373,14 @@ int main(int argc, char** argv) bs = binder_open(driver, 128*1024); bs = binder_open(driver, 128*1024); if (!bs) { if (!bs) { #ifdef VENDORSERVICEMANAGER ALOGW("failed to open binder driver %s\n", driver); while (true) { sleep(UINT_MAX); } #else ALOGE("failed to open binder driver %s\n", driver); ALOGE("failed to open binder driver %s\n", driver); #endif return -1; return -1; } } Loading @@ -388,7 +394,11 @@ int main(int argc, char** argv) cb.func_log = selinux_log_callback; cb.func_log = selinux_log_callback; selinux_set_callback(SELINUX_CB_LOG, cb); selinux_set_callback(SELINUX_CB_LOG, cb); #ifdef VENDORSERVICEMANAGER sehandle = selinux_android_vendor_service_context_handle(); #else sehandle = selinux_android_service_context_handle(); sehandle = selinux_android_service_context_handle(); #endif selinux_status_open(true); selinux_status_open(true); if (sehandle == NULL) { if (sehandle == NULL) { Loading