简体   繁体   English

在设备上的Android应用程序内部创建APK文件?

[英]Creating APK file inside Android Application on the device?

Can one create .APK file from set of files/folder inside Android Application? 可以从Android应用程序中的一组文件/文件夹创建.APK文件吗? (for example, inside application like fdroid) (例如,内部应用程序,例如fdroid)

For example, I have uncompressed files of my apk file and I want to recreate/compress it again inside Android application. 例如,我的apk文件有未压缩的文件,我想在Android应用程序中再次重新创建/压缩它。

Can I use apktool from inside Android Application? 我可以从Android应用程序内部使用apktool吗? Or is there anything similar? 还是有类似的东西?

It is totally possible to build an APK on Android, but it won't be easy. 完全有可能在Android上构建APK,但这并不容易。 Java supports the ZIP/JAR format natively, so you can assemble the unsigned APK that way. Java本机支持ZIP / JAR格式,因此您可以以这种方式组装未签名的APK。 The only way I know to sign the APK on Android is the zipsigner library. 我知道在Android上对APK进行签名的唯一方法是zipsigner库。 The only maintained copy of that that I've seen is directly included in F-Droid: https://gitlab.com/fdroid/fdroidclient/tree/1.4/app/src/full/java/kellinwood 我所见过的唯一维护的副本直接包含在F-Droid中: https : //gitlab.com/fdroid/fdroidclient/tree/1.4/app/src/full/java/kellinwood

Apktool cannot run on Android devices. Apktool无法在Android设备上运行。 There are incompatibilities with SnakeYAML and Java7 (NIO) features. SnakeYAML和Java7(NIO)功能不兼容。

I'm not aware of any other tool. 我不知道其他任何工具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM