#include #include #include #include "Memtrack.h" #undef LOG_TAG #define LOG_TAG "memtrack-service" using aidl::android::hardware::memtrack::Memtrack; int main() { ABinderProcess_setThreadPoolMaxThreadCount(0); std::shared_ptr memtrack = ndk::SharedRefBase::make(); const std::string instance = std::string() + Memtrack::descriptor + "/default"; binder_status_t status = AServiceManager_addService(memtrack->asBinder().get(), instance.c_str()); CHECK(status == STATUS_OK); ABinderProcess_joinThreadPool(); return EXIT_FAILURE; // Unreachable }