I have posted some articles about AIDL. You can have a look. Ther also a git repo to see how it works.
How to communicate through AIDL to a HAL service – Part 1 <https://aospinsight.com/how-to-communicate-through-aidl-to-a-hal-service-part-1/> How to implement the AIDL interface <https://aospinsight.com/how-to-implement-the-aidl-interface/> How To Add An AIDL HAL Service (daemon) <https://aospinsight.com/how-to-add-an-aidl-hal-service-daemon/> Good luck! On Friday, January 13, 2023 at 2:05:35 AM UTC+1 TblS wrote: > I have a native module under /devices: > > - module > -- aidl > --- com > ---- my > ----- package > ------ IMyInterface.aidl > -- Android.mk > -- Proxy.h > -- Proxy.cpp > > I want to use binder in this module. My Android.mk: > LOCAL_PATH := $(call my-dir) > $(call emugl-begin-shared-library,libMyModule) > LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/aidl > LOCAL_SRC_FILES := \ aidl/com/my/package/IMyInterface.aidl \ > Proxy.cpp \ > > LOCAL_HEADER_LIBRARIES := libbinder_headers \ > libhidlbase_impl_internal \ > libbase > > LOCAL_SHARED_LIBRARIES := libbinder \ > libutils \ > liblog \ > libcutils > > $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) > $(call emugl-import,libOpenglCodecCommon$(GOLDFISH_OPENGL_LIB_SUFFIX)) > $(call emugl-end-module) > > When I'm building it, it generates C++ headers, but they are located in > the intermediates directory only: > > $ ls > out/target/product/emulator_x86_64/obj/SHARED_LIBRARIES/libMyModule_intermediates/aidl-generated/include/com/my/package: > > BnMyInterface.h BpMyInterface.h IMyInterface.h > > How should I include them in my Proxy.cpp? If I just add #include > "IMyInterface.h", build system doesn't see it: fatal error: > 'IMyInterface.h' file not found > -- -- You received this message because you are subscribed to the "Android Building" mailing list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-building?hl=en --- You received this message because you are subscribed to the Google Groups "Android Building" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/5173e156-97ff-4c1b-84dd-ed172a879e7bn%40googlegroups.com.
