Android是否支持Zip64格式的apk文件? [英] Does Android support apk files in Zip64 format?

查看:327
本文介绍了Android是否支持Zip64格式的apk文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以使用Zip64格式构建有效的apk吗?可以在Android上安装/执行它吗,Android框架需要什么样的东西来支持它?

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?

Android的apksigner工具的最新版本(7.0 r31)

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 一段时间以来一直支持zip64 ,但例如从Android gradle插件中找不到使用此功能的好例子.

Gradle has supported zip64 for a while, but I couldn't find a good example of using this from, say, the Android gradle plugin.

我找到的apk的唯一示例是 apktool的错误报告-假设是Zip64,但后来被视为无效的apk文件.我尝试通过Python的zipfile解压缩文件,该文件返回了BadZipfile异常(而不是LargeZipFile),所以我猜它确实已损坏.

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.

我知道Android还有其他方法来处理大尺寸/大量文件的apk.我想知道是否需要根据在野外找到zip64 apk的可能性来在提取apk的工具中支持Zip64.

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.

推荐答案

否. Android Package Manager(用于安装APK的组件)不支持ZIP64.它使用 libziparchive (不支持ZIP64) . apksigner应该模仿Android Package Manager的功能.因此,apksigner也不支持ZIP64.

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.

这篇关于Android是否支持Zip64格式的apk文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