diff --git a/cmds/servicemanager/service_manager.c b/cmds/servicemanager/service_manager.c index 0abdf83b4..cacfe1426 100644 --- a/cmds/servicemanager/service_manager.c +++ b/cmds/servicemanager/service_manager.c @@ -3,6 +3,7 @@ #include #include +#include #include #include #include @@ -22,8 +23,6 @@ #include #endif -uint32_t svcmgr_handle; - const char *str8(const uint16_t *x, size_t x_len) { static char buf[128]; @@ -254,10 +253,10 @@ int svcmgr_handler(struct binder_state *bs, uint32_t strict_policy; int allow_isolated; - //ALOGI("target=%x code=%d pid=%d uid=%d\n", - // txn->target.handle, txn->code, txn->sender_pid, txn->sender_euid); + //ALOGI("target=%p code=%d pid=%d uid=%d\n", + // (void*) txn->target.ptr, txn->code, txn->sender_pid, txn->sender_euid); - if (txn->target.handle != svcmgr_handle) + if (txn->target.ptr != BINDER_SERVICE_MANAGER) return -1; if (txn->code == PING_TRANSACTION) @@ -381,7 +380,6 @@ int main(int argc, char **argv) cb.func_log = selinux_log_callback; selinux_set_callback(SELINUX_CB_LOG, cb); - svcmgr_handle = BINDER_SERVICE_MANAGER; binder_loop(bs, svcmgr_handler); return 0;