Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
wzyboy
Old
(Last edited by wzyboy; 12th January 2011 at 01:12 PM.) Reason: spelling mistakes.
#1  
wzyboy's Avatar
Junior Member - OP
Thanks Meter 0
Posts: 10
Join Date: Jul 2010
Location: Wuxi
Smile [Q] Two versions of one app installed at the same time?

It seems that this is the first time I start a new thread.

Hi, all. I want to know how to install two versions of one same application at the same time.

As a matter of fact, I want to install Opera Mini 4.2 China Version and Opera Mini 4.2 Internaional Version at the time. But...Since Opera Mini 5 makes it difficult to describe the question, here takes HelloWorld.apk as an example.

Well, there are two versions of the application "HelloWorld": 1.0 and 1.1. (This is just an example)

I have installed HelloWorld 1.0 on my phone, and when I try to install HelloWorld 1.1, the 1.0 version will be replaced. But...I want to have both of them installed on my phone. That is to say, there will be two "HelloWorld" icons in the app drawer.

I use APKTool to extract the com.hello.world.apk into some "text" files, including an AndroidManifest.xml and a lot of *.smali files. In the AndroidManifest.xml, I saw this:

<manifest package="com.hello.world" versionCode="100" versionName="1.0">

I chaged the value "com.hello.world" to "com.goodbye.world". Then I re-build the apk file and transferred it to my phone.

I installed the modified package, it was successfully installed and I see two "HelloWorld" icons in my app drawer!

I try to launch the HelloWorld 1.0, it succeeds.
I try to launch the HelloWorld 1.1, it FCs immediately.

Well, this is my situation. How can I make both of them launch-able in my phone? Is it possible? What should I modify apart from "package" filed in AndroidManifest.xml?

Thanks a lot.


~~~~
wzyboy
 
Rayvenhawk
Old
#2  
Senior Member
Thanks Meter 6
Posts: 101
Join Date: Oct 2010
Quote:
Originally Posted by wzyboy View Post
It seems that this is the first time I start a new thread.

Hi, all. I want to know how to install two versions of one same application at the same time.

As a matter of fact, I want to install Opera Mini 4.2 China Version and Opera Mini 4.2 Internaional Version at the time. But...Since Opera Mini 5 makes it difficult to describe the question, here takes HelloWorld.apk as an example.

Well, there are two versions of the application "HelloWorld": 1.0 and 1.1. (This is just an example)

I have installed HelloWorld 1.0 on my phone, and when I try to install HelloWorld 1.1, the 1.0 version will be replaced. But...I want to have both of them installed on my phone. That is to say, there will be two "HelloWorld" icons in the app drawer.

I use APKTool to extract the com.hello.world.apk into some "text" files, including an AndroidManifest.xml and a lot of *.smali files. In the AndroidManifest.xml, I saw this:

<manifest package="com.hello.world" versionCode="100" versionName="1.0">

I chaged the value "com.hello.world" to "com.goodbye.world". Then I re-build the apk file and transferred it to my phone.

I installed the modified package, it was successfully installed and I see two "HelloWorld" icons in my app drawer!

I try to launch the HelloWorld 1.0, it succeeds.
I try to launch the HelloWorld 1.1, it FCs immediately.

Well, this is my situation. How can I make both of them launch-able in my phone? Is it possible? What should I modify apart from "package" filed in AndroidManifest.xml?

Thanks a lot.


~~~~
wzyboy

Well I'm not an android programmer but if I'm understanding you correctly you did the following (in the order I'm listing them):

1) Installed helloworld 1.1 (which over-wrote v1.0)
2) Opened the APK for helloworld 1.0 and made the manifest change
3) Installed the modded helloworld 1.0 on your phone

From a programmer point of view (just not with Android), if you followed the above scenario what is happening is HW1.1 installs it's files which are updated versions of the previous one (why else install an update). When you modded the HW1.0 you only changed the name and nothing else.

What is happening is when you go to install the modded version it's overwriting the newer files with the older ones since the phone is assuming the modded app is an entirely new program and allows the process to occur. This is why the modded one works and the 1.1 won't since the files it needs are the wrong version.


The only option of really have is to mod the actual program to look for different filenames, but without the source code to that app, that isn't going to happen.

Basically you need to have version 1.1 use the default files, and with the modded 1.0 you need to tell the software to "look" for the updated filenames (just don't forget to rename the actual files too).


Short of all that, as far as I know your SOL.
 
wzyboy
Old
#3  
wzyboy's Avatar
Junior Member - OP
Thanks Meter 0
Posts: 10
Join Date: Jul 2010
Location: Wuxi
Quote:
Originally Posted by Rayvenhawk View Post
Well I'm not an android programmer but if I'm understanding you correctly you did the following (in the order I'm listing them):

1) Installed helloworld 1.1 (which over-wrote v1.0)
2) Opened the APK for helloworld 1.0 and made the manifest change
3) Installed the modded helloworld 1.0 on your phone

From a programmer point of view (just not with Android), if you followed the above scenario what is happening is HW1.1 installs it's files which are updated versions of the previous one (why else install an update). When you modded the HW1.0 you only changed the name and nothing else.

