Remove changing uids/timestamps from zip/jar files

Pass -X to zip so that Unix UID/GID and extra timestamps aren't
saved into the zip files.

Add a new tool, ziptime, that uses a very stripped down copy of
zipalign. It no longer depends on libandroidfw, and now rewrites the
timestamps in place instead of making a copy of the zipfile. This should
improve speed and reduce disk requirements, especially with the large
packaging zip files.

Bug: 24201956
Change-Id: I50f68669f659da1b4393e964ad40b6aafb00c1e7
This commit is contained in:
Dan Willemsen
2015-10-29 16:33:05 -07:00
parent f589c7b442
commit 48a621c277
15 changed files with 752 additions and 40 deletions

View File

@@ -81,7 +81,7 @@ else # !LOCAL_IS_STATIC_JAVA_LIBRARY
$(common_javalib.jar): PRIVATE_DEX_FILE := $(built_dex)
$(common_javalib.jar): PRIVATE_SOURCE_ARCHIVE := $(full_classes_jarjar_jar)
$(common_javalib.jar): PRIVATE_DONT_DELETE_JAR_DIRS := $(LOCAL_DONT_DELETE_JAR_DIRS)
$(common_javalib.jar) : $(built_dex) $(java_resource_sources)
$(common_javalib.jar) : $(built_dex) $(java_resource_sources) | $(ZIPTIME)
@echo "target Jar: $(PRIVATE_MODULE) ($@)"
ifdef LOCAL_JACK_ENABLED
$(create-empty-package)
@@ -92,6 +92,7 @@ endif
ifdef LOCAL_JACK_ENABLED
$(add-carried-jack-resources)
endif
$(remove-timestamps-from-package)
ifdef LOCAL_DEX_PREOPT
ifneq ($(dexpreopt_boot_jar_module),) # boot jar