Commit graph

35 commits

Author SHA1 Message Date
Aurimas Liutikas
af1d741182 Fix 2 unused parameter warnings in zipalign.
ZipFile parameter was not used and therefore can be removed.

Bug: 26936282
Change-Id: Id2b6e693b40571b7e7486304a6effaedc1b3c940
2016-02-12 02:13:30 +00:00
Dan Willemsen
41bc424c32 Use explicitly sized types in zipalign/ziptime
getLongLE would return a 64-bit number with the upper 32-bits set when
decoding a 32-bit number with the top bit set. Per the zip file format,
it was only expected to return a 32-bit number. Use explicitly sized
types so that we use the proper sizes and don't do any implicit
extensions.

Change-Id: I5a4304dc99ce5f8f17284d4ca3094ae115207a1e
2015-11-04 23:52:52 +00:00
Dan Willemsen
b589ae4e26 Revert "Remove changing uids/timestamps from zip/jar files"
This reverts commit 3c2c064c87.

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

Bug: 24201956
Change-Id: I48ee95808924f6b2221f0a49ab205c2565096b1f
2015-10-29 21:26:18 +00:00
Dan Willemsen
3c2c064c87 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 option to zipalign, -t, to replace all timestamps with static
timestamps (2008 Jan 1 00:00:00). Use this for all non-APK zip files.
APK zip timestamps are set based on the certificate date in SignApk.

Bug: 24201956
Change-Id: Ifb619fc499ba9d99fc624f2acd5f8de36d78ef8e
2015-10-29 11:57:16 -07:00
Dan Willemsen
859ac34064 Add LOCAL_MODULE_HOST_OS
Instead of wrapping a host module definition in 'ifeq($(HOST_OS),...)'
in the Android.mk files, define which hosts are supported using
LOCAL_MODULE_HOST_OS.

A blank LOCAL_MODULE_HOST_OS means that linux and darwin are supported.
A non-empty LOCAL_MODULE_HOST_OS lists the supported HOST_OSs.

Change-Id: I1e342d1908cfa00aef2c39c145b4f5f81c373bc6
2015-09-03 16:40:51 -07:00
Dan Willemsen
7a5498568f Add _(darwin|linux|windows)
So that we can support building both linux and windows binaries at the
same time on a linux host. This replaces the ifeq($(HOST_OS),...) checks
in Android.mk files.

Bug: 23566667

Change-Id: I693e11984e36d55bb6f09fa0d49bc485463e16fb
2015-08-28 03:36:22 +00:00
Narayan Kamath
e0b8d19f31 Fix zipalign README file and usage strings.
Addresses comments from change 13e5965306.

Change-Id: I0a2c0048781858d3aa06347a77220547cfcdcebe
2015-02-27 14:17:17 +00:00
Dmitriy Ivanov
13e5965306 Store native libs aligned to PAGE_SIZE
- Add a new flag to zipalign (-p) that page aligns shared
  libraries (zip entries ending with ".so") in the archive.

- Add a new build variable LOCAL_PAGE_ALIGN_SHARED_LIBRARIES
  to turn on this behaviour in zipalign.

- Add a new LOCAL_JNI_SHARED_LIBRARIES_ZIP_OPTIONS to control
  zip behaviour.

Bug: 8076853
Bug: 19330157

Co-Authored-By: Simon Baldwin <simonb@google.com>
Co-Authored-By: Dimitry Ivanov <dimitry@google.com>
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
2015-02-26 12:31:40 +00:00
Yabin Cui
e9ae59b47f kill HAVE_LOCALTIME_R
Bug: 18361583
Change-Id: If76334a6e18893b65d9b526271620a460a75bf22
2014-11-13 11:51:37 -08:00
Ying Wang
5a5d443f15 am 8ac188ff: am 6dbbb159: Merge "Consistent use of USE_MINGW"
* commit '8ac188ff0e739ea75ea02166c54428245200f088':
  Consistent use of USE_MINGW
2014-08-08 03:26:07 +00:00
Ying Wang
594a10ae77 Consistent use of USE_MINGW
Change-Id: I05e212e5a99639d0196006b9c2ec35072c54f399
2014-08-07 20:08:04 -07:00
Raph Levien
093d04c631 Add Zopfli-recompress option to zipalign
Zopfli provides compression roughly 5% better than zlib, while remaining
completely compatible with zlib decoders. This patch adds a "-z" option
to zipalign, recompressing all compressed files within the zip archive.

