diff options
author | dianlujitao <dianlujitao@lineageos.org> | 2020-04-06 12:45:36 +0800 |
---|---|---|
committer | dianlujitao <dianlujitao@lineageos.org> | 2020-04-06 13:10:36 +0800 |
commit | c6992a51da7d1269f300870390aba2476fbe3dff (patch) | |
tree | 834a1b0bec2215fad8fc81952f7097d26646cd2f | |
parent | 129e14bc5380af877878e18953cb241b90060f8a (diff) |
extract_utils: Generate deodexed apk/jar with consistent checksum
* zip stores timestamp for all included files. The timestamps of dex
files are different across different runs, result in inconsistent
checksum of output apk/jar.
* Workaround the issue by using fixed timestamp for dex files.
Change-Id: I21f3a7e32cdfdb07c5f5c140df2e797efd4a8005
-rw-r--r-- | extract_utils.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/extract_utils.sh b/extract_utils.sh index 08ef3dd..47116b2 100644 --- a/extract_utils.sh +++ b/extract_utils.sh @@ -1590,6 +1590,7 @@ function extract() { if [[ "$FULLY_DEODEXED" -ne "1" && "${VENDOR_REPO_FILE}" =~ .(apk|jar)$ ]]; then oat2dex "${VENDOR_REPO_FILE}" "${SRC_FILE}" "$SRC" if [ -f "$TMPDIR/classes.dex" ]; then + touch -t 200901010000 "$TMPDIR/classes"* zip -gjq "${VENDOR_REPO_FILE}" "$TMPDIR/classes"* rm "$TMPDIR/classes"* printf ' (updated %s from odex files)\n' "${SRC_FILE}" |