Add public C API to send request to CompOS
The API allows a client to connect to a CID (assumed privileged, more
below) and disconnect from it. The client can send an opaque byte
array to the "compile" method, which will internall forward the opaque
byte array to someone who could unmarshal (not guaranteed, since the
client may be untrusted).
This API is designed for ART (which is another APEX) to marshal its own
private compilation arugments to execute in the VM.
In a sense, what matters to the service in the API is the file
descriptor lists. It is what compsvc used to set up the "remote FDs".
Other than preparing the FDs, the rest is to execute the actual program.
In this implementation, ART's code is responsible for providing the
command line arguments from the "dexopt context".
Bug: 193668901
Test: atest ComposHostTestCases
Change-Id: I614b03d3d9916a624237b63925e0168e2146b32a
diff --git a/compos/apex/Android.bp b/compos/apex/Android.bp
index 547fd44..3a9d5f5 100644
--- a/compos/apex/Android.bp
+++ b/compos/apex/Android.bp
@@ -38,12 +38,19 @@
platform_apis: true,
binaries: [
+ // Used in Android
"compos_key_cmd",
"compos_verify_key",
"composd",
"composd_cmd",
+ "pvm_exec", // to be superseded by libcompos_client
+
+ // Used in VM
"compsvc",
- "pvm_exec",
+ ],
+
+ native_shared_libs: [
+ "libcompos_client",
],
apps: [