简体   繁体   English

从Android编辑APK文件的资源

[英]Editing an APK file's resources from Android

I want to edit the resources of an APK file from WITHIN Android. 我想从WITHIN Android编辑APK文件的资源。 I know how to do it with ApkTool in windows/linux, but I'm having problems doing it in an Android app itself. 我知道如何在Windows / Linux中使用ApkTool进行操作,但是在Android应用程序本身中却遇到问题。

In particular, I need to add a few files to the resouces, edit the AndroidManifest.xml and put the files back in the APK. 特别是,我需要向资源添加一些文件,编辑AndroidManifest.xml并将文件放回APK中。 I know APKs are simply zip files, but the resources and manifest inside them are "compiled" in binary format so they cannot be edited directly, so I need some kind of library or tool for Android that can decompile the resources and then put them back in the APK. 我知道APK只是zip文件,但是其中的资源和清单是以二进制格式“编译”的,因此无法直接对其进行编辑,因此我需要适用于Android的某种库或工具来对这些资源进行反编译,然后将其放回原处。在APK中。

I know this can be done, since apps like APK Editor do it (and without needing root!) but I can't find any documentation on how to do it myself. 我知道这是可以做到的,因为像APK Editor这样的应用程序可以做到这一点(并且不需要root!),但是我自己找不到有关如何做到这一点的任何文档。

我用这个库来解析APK。

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

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