From 95ed76bd3e044f3812ddf42a26cb718879dd143c Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Tue, 29 Sep 2009 10:55:32 -0700 Subject: [PATCH] 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. --- tools/zipalign/README.txt | 4 ++++ tools/zipalign/ZipAlign.cpp | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tools/zipalign/README.txt b/tools/zipalign/README.txt index a2e1a5ef4..9c7d07e53 100644 --- a/tools/zipalign/README.txt +++ b/tools/zipalign/README.txt @@ -1,7 +1,9 @@ zipalign -- zip archive alignment tool usage: zipalign [-f] [-v] infile.zip outfile.zip + zipalign -c [-v] infile.zip + -c : check alignment only (does not modify file) -f : overwrite existing outfile.zip -v : verbose output is in bytes, e.g. "4" provides 32-bit alignment @@ -29,3 +31,5 @@ entries. Files added to an "aligned" archive will not be aligned. By default, zipalign will not overwrite an existing output file. With the "-f" flag, an existing file will be overwritten. +You can use the "-c" flag to test whether a zip archive is properly aligned. + diff --git a/tools/zipalign/ZipAlign.cpp b/tools/zipalign/ZipAlign.cpp index eab2f04b8..c2d81593c 100644 --- a/tools/zipalign/ZipAlign.cpp +++ b/tools/zipalign/ZipAlign.cpp @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /* * Zip alignment tool */ @@ -29,9 +30,15 @@ using namespace android; void usage(void) { fprintf(stderr, "Zip alignment utility\n"); + fprintf(stderr, "Copyright (C) 2009 The Android Open Source Project\n\n"); fprintf(stderr, "Usage: zipalign [-f] [-v] infile.zip outfile.zip\n" - " zipalign -c [-v] infile.zip\n" ); + " zipalign -c [-v] infile.zip\n\n" ); + fprintf(stderr, + " : alignment in bytes, e.g. '4' provides 32-bit alignment\n"); + fprintf(stderr, " -c: check alignment only (does not modify file)\n"); + fprintf(stderr, " -f: overwrite existing outfile.zip\n"); + fprintf(stderr, " -v: verbose output\n"); } /*