Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1597)

Unified Diff: android_webview/tools/apk_merger.py

Issue 1619553003: Support uncompress and page align shared libraries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/gyp/apkbuilder.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/tools/apk_merger.py
diff --git a/android_webview/tools/apk_merger.py b/android_webview/tools/apk_merger.py
index e9ea1fe3c39648d2a0bd28524977621435117dd8..7851fe5ce683a14e50001c591036a1cb0e373544 100755
--- a/android_webview/tools/apk_merger.py
+++ b/android_webview/tools/apk_merger.py
@@ -121,7 +121,8 @@ def RemoveMetafiles(tmp_apk):
def SignAndAlignApk(tmp_apk, signed_tmp_apk, new_apk, zipalign_path,
- keystore_path, key_name, key_password):
+ keystore_path, key_name, key_password,
+ page_align_shared_libraries):
try:
finalize_apk.JarSigner(
keystore_path,
@@ -133,7 +134,10 @@ def SignAndAlignApk(tmp_apk, signed_tmp_apk, new_apk, zipalign_path,
raise ApkMergeFailure('Failed to sign APK: ' + e.output)
try:
- finalize_apk.AlignApk(zipalign_path, signed_tmp_apk, new_apk)
+ finalize_apk.AlignApk(zipalign_path,
+ page_align_shared_libraries,
+ signed_tmp_apk,
+ new_apk)
except build_utils.CalledProcessError as e:
raise ApkMergeFailure('Failed to align APK: ' + e.output)
@@ -151,6 +155,8 @@ def main():
parser.add_argument('--key_name', required=True)
parser.add_argument('--key_password', required=True)
parser.add_argument('--shared_library', required=True)
+ parser.add_argument('--page-align-shared-libraries', action='store_true')
+ parser.add_argument('--uncompress-shared-libraries', action='store_true')
args = parser.parse_args()
tmp_dir = tempfile.mkdtemp()
@@ -166,6 +172,9 @@ def main():
'natives_blob_32.bin': ['-0'],
args.shared_library: []}
+ if args.uncompress_shared_libraries:
+ expected_files[args.shared_library] += ['-0']
+
try:
shutil.copyfile(args.apk_64bit, tmp_apk)
@@ -190,7 +199,8 @@ def main():
AddDiffFiles(diff_files, tmp_dir_32, tmp_apk, expected_files)
SignAndAlignApk(tmp_apk, signed_tmp_apk, new_apk, args.zipalign_path,
- args.keystore_path, args.key_name, args.key_password)
+ args.keystore_path, args.key_name, args.key_password,
+ args.page_align_shared_libraries)
except ApkMergeFailure as e:
print e
« no previous file with comments | « no previous file | build/android/gyp/apkbuilder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698