Revert "Remove changing uids/timestamps from zip/jar files"

This reverts commit 3c2c064c8791ed2d4b9d6780d7b87f406ab78f10.

zipalign depends on libandroidfw, and some setups don't include frameworks/base.

Bug: 24201956
Change-Id: I48ee95808924f6b2221f0a49ab205c2565096b1f
diff --git a/core/definitions.mk b/core/definitions.mk
index b450394..ecc7253 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2094,13 +2094,13 @@
 $(foreach abi,$(PRIVATE_JNI_SHARED_LIBRARIES_ABI),\
   $(call _add-jni-shared-libs-to-package-per-abi,$(abi),\
     $(patsubst $(abi):%,%,$(filter $(abi):%,$(PRIVATE_JNI_SHARED_LIBRARIES)))))
-$(hide) (cd $(dir $@) && zip -qrX $(JNI_COMPRESS_FLAGS) $(notdir $@) lib)
+$(hide) (cd $(dir $@) && zip -qr $(JNI_COMPRESS_FLAGS) $(notdir $@) lib)
 $(hide) rm -rf $(dir $@)lib
 endef
 
 #TODO: update the manifest to point to the dex file
 define add-dex-to-package
-$(hide) zip -qjX $@ $(dir $(PRIVATE_DEX_FILE))classes*.dex
+$(hide) zip -qj $@ $(dir $(PRIVATE_DEX_FILE))classes*.dex
 endef
 
 # Add java resources added by the current module.
@@ -2147,17 +2147,6 @@
 $(hide) mv $@.aligned $@
 endef
 
-# Remove dynamic timestamps from packages
-#
-define remove-timestamps-from-package
-$(hide) mv $@ $@.timed
-$(hide) $(ZIPALIGN) \
-    -f -t \
-    1 \
-    $@.timed $@.untimed
-$(hide) mv $@.untimed $@
-endef
-
 # Uncompress shared libraries embedded in an apk.
 #
 define uncompress-shared-libs
@@ -2165,7 +2154,7 @@
   rm -rf $(dir $@)uncompressedlibs && mkdir $(dir $@)uncompressedlibs; \
   unzip $@ $(PRIVATE_EMBEDDED_JNI_LIBS) -d $(dir $@)uncompressedlibs && \
   zip -d $@ 'lib/*.so' && \
-  ( cd $(dir $@)uncompressedlibs && zip -D -r -X -0 ../$(notdir $@) lib ) && \
+  ( cd $(dir $@)uncompressedlibs && zip -D -r -0 ../$(notdir $@) lib ) && \
   rm -rf $(dir $@)uncompressedlibs; \
   fi
 endef