Reland: Add module type apex to build APEX bundles

A new module type 'apex' is added to be able to build APEX bundles in
Soong.

Usage:

apex {
    name: "com.android.awesome",
    manifest: "manifest.json",
    file_contexts: "file_contexts",
    native_shared_lib_modules: ["libX", "libY"],
}

This will create /system/apex/com.android.awesome.apex having libX.so
and libY.so in it.

Right now, it lacks many of the planned features:

- APEX modules are now built against platform API, which should be against
stable APIs like NDK, Android API and API from other APEXs.

- Only native shared libs are supported. Executables, java libraries,
aidl_interfaces, and prebuilts should be supported.

- Inter-APEX dependency isn't supported yet.

- fs_config isn't configurable. All files and directories are set to
(uid/gid/mode) = (1000/1000/0644)

- native shared libs are stored unstripped.

Bug: 112672359
Test: m apex.test
Change-Id: I2e1a53a88c79653bcf33c1305baaf684428fcf6e
5 files changed
tree: bd58d50cd74a40ad23356daa40fd387fd165e138
  1. apexd/
  2. apexer/
  3. build/
  4. OWNERS
  5. PREUPLOAD.cfg