]> git.saurik.com Git - android/aapt.git/commitdiff
am eb0e0f46: am 2e7427f3: Merge "Add LFH offset to verbose list of APK" into gingerbread
authorKenny Root <kroot@google.com>
Thu, 26 Aug 2010 00:25:15 +0000 (17:25 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Thu, 26 Aug 2010 00:25:15 +0000 (17:25 -0700)
Merge commit 'eb0e0f465155bc9ec2c79741890fb65bd403e33a'

* commit 'eb0e0f465155bc9ec2c79741890fb65bd403e33a':
  Add LFH offset to verbose list of APK

1  2 
Command.cpp

diff --combined Command.cpp
index abccf9be9d0c57a3af2df8ecefe37cb7913c5b61,b0f086bf6bc2df6eea9d5f81ac21bef633641028..b50a393adad5db44b9347951b283749721814ef7
@@@ -141,9 -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;
              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());
          if (&res == NULL) {
              printf("\nNo resource table found.\n");
          } else {
 +#ifndef HAVE_ANDROID_OS
              printf("\nResource table:\n");
              res.print(false);
 +#endif
          }
  
          Asset* manifestAsset = assets.openNonAsset("AndroidManifest.xml",
@@@ -391,9 -390,8 +392,9 @@@ int doDump(Bundle* bundle
      }
  
      if (strcmp("resources", option) == 0) {
 +#ifndef HAVE_ANDROID_OS
          res.print(bundle->getValues());
 -
 +#endif
      } else if (strcmp("xmltree", option) == 0) {
          if (bundle->getFileSpecCount() < 3) {
              fprintf(stderr, "ERROR: no dump xmltree resource file specified\n");