diff options
author | Jiyong Park <jiyong@google.com> | 2018-11-15 16:05:05 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2018-11-16 11:57:09 +0900 |
commit | 5fbeac10f7d9aa08700fcf10a14411c52b17895e (patch) | |
tree | 0cb3feab2a45a5064bb1bc3703ba504652ceee59 /apexer/apexer.py | |
parent | 602ef7816e790e6b062730673432837fcb20e8fc (diff) |
AndroidManifest for APEX has hasCode="false"
This seem to be against the reality (since most APEXes will have code -
shared libs, java libraries, ...). But this is required because APEX
does not have classes.dex and other intra around APK is ensuring this.
Test: m apex.test
Change-Id: I8384fbaa4bc3606fbbd4ef9fc22357268051af9b
Diffstat (limited to 'apexer/apexer.py')
-rw-r--r-- | apexer/apexer.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apexer/apexer.py b/apexer/apexer.py index 636fd6f..8b57636 100644 --- a/apexer/apexer.py +++ b/apexer/apexer.py @@ -112,6 +112,8 @@ def PrepareAndroidManifest(package, version): <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="{package}" versionCode="{version}"> + <!-- APEX does not have classes.dex --> + <application android:hasCode="false" /> </manifest> """ return template.format(package=package, version=version) @@ -264,6 +266,7 @@ def CreateApex(args, work_dir): cmd.append('link') cmd.extend(['--manifest', android_manifest_file]) cmd.extend(['-o', apk_file]) + cmd.extend(['-I', "prebuilts/sdk/current/public/android.jar"]) RunCommand(cmd, args.verbose) zip_file = os.path.join(work_dir, 'apex.zip') |