title: Does Android support apk files in Zip64 format?
body: <p>Can a working apk be built using the Zip64 format? Can it be installed/executed on Android, and what kind of things would be necessary in the Android framework to support this?</p>
  
  <p>The latest (7.0 r31) version of Android's apksigner tool <a href="https://android.googlesource.com/platform/build/+/android-7.0.0_r31/tools/signapk/src/com/android/signapk/ApkSignerV2.java#158" rel="nofollow noreferrer">does not support Zip64</a>. You could, however, use other tools (such as jarsigner) to sign an apk.</p>
  
  <p>Gradle <a href="https://docs.gradle.org/1.12/release-notes.html#support-for-building-large-zips" rel="nofollow noreferrer">has supported zip64 for a while</a>, but I couldn't find a good example of using this from, say, the Android gradle plugin.</p>
  
  <p>The only example of an apk I found was <a href="https://www.bountysource.com/issues/29129026-java-util-zip-zipexception-invalid-cen-header-bad-signature" rel="nofollow noreferrer">a bug report for apktool</a> - hypothesised to be Zip64 but later deemed an invalid apk file. I tried unzipping the file via Python's zipfile, which returned a BadZipfile exception (instead of LargeZipFile), so I'm guessing it really is corrupt.</p>
  
  <p>I know that Android has other ways of dealing with apk's with large sizes/numbers of files. I am wondering whether I need to support Zip64 in tools that extract apk's, based on how likely it is to find a zip64 apk in the wild.</p>