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

查看:38
本文介绍了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) 版本 不支持 Zip64.但是,您可以使用其他工具(例如 jarsigner)对 apk 进行签名.

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.我想知道是否需要在提取 apk 的工具中支持 Zip64,基于在野外找到 zip64 apk 的可能性.

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 包管理器——处理安装 APK 的组件——不支持 ZIP64.它使用 libziparchive不支持 ZIP64.apksigner 应该模仿 Android 包管理器的功能.因此,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天全站免登陆