Add a remote binder service for executing commands
To summarize, three binaries are involved to run a command remotely:
- pvm_exec: the client executable on the host side to wrap the
executable command with hints of FD passing
- compsvc: listen to requests, spin off and sandbox a worker for
execution setup
- compsvc_worker: set up authfs, prepare the fds and exec the actual
task
Please see the code documentation for details.
Bug: 171316742
Test: [shell 1] adb shell compsvc /system/bin/sleep
[shell 2] adb shell exec 8</dev/zero 7<>/dev/null pvm_exec
--in-fd 8 --out-fd 7 -- sleep 300
# Saw FDs in /proc/${sleep_pid}/fd
Change-Id: I4758a4dc7bc70b6e5cce79e151c84c9990d9bc89
diff --git a/compos/aidl/Android.bp b/compos/aidl/Android.bp
new file mode 100644
index 0000000..8737d63
--- /dev/null
+++ b/compos/aidl/Android.bp
@@ -0,0 +1,12 @@
+aidl_interface {
+ name: "compos_aidl_interface",
+ unstable: true,
+ srcs: [
+ "com/android/compos/*.aidl",
+ ],
+ backend: {
+ rust: {
+ enabled: true,
+ },
+ },
+}