Compile the utility `service` on host as `aservice`
... and run it.
It is not named `service` on host to avoid collision
with service(8).
fds don't work yet because of b/185909244.
Test: aservice list
# doesn't work well because of Java support b/190450693 and
# single-threaded service support b/191059588
Test: aservice call manager 4 i32 15
# listServices
Test: aservice call manager 7 s16 android.hardware.light.ILights/default
# isDelcared
Fixes: 190868305
Change-Id: I71b563ca0229164c2d96f8dba5a98107ed9f1e48
diff --git a/cmds/service/Android.bp b/cmds/service/Android.bp
index 3e8e3f6..21ac11b 100644
--- a/cmds/service/Android.bp
+++ b/cmds/service/Android.bp
@@ -52,3 +52,21 @@
"-Werror",
],
}
+
+cc_binary_host {
+ name: "aservice",
+
+ srcs: ["service.cpp"],
+
+ shared_libs: [
+ "libcutils",
+ "libutils",
+ "libbinder",
+ ],
+
+ cflags: [
+ "-DXP_UNIX",
+ "-Wall",
+ "-Werror",
+ ],
+}