summaryrefslogtreecommitdiff
path: root/apexer/apexer.py
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2018-09-05 21:34:21 +0900
committerJiyong Park <jiyong@google.com>2018-09-14 17:49:57 +0900
commite396fce50149aa84aed5adc5136f54827d44661c (patch)
tree6aa75c9561ad8b85a610bea43287591c8596e706 /apexer/apexer.py
parenta54f30c9edf5cb6fb0a1e09dc30c3238fad8aa08 (diff)
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: Ifc44790a8f7de9307550edef0e4d70e9a78327f6
Diffstat (limited to 'apexer/apexer.py')
-rw-r--r--apexer/apexer.py5
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(