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
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.
-
2Great... I don't think it'd be subject to legal issues as I am not going to distribute/sell it.. Thanks! Commented Mar 19, 2012 at 19:57
-
1It 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.– user13391Commented Mar 19, 2012 at 20:25
-
This isn't a good idea due to potentially hardcoded application IDs inside the application's codebase. See reddit.com/r/androidapps/s/ZR4vT15aKy. Commented Aug 29 at 11:56
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.
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
- Backup/Download a copy of the desired app (
app.APK
) - Transfer to PC
- On PC download JAVA and ApkRename
- Change package name by providing, path to APK file and new package name, to ApkRename
- Sign the APK using ApkSign
- 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.
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.
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.
-
1This 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. Commented Aug 19, 2013 at 22:16