Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Message from discussion More Applications on SDCARD
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Eric F  
View profile  
 More options Oct 22 2009, 2:43 pm
From: Eric F <ericfrie...@gmail.com>
Date: Thu, 22 Oct 2009 11:43:36 -0700 (PDT)
Local: Thurs, Oct 22 2009 2:43 pm
Subject: Re: More Applications on SDCARD
A bold move lbcoder!

I think first we should get a confirmation from Google that the list
of requirements is both complete and correct. Otherwise any designed
solution might be for nothing. Also confirmation that they are not
working on this already in their private repo would be nice (although,
we have to be realistic here, this is AOSP we are talking about).

I think there should be some discussion as to #5 on the requirements.
Apps installed on an SD card in an Android 2.5 device and then plugged
into an Android 2.1 device should not necessarily function correctly,
or display at all. What about an app that is tightly coupled with the
contacts of one phone that wouldn't make sense to run on a second
phone with the same app data, and would make more sense to start
separate app data per phone.

Also, I think added to the requirements should be determined if the
capability to support multiple cards should be:
1) Designed to be explicitly never supported
2) Designed to one day work with more improvements in a way that is
compatible with the design for supporting one card
3) Designed to be supported

A good design takes into account where Android and Android devices
might be in 2 years, not just what's in the stores today.

I agree that some kind of loopback filesystem on the fat32 card is in
order. I had a post a while back describing how I thought the UI and
the user should have to deal with creating this section of the memory
card, changing its size, deleting, installing apps etc. Remember
people can also eject the card and insert it into a card reader on
their computer, so I am not sure how well just reporting fat32 over
usb mass storage is sufficient to protect users from formatting their
cards by accident.

-E

On Oct 22, 10:47 am, lbcoder <lbco...@gmail.com> wrote:

> In looking through the various threads, I see that there are some
> questions on how to handle application storage on SDCARD safely and
> securely.

> I would like to propose a mechanism for handling this in a manner that
> is fair, safe, and secure,  however there are bound to be questions
> and or unforseen issues.

> First, in simplest form, the minimum requirements:

> 1) Application and all application data to be stored externally on
> sdcard.
> 2) SDCARD must be able to be removed and replaced at will, including
> possibility of being replaced with a different sdcard.
> 3) Contingency must be made for possibility of installing application
> both internally as well as on sdcard.
> 4) Protected applications installed to sdcard must remain secure.
> 5) Insertion of sdcard into another device should allow application to
> function in other device except in the case where the application is
> "protected".
> 6) SDCARD must be protected from MS-hostility, i.e. mounting sdcard to
> a computer (via usb to phone) must not prompt non-expert users that
> they should format it.

> Scheme:
> i) Need to segregate a group of user id's for use as sdcard-UIDs (i.e.
> 20000-29999).
> ii) Need app, app-private, data, and dalvik-cache directory on sdcard.
> iii) Need a packages.xml on sdcard.
> iv) Upon unmount need to (in order):
> a) kill all running sdcard processes.
> b) refresh package list (modify the package manager to update package
> status by rereading /data/system/packages.xml and sdcard's
> packages.xml).
> c) actually unmount the partition.
> v) Need to modify installer to prompt for where to install to (if
> sdcard is available).

> Problems:
> 1) When sdcard is yanked-without-unmount by non-expert user, running
> application may crash.
> 2) Multiple current installations of the same application -- how to
> select between?
> 3) Copying of protected applications is trivial.
> 4) How to control per-process permissions on a card from an unknown
> source?
> 5) How to safely allow sdcard to be mounted to a separate computer
> without non-expert user reformatting.
> 6) SDCARD applications added to the home screen.

