0

I've been trying to change the package name for an android apk, but I've ran into some trouble.

I changed the package name as per this answer, signed, and zipaligned it. However, whenever I try to adb install modified.apk, it gives me the following error:

Failure [INSTALL_FAILED_DUPLICATE_PERMISSION]

How can I fix this? I have already tried changing all of the references to the old package name in the AndroidManifest.xml, but that caused some of the references to xml files in /res/ to break.

Any help would be appreciated.

Edit 12/15:

Still haven't figured this out and I can't find any documentation on this issue in the context of what I'm trying to do. Still looking for a solution.

Community
  • 1
  • 1
willi
  • 13
  • 5
  • 1
    Uninstall previous Apk then install – Binesh Kumar Dec 13 '16 at 05:16
  • @BineshKumar this is what I am trying to avoid. I am attempting to change the package name to allow both versions of the application to be installed. – willi Dec 13 '16 at 05:23
  • Can you post your manifest file. I think your using GCM permissions. That's why its failed. Once you post your code i will post the answer. – Shankar Dec 13 '16 at 05:28
  • http://pastebin.com/yeGAqRP2 This is the unmodified manifest. To my understanding editing the apktool.yml and changing the `renameManifestPackage` value will change these for me. If this is not correct I'd love some pointers in the right direction. – willi Dec 13 '16 at 05:33
  • @willi just change the permission in the manifest file for the apk in which you modified the package name. – Hades Dec 18 '16 at 01:38
  • @Hades this worked, thanks. I also had to change the authorities in the manifest to the new package name. – willi Dec 18 '16 at 05:37

0 Answers0