2

I want to change my Bundle ID of an app, but I only have the APK and not the source code. How could I change from "com.mycompany.mygame" to "com.mycompany2.mygame" or "com.mycompany.mygame" to "com.mycompany.mygame2" ?

Nil
  • 129
  • 4
  • 11
  • 1
    Why would you want to do that? Giving that ability to users seems dangerous. – DeeV Jun 18 '16 at 00:26
  • I need to upload an apk into an existing app on google developer console, but it has a different bundle ID so I can't upload it. The apk was generated on a app generator web and I need to replace the current apk. – Nil Jun 18 '16 at 00:39

3 Answers3

2

You would have to create the app/game again. Otherwise decompile your app. Check this link(If you are on windows, instead of executing the .sh file execute the .bat file). It describes how you can view the source code of an apk file(Just as you created it, i.e no jumbled ID stuff and the complete package structure). But the limitation is that, if your game source code is obfuscated, then you're done. After you get the source code create another android project and copy the source code. However since you are changing the bundle ID, when you upload this app/game, it will be a seperate app in Google Playstore(i.e it won't replace your old version).

And i might add, in the future invest in some/any code versioning or revision tool. Trust me, the worst thing that could happen to a developer is losing the source code.

Akhil Soman
  • 2,077
  • 2
  • 17
  • 30
2

You can unpack your apk using apktool change the package id in the AndroidManifest.xml file and then pack it back again. This will resolve your problem.

1

You can't, without the codebase or access to the same tool that generated the app. That's the entire purpose of the ID: a unique identifier of a codebase for an app.

You'd have to release a "2.0" or whatever version of your app if you want to replace the codebase driving it.

Josh Kitchens
  • 1,080
  • 11
  • 18