diff options
author | Jiyong Park <jiyong@google.com> | 2018-09-05 21:34:21 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2018-09-18 10:38:22 +0900 |
commit | 8537e2ab52b66803e91e27dc1156fb3e665130cc (patch) | |
tree | bd58d50cd74a40ad23356daa40fd387fd165e138 /apexer/apexer.py | |
parent | a231884d79bce8bc88509126b987b97603afb1c5 (diff) |
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
Diffstat (limited to 'apexer/apexer.py')
-rw-r--r-- | apexer/apexer.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apexer/apexer.py b/apexer/apexer.py index 3032535..d80e807 100644 --- a/apexer/apexer.py +++ b/apexer/apexer.py @@ -31,6 +31,8 @@ import subprocess import sys import tempfile +tool_path = os.environ['APEXER_TOOL_PATH'] + def ParseArgs(argv): parser = argparse.ArgumentParser(description='Create an APEX file') parser.add_argument('-f', '--force', action='store_true', @@ -55,6 +57,9 @@ def ParseArgs(argv): def RunCommand(cmd, verbose=False, env=None): env = env or {} env.update(os.environ.copy()) + + cmd[0] = os.path.join(tool_path, cmd[0]) + if verbose: print("Running: " + " ".join(cmd)) p = subprocess.Popen( |