0
votes

I want to know how to implement a apk editor which can edit app name and version.

A way I can figure out takes several steps:

  1. unzip apk file

  2. modify app name and version in AndroidManifest.xml

  3. replace the AndroidManifest.xml with the modified one

  4. compress them into a new apk file

  5. sign and align it

I can do all the steps above except Step 2. The AndroidManifest.xml file is compiled and cannot be parsed as normal xml file. I know apktool can compile and decompile it but I cannot find a easy way to run apktool on Android after several hours searching. I also cannot find any open-source apk editors(what I need is not only a apk editor, I want to develop another app based on it).

1
What is your original task? Why do you need such heavy customization? - Yurii Tsap
@Yurii Tsap, something like a open-source JavaScript IDE on Android. A new feature I'm designing is building an apk from js. - hyb1996
So couldn't you just build all the project with gradle, like Android Studio does? Can't it be a default workflow? - Yurii Tsap
@Yurii Tsap, I have no idea about running gradle or other building tools on Android. My JavaScript IDE is just an Android app so I should find a way of building apk on mobile phone. - hyb1996

1 Answers

1
votes

Finally I find some projects for reading and writing AXML(Android XML) and resources.arsc:

So I can wirte an apk builder with them. For more information, see my repo Auto.js-ApkBuilder.