> Solutions:
> 1) Android already kills off background processes to free up memory.
> This can be extended to kill off ALL background processes running on
> SDCARD. The problem here is in the event that a running/foreground app
> is forcibly removed. SDCARD removal (forcefully) should kill all
> processes that would safely be killed off for memory cleanup, and
> forcefully (kill -9) all processes that can't be safely killed. Should
> also show the user an error message that says something like "You
> removed the sdcard without unmounting, the following sdcard
> applications were running and had to be killed. All unsaved data has
> been lost." There is no need to get fancy and save the application
> states.
> 1b) In the event that the user chose to safely unmount the sdcard, IF
> there are running applications, show a message like "The following
> applications on the SDCARD are currently running: ... If you continue,
> these applications will be killed. Would you like to proceed?"
> 2) In the event of multiple of the same applications installed
> (internal and sdcard), choose to run the one on INTERNAL (do not add
> the external one to the application manager). I.e., when scanning the
> applications on the sdcard, if (application exists on internal memory)
> do not add to application manager. The assumption being that if you
> have it installed internally, then the REASON is that you want it to
> be available when you remove or change sdcard.
> 3) Two possible solutions to this;
> a) (I don't like this one) -- don't allow protected apps to be
> installed to sdcard at all. This would be perceived as hostile to
> software vendors wishing their apps to be copy protected.
> b) encrypt protected app's apk and dalvik cache using a key stored
> internally. If the card is inserted into another device, it will not
> have the necessary decryption key and therefore can either not show
> the application at all, or it can show the application as "not
> licensed for this device".
> (*) note: it is not necessary to secure non-protected apps, free or
> priced, since it is by the seller choice that there is no copy
> protection on the app.
> 4) THIS IS A BIG ONE... Insertion and removal of other sdcards,
> particularly given the possibility that the sdcard belongs to someone
> else and/or stands the possibility that it has been tampered with. I
> suggest that there be a group of secure databases on the sdcard, one
> for each device that the card has been inserted into, this database is
> encrypted by the devices encryption key (the same one as 3(b)). If you
> insert an sdcard which has not been used in your device before, it
> will create a new encrypted database and ask which applications to
> allow (showing, of course, their permission requests). The resulting
> database would hold the kind of data corresponding to /data/system/
> packages.xml. There would, of course, also be an option to delete the
> databases for "other" devices (which would prompt the same rebuild).
> There must be, of course, a "master" databases on the sdcard showing
> ALL installed apps, upon insertion, this must be compared to the per-
> device database resulting in the user being prompted for any new
> applications and for removing from the per-device database, any
> obsolete entries.
> 5) Since due to other-device compatibility, it must remain fat32,
> there are two options I can think of;
> a) loopback filesystem within the primary fat32 filesystem. This would
> fly under the radar of MS's hostility routines. Secondary benefit is
> that it would easily allow advanced users to 'mount -o loop' the
> application filesystem.
> b) modify the mass storage controller code to only show the fat32
> filesystem. Makes it a little more akward for advanced users.
> (*) there is another FEATURE that could be added, not exactly
> relevant, but related... Change the mass storage driver to present a
> *virtual* filesystem, i.e., be able to leave the sdcard MOUNTED, but
> still grant access to it (i.e. how NFS is able to share a filesystem
> to (multiple) other machines without making it unavailable to the
> host.
> 6) Two options;
> a) tag it as unavailable. If a different sdcard is inserted containing
> the same app, it would also activate that one. If the same app is
> later added to internal, it would activate that, i.e., the intent
> would be the same since it isn't related to the UID.
> b) don't allow sdcard apps to be added to the home screen. This is
> just slightly easier, but not by much. It is also less "cool".

> I would like to hear about any holes in this scheme that anyone can
> think of.
> And please, if you wish to contribute, be precise about any problems
> that you see with this, and if possible, a solution *within the
> bounds* of the infrastructure I have presented. I would rather not
> have this degenerate into a "yeah, its nice, but wouldn't it be cool
> if we did this instead". I would like comments that are constructive
> with respect to making these suggestions happen with absolutely as
> little modification as is required.

> If we are able to come up with a concrete logical scheme, then at that
> point I would like to begin working on this from an implementation
> perspective, i.e., how to *actually* make it happen.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.