需要检查文件是否是有效的APK[英] need to check if file is a valid APK

本文是小编为大家收集整理的关于需要检查文件是否是有效的APK的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我正在开发一个允许最终用户上传 .apk 的网页文件.我需要一个库/组件来检查上传的文件是否是有效的 .apk 文件.我正在寻找的不仅仅是查看内容的能力.

提前谢谢...

推荐答案

如果您需要以编程方式执行此操作,我建议您尝试使用 zip --check filename 或 dex2jar filename.就我而言,它有助于丢弃无效的 apk.

本文地址:https://www.itbaoku.cn/post/1938001.html

问题描述

I am working on a web page that will allow the end-user to upload .apk files. I need a library/component to check that the files uploaded are valid .apk files. I am looking for something more that the ability to just view the contents.

Thanks in advance...

推荐答案

If you need to do this programmatically, I suggest you to try with zip --check filename or dex2jar filename. In my case it helped to discard invalid apk.