-1

What is the easiest way to add files to an apk file and to then install said apk file to a rooted android phone?

All SE answers I've seen so far either (a) don't work on new versions of android/android-studio or (b) respect the android signing process

What is the easiest way to (while throwing security considerations into the wind) to run a modified apk?

1 Answers1

1

APKs are, in the end, just glorified ZIP files, and any computer that can open a ZIP file can open an APK to add and remove files. Just rename it to .ZIP and work with it.

However, in order for Android to trust the APK and allow it to be installed, it needs to be signed. To sign it, you can follow the instructions in the answers to this SE post: How to Sign an Already Compiled Apk

You can change any APK you like, even one signed by a third party, but you cannot sign it with their key -- since you don't have it. That's the point of signing. So you'll have to sign it with your own.

alzee
  • 1,393
  • 1
  • 10
  • 21
  • I know APKs are glorified zip files. My point is that the "glorified" is where all of the details are. I had already seen that SE post, but some of the commands given there do not work. I know I cannot sign it with their key, I'm happy to generate a one-time temporary key and sign it with that. I would also be happy with disabling all signing on android. Hence the "quick and dirty" in the question. – Nathanael Schilling Feb 24 '20 at 10:15
  • First, the "glorified" is just a turn of phrase. The layout inside the zip file is 100% open documented on google's android dev site. All of the commands in the other answer work, so you'll need to explain exactly what you're having problems with -- in an edit to the OP, please. Finally, "disabling signing" is impossible. You would have to build an entirely new version of the OS yourself from that, from AOSP, and that is a thousand times more complicated than just editing an APK. – alzee Feb 24 '20 at 21:32
  • Running `apksigner sign --ks my.keystore my-app.apk --ks-key-alias alias_name` failed, I do not remember what the error message was exactly. – Nathanael Schilling Feb 25 '20 at 22:34
  • Well that doesn't help at all. Do it again, from the start, and come back with the message. – alzee Feb 26 '20 at 08:24