summaryrefslogtreecommitdiff
path: root/tools/aapt/Command.cpp
diff options
context:
space:
mode:
author Kenny Root <kroot@google.com> 2010-08-25 07:36:31 -0700
committer Kenny Root <kroot@google.com> 2010-08-25 07:38:33 -0700
commitfb2a9467ad77336edbf2a1a272dbe6ec30ef8a1b (patch)
tree584fffa345cccc738048b2d7930c0b4c89a48773 /tools/aapt/Command.cpp
parent6b6ae996b2e84af030397cff3a7f0087de93e01c (diff)
Add LFH offset to verbose list of APK
The Local File Header (LFH) offset is printed in debugging cases when the platform is inspecting APKs. This adds the LFH offset field to the list of contents of an APK, so that it can be checked easily against the Central Directory (CD). Change-Id: I08f9a13256bfe6563c1a963c4f0289789b2e7857
Diffstat (limited to 'tools/aapt/Command.cpp')
-rw-r--r--tools/aapt/Command.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 35124aad19ea..b0f086bf6bc2 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());