What is happening is when you go to install the modded version it's overwriting the newer files with the older ones since the phone is assuming the modded app is an entirely new program and allows the process to occur. This is why the modded one works and the 1.1 won't since the files it needs are the wrong version.


The only option of really have is to mod the actual program to look for different filenames, but without the source code to that app, that isn't going to happen.

Basically you need to have version 1.1 use the default files, and with the modded 1.0 you need to tell the software to "look" for the updated filenames (just don't forget to rename the actual files too).


Short of all that, as far as I know your SOL.
Great thanks to your reply. But...

Android uses .apk files to install and run the application. When installing an apk file, the package installer just copys the apk file to /data/app directory and "register" the program in the system. The apk itself will not be "extracted" or anything else. That is to say, an apk file can be installed, and also can be run.

On the other hand, the apk will generate some files in /data/data directory when running. I am considering that it was these file that made the modded version FCs. I will try to look into these files to see will this works...

English is my second language, hoping that I did not made many grammar misktaks... :P
 
cowboyaryk
Old
#4  
Member
Thanks Meter 7
Posts: 60
Join Date: Feb 2011
+1 on this topic. It's been a year and a half since the last reply and I've done a bit of searching online to find no answers. I anyone have some feedback on this? I'd ultimately like to use this to install two Google voice applications. I actually have an app from a blacked out version with a different icon. But if I install it it will overwrite the original Google voice app
 
bartoloandre98
Old
#5  
bartoloandre98's Avatar
Senior Member
Thanks Meter 653
Posts: 1,238
Join Date: Oct 2010
Quote:
Originally Posted by cowboyaryk View Post
+1 on this topic. It's been a year and a half since the last reply and I've done a bit of searching online to find no answers. I anyone have some feedback on this? I'd ultimately like to use this to install two Google voice applications. I actually have an app from a blacked out version with a different icon. But if I install it it will overwrite the original Google voice app
You are one hell of an archaeologist

Sent from My Samsung Galaxy S2 running Paranoidandroid Rom.What else if not?=P
Person x: Please help me it no works!Please fix nao!!!
Bartoloandre98:sudo apt-get install common-sense
Person X: It is giving me a command error .
Bartoloandre98:*face palm* Dafuq????
Person X: *User logged off*


Jesus walks on water,Chuck Norris swims through land and i eat noobs for breakfast.
The Following User Says Thank You to bartoloandre98 For This Useful Post: [ Click to Expand ]
 
bbsrailfan
Old
#6  
Senior Member
Thanks Meter 86
Posts: 252
Join Date: Jul 2010
Location: Bangalore
I'd also like to know if that's possible. Even if it were possible, and an updated version of helloworld is relaeased (Say, HelloWorld v1.2), which version would it replace? Would it replace the (original) HelloWorld 1.1 or the (modded)HelloWorld 1.0?
 
lambstone
Old
#7  
lambstone's Avatar
Senior Member
Thanks Meter 135
Posts: 1,019
Join Date: Mar 2008
Yes. Titanium backup. Profiles. These are the keywords.
Most people aren't idiots, but it only takes one to ruin it for the rest of us.

ლ(ಠ益ಠლ)
Y U NO BE SMARTER

--------------------------------------------------------------------------------------------
Phones: Xplore M68 > O2 Atom Life > HTC Touch HD > iPhone 3G > HTC Touch Dual > HTC Hero > Omnia 7 > Milestone 2 > Nexus S > SGS2
Tablets: Galaxy Tab > Galaxy Tab 7.7 & iPad 2
 
cowboyaryk
Old
#8  
Member
Thanks Meter 7
Posts: 60
Join Date: Feb 2011
Quote:
Originally Posted by lambstone View Post
Yes. Titanium backup. Profiles. These are the keywords.
any idea how i would use TB and "profiles" to do it? sounds like you know from experience
 
lufc
Old
#9  
lufc's Avatar
Senior Moderator / Resident Priest
Thanks Meter 1471
Posts: 9,442
Join Date: Oct 2007
Location: Blackpool UK

 
DONATE TO ME
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A
Pay attention and participate,Encourage,
not discourage, Listen to advice and accept instruction,
and in the end you will be wise.......... Prov. 19:20
 
cowboyaryk
Old
#10  
Member
Thanks Meter 7
Posts: 60
Join Date: Feb 2011
Quote:
Originally Posted by lufc View Post
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A
thanks cheif i'm not the one who posted this almost two years ago

 
Post Reply+
Tags
apk, install, package
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Careers in Android: What Hiring Managers Won’t Tell You – XDA Developer TV

XDA Developer TV Producer Jayce released a video a … more

Coloring Your Logcat World

Getting feedback for your app during development is as simple as adding logging info where necessary and looking … more

Guide Your Sheep to Safety with Finger Shepherd

Just a coupe of days ago, we brought you news about a game calledAgent Sheep. In that … more

Nandroid Manager Receives Major Update

Do you find yourself obsessively jumping from ROM to ROM? And do you hate having to restore a full … more