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

Unified Diff: build/android/gyp/apkbuilder.py

Issue 2594803002: Android: Delete rezip in favor of zipalign -p (Closed)
Patch Set: Created 4 years 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
Index: build/android/gyp/apkbuilder.py
diff --git a/build/android/gyp/apkbuilder.py b/build/android/gyp/apkbuilder.py
index 82ac496ed970039ed34bd51af0e06c64b88d91f4..5d87625bf933afeefa05996c3505f2830002e4d0 100755
--- a/build/android/gyp/apkbuilder.py
+++ b/build/android/gyp/apkbuilder.py
@@ -163,12 +163,15 @@ def _AddNativeLibraries(out_apk, native_libs, android_abi, uncompress):
"""Add native libraries to APK."""
for path in native_libs:
basename = os.path.basename(path)
- apk_path = 'lib/%s/%s' % (android_abi, basename)
compress = None
- if (uncompress and os.path.splitext(basename)[1] == '.so'):
+ if (uncompress and os.path.splitext(basename)[1] == '.so'
+ and 'android_linker' not in basename):
jbudorick 2016/12/20 21:29:50 This will mean that compress will be None (rather
agrieve 2016/12/21 15:41:40 Yeah, this is the ugly part of the code, but it wa
compress = False
+ # Add prefix to prevent android install from extracting upon install.
+ basename = 'crazy.' + basename
+ apk_path = 'lib/%s/%s' % (android_abi, basename)
build_utils.AddToZipHermetic(out_apk,
apk_path,
src_path=path,
@@ -265,8 +268,9 @@ def main(args):
options.uncompress_shared_libraries)
for name in sorted(options.native_lib_placeholders):
- # Empty libs files are ignored by md5check, but rezip requires them
- # to be empty in order to identify them as placeholders.
+ # Note: Empty libs files are ignored by md5check (can cause issues
+ # with stale builds when the only change is adding/removing
+ # placeholders).
apk_path = 'lib/%s/%s' % (options.android_abi, name)
build_utils.AddToZipHermetic(out_apk, apk_path, data='')

Powered by Google App Engine
This is Rietveld 408576698