Enable vehicle HAL to be controlled via ADB
Add emulator functionality to DefaultVehicleHal:
- Create default list of properties based upon DefaultConfig.h
- Add socket that is reachable via ADB to set/get vehicle properties.
BUG: 29601815
Test: Tested with Python interface from host.
Change-Id: I6f8e4cba37d927565e10797875eb8f5a1840a94f
diff --git a/automotive/vehicle/2.0/default/Android.mk b/automotive/vehicle/2.0/default/Android.mk
index a346507..e822044 100644
--- a/automotive/vehicle/2.0/default/Android.mk
+++ b/automotive/vehicle/2.0/default/Android.mk
@@ -41,6 +41,28 @@
include $(BUILD_STATIC_LIBRARY)
###############################################################################
+# Vehicle HAL Protobuf library
+###############################################################################
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := $(call all-proto-files-under, impl/proto)
+
+LOCAL_PROTOC_OPTIMIZE_TYPE := nano
+
+LOCAL_MODULE := $(module_prefix)-libproto-native
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_STRIP_MODULE := keep_symbols
+
+generated_sources_dir := $(call local-generated-sources-dir)
+LOCAL_EXPORT_C_INCLUDE_DIRS := \
+ $(generated_sources_dir)/proto/$(LOCAL_PATH)/impl/proto
+
+include $(BUILD_STATIC_LIBRARY)
+
+
+###############################################################################
# Vehicle default VehicleHAL implementation
###############################################################################
include $(CLEAR_VARS)
@@ -55,9 +77,13 @@
libhidltransport \
libhwbinder \
liblog \
+ libprotobuf-cpp-lite \
libutils \
$(module_prefix) \
+LOCAL_STATIC_LIBRARIES := \
+ $(module_prefix)-libproto-native
+
include $(BUILD_STATIC_LIBRARY)
@@ -114,7 +140,11 @@
libhidltransport \
libhwbinder \
liblog \
+ libprotobuf-cpp-lite \
libutils \
$(module_prefix) \
+LOCAL_STATIC_LIBRARIES := \
+ $(module_prefix)-libproto-native
+
include $(BUILD_EXECUTABLE)