恩code /德code里面的APK的Andr​​oidManifest.xml里面、APK、code、xml

2023-09-05 06:14:18 作者:男妞。

我使用 ApkTool 脱code AndroidManifest。 XML 内的APK文件,它完美的作品,但我怎么能连接code一遍,同样的方式,它是连接codeD之前,应用一些更改后?例如(在我的情况)不断变化的应用程序标签。

I'm using ApkTool to decode AndroidManifest.xml inside an APK file and it works perfectly but how can I encode it again ,the same way it was encoded before, after applying some changes? For example (in my case) changing the app label.

推荐答案

您可以使用apktool再创建一个新的APK文件,包括您更改的Andr​​oidManifest.xml

You may use apktool again to create a new APK file including your changed AndroidManifest.xml.

首先,反编译APK文件:

First, decompile the APK file:

java -jar apktool.jar decode app.apk app

然后修改要在应用目录中的文件并重新编译它返回到一个新的APK:

Then modify the files you want in the app directory and recompile it back into a new APK:

java -jar apktool.jar build app app_new.apk

AAPT 必须在我们的 PATH - AAPT 选项来指定可执行文件的位置。否则重建APK时apktool会失败。

aapt must be on our PATH or use the --aapt option to specify the location of the executable. Otherwise apktool will fail when rebuilding the APK.

注意:的重建APK既不签署也不是的 zipaligned 的,只是重新包装。看看本网站关于签署和调整您的详细信息新的APK。

Note: The rebuilt APK is neither signed nor zipaligned, just repackaged. Take a look at this website for details about signing and aligning your new APK.