45

Android Market has just updated an app in my device. I liked the update, but its fully different from last version which was also my favorite. So, I want to keep last version too. I have last version's apk thanks to Titanium Backup. But, I can't install it without replacing current one (Android architecture sucks). Is there any way to do this? Hacks etc..
Note: I want to keep current version which must be connected with Market to receive future updates.

5 Answers 5

30

It can be done, but not simple for the reasons eldarerathis mentioned. You need apktool. Refer to this guide on how to use it. And this on signing the apk after you're done.

You need to modify the AndroidManifest.xml file. Find the line that looks like this:

manifest package="com.example.app"

and change it to something like:

"com.example.app.foo"

After you're finished, recompile then resign. To restore your data, try the following via adb:

adb rm /data/data/com.example.app.foo
adb push /data/data/com.example.app /data/data/com.example.app.foo

Where com.example.app is the package name of the original and com.example.app.foo is the modified.

There's always a slight chance that the app will break, or depending on the way the app is structured you may receive a dialog every time you change the screen prompting you to choose which app you want to launch, but it's definitely worth a try if you want it badly enough.

Of course, the two apps will not share the same settings and data.

2
  • 2
    Great... I don't think it'd be subject to legal issues as I am not going to distribute/sell it.. Thanks!
    – iOS
    Commented Mar 19, 2012 at 19:57
  • 1
    It depends on your country. In Hungary it is legal to reverse engineer an app for learning/personal purposes but I don'T know about the rest of the world. But since you're not distributing anything you will not get in trouble.
    – user13391
    Commented Mar 19, 2012 at 20:25
16

You can't do this. Each Android application has a package name, which effectively defines the Java/Dalvik namespace that its classes occupy. You cannot have two packages of the same name installed because it would create overlapping namespaces, which is why it always replaces the old one when you install a new one. The only way you could feasibly do this is if you were able to get the source for the app and change all of the package definitions.

8

Do it with in 5 minutes

Method : Change package name so that android will recognize it as a different app.

No APKtool, no adb, no super user skills needed.

Tools required

  • PC with JAVA ( Windows, Linux, Mac ) ( JDK 8 prefered )
  • ApkRename

Steps

  1. Backup/Download a copy of the desired app (app.APK)
  2. Transfer to PC
  3. On PC download JAVA and ApkRename
  4. Change package name by providing, path to APK file and new package name, to ApkRename
  5. Sign the APK using ApkSign
  6. Transfer the new APK to phone and install it.

NOTE: In case any difficulty in signing the APK, use android APK editor app like Advanced permission manager and make any edit, press save & install. At this time they will sign the app.

2

You could try repackaging the application. I once installed some edited version of a game and the result was two games. If remember good, package names weren't the same.

0

Sometimes, there are some references in executable library (.so), and changing package name (also smali -> classes.dex) does not help either.

In simple cases look for ApkEditor.

1
  • 1
    This is a good start, but doesn't explain what changes you need to make in ApkEditor. If you want your answer to be helpful, you might want to edit it to add a bit more information.
    – Dan Hulme
    Commented Aug 19, 2013 at 22:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .