diff options
author | Kenny Root <kroot@google.com> | 2010-08-25 17:20:29 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-08-25 17:20:29 -0700 |
commit | 2e7427f39ec15dcb43cc1247372b53980be11d38 (patch) | |
tree | 72ee7cb1052c1acbad4f338fb20841d89227052b /tools/aapt | |
parent | 50395e80718e77d27ec5e2d474b255e05de68d82 (diff) | |
parent | fb2a9467ad77336edbf2a1a272dbe6ec30ef8a1b (diff) | |
download | frameworks_base-2e7427f39ec15dcb43cc1247372b53980be11d38.zip frameworks_base-2e7427f39ec15dcb43cc1247372b53980be11d38.tar.gz frameworks_base-2e7427f39ec15dcb43cc1247372b53980be11d38.tar.bz2 |
Merge "Add LFH offset to verbose list of APK" into gingerbread
Diffstat (limited to 'tools/aapt')
-rw-r--r-- | tools/aapt/Command.cpp | 7 | ||||
-rw-r--r-- | tools/aapt/ZipEntry.h | 10 |
2 files changed, 9 insertions, 8 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index 35124aa..b0f086b 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -141,9 +141,9 @@ int doList(Bundle* bundle) if (bundle->getVerbose()) { printf("Archive: %s\n", zipFileName); printf( - " Length Method Size Ratio Date Time CRC-32 Name\n"); + " Length Method Size Ratio Offset Date Time CRC-32 Name\n"); printf( - "-------- ------ ------- ----- ---- ---- ------ ----\n"); + "-------- ------ ------- ----- ------- ---- ---- ------ ----\n"); } totalUncLen = totalCompLen = 0; @@ -159,12 +159,13 @@ int doList(Bundle* bundle) strftime(dateBuf, sizeof(dateBuf), "%m-%d-%y %H:%M", localtime(&when)); - printf("%8ld %-7.7s %7ld %3d%% %s %08lx %s\n", + printf("%8ld %-7.7s %7ld %3d%% %8zd %s %08lx %s\n", (long) entry->getUncompressedLen(), compressionName(entry->getCompressionMethod()), (long) entry->getCompressedLen(), calcPercent(entry->getUncompressedLen(), entry->getCompressedLen()), + (size_t) entry->getLFHOffset(), dateBuf, entry->getCRC32(), entry->getFileName()); diff --git a/tools/aapt/ZipEntry.h b/tools/aapt/ZipEntry.h index 7f721b4..c2f3227 100644 --- a/tools/aapt/ZipEntry.h +++ b/tools/aapt/ZipEntry.h @@ -72,6 +72,11 @@ public: off_t getCompressedLen(void) const { return mCDE.mCompressedSize; } /* + * Return the offset of the local file header. + */ + off_t getLFHOffset(void) const { return mCDE.mLocalHeaderRelOffset; } + + /* * Return the absolute file offset of the start of the compressed or * uncompressed data. */ @@ -186,11 +191,6 @@ protected: void setModWhen(time_t when); /* - * Return the offset of the local file header. - */ - off_t getLFHOffset(void) const { return mCDE.mLocalHeaderRelOffset; } - - /* * Set the offset of the local file header, relative to the start of * the current file. */ |