[android-developers] Re: Multiple APKs installed to the same location

2012-02-02 Thread BT
 I'd still be skeptical from a security perspective
Multiple jurisdictal authorities have approved our file authentication
technology.

 What kind of code do you need?
It's game display logic -- take commands from the game server 
display appropriately.  There are hundreds of games and they will not
all fit on a cell phone.  Players must be able to selectively download
them.  An individual game consists of code (Game.so) and assets, all
contained within a .zip file.

 It's not something you could encode into some bytecode like instruction 
language or dsl?
It doesn't matter that it's C++ code because it's running in a walled-
off sandbox anyway.  The worst-case scenario is someone else's app
tries to load  run our game code, but that will fail because they
cannot authenticate with our servers.

That doesn't mean Google will let me do it, just that it's not the
problem many think it is.

-BT

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Multiple APKs installed to the same location

2012-02-02 Thread Kristopher Micinski
On Thu, Feb 2, 2012 at 2:52 PM, BT bunglestwan...@gmail.com wrote:
 I'd still be skeptical from a security perspective
 Multiple jurisdictal authorities have approved our file authentication
 technology.


Wow!  Very impressive!  There are certainly no problems, you shouldn't
have even bothered asking!

kris

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Multiple APKs installed to the same location

2012-02-02 Thread Harri Smått
On Feb 2, 2012, at 9:52 PM, BT wrote:
 There are hundreds of games and they will not
 all fit on a cell phone.  Players must be able to selectively download
 them.  An individual game consists of code (Game.so) and assets, all
 contained within a .zip file.

So your goal is to create a separate market within one .apk file? AFAIK this 
might be doable using your main application's internal storage for example. 
But assuming this is doable, I'd guess it's easiest done without introducing 
multiple .apks but creating your own logics for dynamic game addition.

--
H

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Multiple APKs installed to the same location

2012-02-02 Thread Jan Burse

BT schrieb:

Can I create multiple .apk's that install ADDITIVELY to the same /data/
apps/MyApp location?

In my particular case I have add-on modules that are built as C++ NDK
share objects:  Feature1.so, Feature2.so, Feature3.so, etc.  I don't
know what these will be ahead of time and the user must be able to
selectively install only those features they want.

I'm pretty sure iOS does this with in-app purchases, but not sure how
to do it on Android?

Thanks,
BT



Theoretically:

android:sharedUserId
The name of a Linux user ID that will be shared with other 
applications. By default, Android assigns each application its own 
unique user ID. However, if this attribute is set to the same value for 
two or more applications, they will all share the same ID — provided 
that they are also signed by the same certificate. Application with the 
same user ID can access each other's data and, if desired, run in the 
same process.


http://developer.android.com/guide/topics/manifest/manifest-element.html#uid

android:process
The name of a process where all components of the application 
should run. Each component can override this default by setting its own 
process attribute.


By default, Android creates a process for an application when the 
first of its components needs to run. All components then run in that 
process. The name of the default process matches the package name set by 
the manifest element.


By setting this attribute to a process name that's shared with 
another application, you can arrange for components of both applications 
to run in the same process — but only if the two applications also share 
a user ID and be signed with the same certificate.


If the name assigned to this attribute begins with a colon (':'), a 
new process, private to the application, is created when it's needed. If 
the process name begins with a lowercase character, a global process of 
that name is created. A global process can be shared with other 
applications, reducing resource usage.


http://developer.android.com/guide/topics/manifest/application-element.html#proc

I didn't try (yet) ...

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Multiple APKs installed to the same location

2012-02-01 Thread John Coryat
Different APK's will have different package names and be installed in 
different directories, so in short, the answer is no.

-John Coryat

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Multiple APKs installed to the same location

2012-02-01 Thread BT
Thanks, John.

That's unfortunate.

How about downloading FeatureX.so to the Downloads directory,
calling dlopen(featurex.so), then calling the additional library
functions?

Thx,
BT

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Multiple APKs installed to the same location

2012-02-01 Thread John Coryat
You're pretty much stuck sending a complete APK and dealing with additional 
features using switches inside the app itself.

There may be other ways to handle this but I am unaware of them.

-John Coryat

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Multiple APKs installed to the same location

2012-02-01 Thread Mark Murphy
On Wed, Feb 1, 2012 at 6:16 PM, BT bunglestwan...@gmail.com wrote:
 How about downloading FeatureX.so to the Downloads directory,
 calling dlopen(featurex.so), then calling the additional library
 functions?

That would be a question for the android-ndk Google Group.

AFAIK, though, this is not supported. Not to mention that it is highly
insecure, because then anyone can replace your .so with one laden with
malware, and your app will happily execute it, with the malware
inheriting all your permissions.

You can certainly have independent APKs, with their own independent
NDK libraries, that communicate through normal Android IPC mechanisms:
services (commands or binding), broadcasts, etc.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android 4.0 Programming Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Multiple APKs installed to the same location

2012-02-01 Thread BT
Good point about security, but this isn't a general consumer
application.  The additional libraries can only be downloaded from our
internal servers and only over our internal wi-fi, plus they're hashed
 verified with our internal security server prior to execution.

We have to run on iOS too, which I believe is even more restrictive,
so we'll probably need to consider more alternatives.  But the ideal
solution would've been some way for us to incrementally add shared
libraries to our app's install directory.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Multiple APKs installed to the same location

2012-02-01 Thread Kristopher Micinski
On Wed, Feb 1, 2012 at 7:35 PM, BT bunglestwan...@gmail.com wrote:
 Good point about security, but this isn't a general consumer
 application.  The additional libraries can only be downloaded from our
 internal servers and only over our internal wi-fi, plus they're hashed
  verified with our internal security server prior to execution.

 We have to run on iOS too, which I believe is even more restrictive,
 so we'll probably need to consider more alternatives.  But the ideal
 solution would've been some way for us to incrementally add shared
 libraries to our app's install directory.


I'd still be skeptical from a security perspective, executing code you
can't really be sure about is always a little shady (yes, I know you
said you checked it).  What kind of code do you need?  It's not
something you could encode into some bytecode like instruction
language or dsl?

kris

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en