Change-Id: If177ca4b82ec701b7446861b2cfe08c6bd403813
2014-07-07 16:03:49 -07:00
Mathias Agopian
f14d85d6fc libutils clean-up
Change-Id: I93a0fef582580282d62379ddba3ae2d50f3ea0c5
2013-05-07 16:31:04 -07:00
Ying Wang
8c431c157d Add liblog
Bug: 8580410
Change-Id: Id3c26ff084950f8cbfa87f4425747ee322de7624
2013-04-09 22:33:58 -07:00
Ying Wang
cd3190a9f5 Revert "Add liblog"
This reverts commit 8722580d90

Change-Id: Iafdbb7f540a53ddc9dc2e21c0afddb62c44c4af8
2013-04-10 05:32:21 +00:00
Ying Wang
8722580d90 Add liblog
Bug: 8580410
Change-Id: I45e17b786b8d221a071b5de2432bb1367e245fb4
2013-04-09 21:41:48 -07:00
Jean-Baptiste Queru
5ac65f8696 Merge "Fix reporting wrong error message for zipalign output file" 2012-08-23 14:52:41 -07:00
Andrew Hsieh
31ef1037bf Added BUILD_HOST_static to build statically linked executable/shared-lib
Statically linked executable/shared-lib (eg. SDK tools) are useful
in sandboxed environment.

In BUILD_HOST_static zipalign needs -lpthread indirectly:
zipalign->libutils.a->liblog.a->logd_write.c->pthread

Change-Id: I615f574e918c83ed1ab82db2453b69d0420cb59c
2012-08-21 14:40:16 +08:00
Jingwen Owen Ou
303213915d Fix reporting wrong error message for zipalign output file
The problem is due to using variable inFileName instead of outFileName for printing out error message for output file.

Change-Id: Ie53a21b077fea5e7cd106fe6884cea159d2629a2
2012-08-17 16:21:11 -07:00
Colin Cross
0bf80735ec build: move Zip* from libandroidfw to libutils
ZipUtils is needed by build/tools, move it from libandroidfw
(frameworks/base) to libutils (frameworks/native).

Change-Id: I188247d058f1baa0ebd14282208d496c4ba061be
2012-03-22 18:47:23 -07:00
Mathias Agopian
9f763bec7b frameworks/base refactoring
add libandroidfw.so to the build

Change-Id: If84e8afd5056a5ac66c3c9e116d821a8a5a571dd
2012-02-20 22:38:41 -08:00
Mathias Agopian
6b0a355b37 frameworks/base refactoring: build fix
Change-Id: If9f1b8a6a9eafa9ea17a3b994941c5c369be2130
2012-02-17 19:41:13 -08:00
Glenn Kasten
1022e27642 Fix build warning
Change-Id: I1e3a76e4bdae5eec4f75c5d8eb9f533afab6d140
2012-01-12 07:30:27 -08:00
Steve Block
ca1df5a380 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ieea4e4511e1a95caeea42cd0a0c1147ebf9c2f48
2012-01-08 11:03:18 +00:00
Steve Block
c0b74df335 Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I817c12b1e97bee598097d02c70d509f7ab70576a
2012-01-05 23:28:01 +00:00
Steve Block
934443b275 Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: I02566a8d55d7f8845bcc11925b90b2dac4342e63
2012-01-04 20:07:45 +00:00
Steve Block
15fab1aa8c Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I9281fd27af8c6ec29ebdca60b22f6c9d5ff8deed
2012-01-03 22:37:53 +00:00
Steve Block
2da72c6265 Rename LOGV(_IF) to ALOGV(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: Ie7704789e47b9553d02e3f6ed89c3ceab532119c
2011-10-25 18:14:48 +01:00
Raphael
925a3279b7 Make zipalign build for the Win SDK under Linux.
Change-Id: Ibd667437d6637fbc5b21147f57eb41e81cbd8577
2010-04-20 15:46:54 -07:00
Andy McFadden
95ed76bd3e Update usage and readme for zipalign.
Added the "-c" flag to the README, and added a short description of the
flag meanings to the usage output.  Threw in an AOSP copyright one-liner
for good measure.
2009-09-29 10:55:32 -07:00
Mathias Agopian
3344b2e9b2 break dependency on utils/ZipEntry.h and utils/ZipFile.h 2009-06-05 14:55:48 -07:00
Doug Zongker
3f2933b209 add check mode to zipalign
Add a -c flag to zipalign to do nothing but check the input zip file
for alignment (with or without verbosity).
2009-04-16 10:16:38 -07:00
The Android Open Source Project
88b607994a auto import from //depot/cupcake/@135843 2009-03-03 19:28:42 -08:00
The Android Open Source Project
05806d7af6 auto import from //depot/cupcake/@135843 2009-03-03 18:28:14 -08:00
The Android Open Source Project
b6c1cf6de7 Initial Contribution 2008-10-21 07:00:00 -07:00