Copy android.apk to another .apk file via java code and drag and drop its resource files?

Is it possible to create an .apk file by copying an existing .apk file and changing its resource folder? I have information in a file in the assets folder containing the ip server and the port to which the user should connect. Users from different regions and must connect through different servers. can anyone tell me how to implement this?

+4
source share
1 answer

I added a comment with my recommended solution to this problem. However, here is the answer to your question:

Of course, you can unzip the APK, swap assets, and then create a new APK. However, you will need to sign the APK again with the correct key.

If you create applications yourself, you can simply create several APKs, each of which contains a different asset file. However, you will have to distribute these APKs manually (i.e., they cannot be downloaded to Google Play) because each of them has the same package name, and you cannot have multiple applications in the application store with the same package name.

0
source

All Articles