问题描述
可以使用ZIP64格式构建工作APK吗?可以在Android上安装/执行,以及在Android框架中需要什么样的事情来支持这一点?
最新(7.0 r31)版本的Android的apksigner工具不支持zip64 .但是,您可以使用其他工具(如Jarsigner)来签署APK.
gradle 支持zip64一段时间,但我找不到使用这一点的一个很好的例子,比如说,说,Android Gradle插件.
我发现的apk的唯一示例是 apktool的错误报告 - 假设为zip64,但后来被视为无效的apk文件.我尝试通过python的zipfile解压缩文件,返回adpzipfile异常(而不是mangryzipfile),所以我猜它真的是腐败的.
我知道Android还有其他方式处理APK,具有大尺寸/数量的文件.我想知道我是否需要在提取APK的工具中支持ZIP64,这是根据在野外找到ZIP64 APK的可能性.
推荐答案
no. Android包管理器 - 处理APKS的组件 - 不支持ZIP64.它使用 libziparchive 不支持zip64 . apksigner应该模仿Android包管理器的确实是什么.因此,apksigner不支持ZIP64.
问题描述
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?
The latest (7.0 r31) version of Android's apksigner tool does not support Zip64. You could, however, use other tools (such as jarsigner) to sign an apk.
Gradle has supported zip64 for a while, but I couldn't find a good example of using this from, say, the Android gradle plugin.
The only example of an apk I found was a bug report for apktool - 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.
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.
推荐答案
No. Android Package Manager -- the component which deals with installing APKs -- does not support ZIP64. It uses libziparchive which doesn't support ZIP64. apksigner is supposed to mimic what the Android Package Manager does. Hence, apksigner doesn't support ZIP64 either.