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

Issue 595933003: Re-invent page aligning libraries in APK file. (Closed)

Created:
6 years, 2 months ago by Anton
Modified:
6 years, 2 months ago
Reviewers:
cjhopman, rmcilroy
CC:
chromium-reviews, klundberg+watch_chromium.org, yfriedman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Re-invent page aligning libraries in APK file. With this change setting 'load_library_from_zip_file' to 1 will now construct the APK with a new tool chain. The purpose of this change is to contruct the APK in such a way that the page alignment is not broken by the chrome signing process. To achieve this the tool is written in Java so it shares the same underlying JarOutputStream implementation. The key things that we depend on are that the filenames are output in lexographical order with the META_INF files at the end of the file. That zipalign adds 4 byte alignment to STORED files and this is done by adding padding to the zip extra field. BUG=390618 Committed: https://crrev.com/c83a88d39329e2a7d8bbc1de280d9e572d2f7c8a Cr-Commit-Position: refs/heads/master@{#297439}

Patch Set 1 #

Total comments: 24

Patch Set 2 : Update for Ross' review #

Total comments: 18

Patch Set 3 : Update for Chris' review #

Patch Set 4 : Update for Ross' review #

Patch Set 5 : Update indentation #

Patch Set 6 : Fix for the android_webview_build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+412 lines, -41 lines) Patch
M build/android/finalize_apk_action.gypi View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M build/android/gyp/finalize_apk.py View 1 2 3 4 chunks +46 lines, -41 lines 0 comments Download
M build/android/rezip.gyp View 1 2 3 1 chunk +35 lines, -0 lines 0 comments Download
A build/android/rezip/RezipApk.java View 1 2 3 4 1 chunk +319 lines, -0 lines 0 comments Download
M build/android/rezip/rezip.cc View 1 2 chunks +7 lines, -0 lines 0 comments Download
M build/java_apk.gypi View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
Anton
6 years, 2 months ago (2014-09-26 14:08:28 UTC) #2
rmcilroy
First pass. Looks good overall. https://codereview.chromium.org/595933003/diff/1/build/android/gyp/finalize_apk.py File build/android/gyp/finalize_apk.py (right): https://codereview.chromium.org/595933003/diff/1/build/android/gyp/finalize_apk.py#newcode126 build/android/gyp/finalize_apk.py:126: ReorderApk(options.prealign_path, signed_apk_path, options.final_apk_path) Given ...
6 years, 2 months ago (2014-09-29 11:38:33 UTC) #3
Anton
https://codereview.chromium.org/595933003/diff/1/build/android/gyp/finalize_apk.py File build/android/gyp/finalize_apk.py (right): https://codereview.chromium.org/595933003/diff/1/build/android/gyp/finalize_apk.py#newcode126 build/android/gyp/finalize_apk.py:126: ReorderApk(options.prealign_path, signed_apk_path, options.final_apk_path) On 2014/09/29 11:38:32, rmcilroy wrote: > ...
6 years, 2 months ago (2014-09-29 16:30:18 UTC) #4
cjhopman
https://codereview.chromium.org/595933003/diff/20001/build/android/rezip.gyp File build/android/rezip.gyp (right): https://codereview.chromium.org/595933003/diff/20001/build/android/rezip.gyp#newcode28 build/android/rezip.gyp:28: 'javac_jar_path': '<(PRODUCT_DIR)/lib.java/rezip.jar', this can probably use build/host_jar.gypi (it looks ...
6 years, 2 months ago (2014-09-29 18:33:03 UTC) #6
rmcilroy
lgtm once comments are addressed. https://codereview.chromium.org/595933003/diff/1/build/android/rezip/PrealignApk.java File build/android/rezip/PrealignApk.java (right): https://codereview.chromium.org/595933003/diff/1/build/android/rezip/PrealignApk.java#newcode26 build/android/rezip/PrealignApk.java:26: class PrealignApk { On ...
6 years, 2 months ago (2014-09-30 09:36:33 UTC) #7
Anton
https://codereview.chromium.org/595933003/diff/20001/build/android/rezip.gyp File build/android/rezip.gyp (right): https://codereview.chromium.org/595933003/diff/20001/build/android/rezip.gyp#newcode28 build/android/rezip.gyp:28: 'javac_jar_path': '<(PRODUCT_DIR)/lib.java/rezip.jar', On 2014/09/29 18:33:03, cjhopman wrote: > this ...
6 years, 2 months ago (2014-09-30 09:52:34 UTC) #8
Anton
https://codereview.chromium.org/595933003/diff/1/build/android/rezip/PrealignApk.java File build/android/rezip/PrealignApk.java (right): https://codereview.chromium.org/595933003/diff/1/build/android/rezip/PrealignApk.java#newcode26 build/android/rezip/PrealignApk.java:26: class PrealignApk { On 2014/09/30 09:36:32, rmcilroy wrote: > ...
6 years, 2 months ago (2014-09-30 10:30:01 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/595933003/80001
6 years, 2 months ago (2014-09-30 14:01:32 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_aosp/builds/20123)
6 years, 2 months ago (2014-09-30 14:15:10 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/595933003/100001
6 years, 2 months ago (2014-09-30 16:12:47 UTC) #15
commit-bot: I haz the power
Committed patchset #6 (id:100001) as 6206fdfa36b2cc02f12cd54961dc0b84475e92ba
6 years, 2 months ago (2014-09-30 17:15:49 UTC) #16
commit-bot: I haz the power
6 years, 2 months ago (2014-09-30 17:16:27 UTC) #17
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/c83a88d39329e2a7d8bbc1de280d9e572d2f7c8a
Cr-Commit-Position: refs/heads/master@{#297439}

Powered by Google App Engine
This is Rietveld 408576698