Hey guys I am messing around with apktools but I have a little problem:
I can decompile and recompile an apk but when I want to install it on my device I get an error that it couldn't be installed.
I replaced the resources.arcs of the old apk with the new one but I get the same error.
I then resigned the apk and can install it on my device, but before I can install it i have to uninstall the original app on my phone, since an app with the same package but different key exists on my phone.
Is there a way I can modify an apk and use the old key of it, so I can install the modified app without uninstalling the 'old' version of it?
You can sign an unsigned APK with a different key from the original, but you will not be able to upload it to the Play Store, nor will you be able to install it on a device that has the same app installed unless the package name (application ID) has been changed.
The Play Store doesn't allow two apps with the same application ID to be uploaded, that are signed with different keys. In addition, the Play Store doesn't allow uploading an app with the same application ID, signed with the original key, unless the version is higher than the one currently on the store.
Is there a way I can modify an apk and use the old key of it [to sign the app]
Not unless you have access to the original key.