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:
@@ -104,20 +104,22 @@ $(full_target): PRIVATE_DOCS_DIRS := $(addprefix $(OUT_DOCS)/, $(doc_modules))
|
||||
|
||||
$(full_target): PRIVATE_STAGING_DIR := $(call append-path,$(staging),$(addon_dir_leaf))
|
||||
|
||||
$(full_target): $(sdk_addon_deps) | $(ACP)
|
||||
$(full_target): $(sdk_addon_deps) | $(ACP) $(ZIPTIME)
|
||||
@echo Packaging SDK Addon: $@
|
||||
$(hide) mkdir -p $(PRIVATE_STAGING_DIR)/docs
|
||||
$(hide) for d in $(PRIVATE_DOCS_DIRS); do \
|
||||
$(ACP) -r $$d $(PRIVATE_STAGING_DIR)/docs ;\
|
||||
done
|
||||
$(hide) mkdir -p $(dir $@)
|
||||
$(hide) ( F=$$(pwd)/$@ ; cd $(PRIVATE_STAGING_DIR)/.. && zip -rq $$F $(notdir $(PRIVATE_STAGING_DIR)) )
|
||||
$(hide) ( F=$$(pwd)/$@ ; cd $(PRIVATE_STAGING_DIR)/.. && zip -rqX $$F $(notdir $(PRIVATE_STAGING_DIR)) )
|
||||
$(remove-timestamps-from-package)
|
||||
|
||||
$(full_target_img): PRIVATE_STAGING_DIR := $(call append-path,$(staging),$(addon_dir_img))/images/$(TARGET_CPU_ABI)
|
||||
$(full_target_img): $(full_target) $(addon_img_source_prop)
|
||||
$(full_target_img): $(full_target) $(addon_img_source_prop) | $(ZIPTIME)
|
||||
@echo Packaging SDK Addon System-Image: $@
|
||||
$(hide) mkdir -p $(dir $@)
|
||||
$(hide) ( F=$$(pwd)/$@ ; cd $(PRIVATE_STAGING_DIR)/.. && zip -rq $$F $(notdir $(PRIVATE_STAGING_DIR)) )
|
||||
$(hide) ( F=$$(pwd)/$@ ; cd $(PRIVATE_STAGING_DIR)/.. && zip -rqX $$F $(notdir $(PRIVATE_STAGING_DIR)) )
|
||||
$(remove-timestamps-from-package)
|
||||
|
||||
|
||||
.PHONY: sdk_addon
|
||||
|
||||
Reference in New Issue
Block a user