Re: An idea about how prevent apps from messing up the sdcard

103 views
Skip to first unread message

Kristopher Micinski

unread,
Mar 12, 2013, 1:27:03 PM3/12/13
to android-...@googlegroups.com
SD cards are slowly disappearing on devices altogether.

FYI, our group has implemented a fine grained policy for SD card access using binary rewriting, http://www.cs.umd.edu/~jfoster/papers/spsm12.pdf

Although that technique uses binary rewriting, a similar technique could be made at the system level for device specific mods.  It's a pretty simple idea: you just restrict apps not to those directories, and require a permission allowing them to do so.

But the problem with your proposal is: how do you take an app a user "has to have" and make it function without the SD card?  What's it's supposed to do, store its data on the web?  That's a pretty nontrivial transformation : )...

If you're just suggesting that app developers use /sdcard/Android instead, then the change isn't too bad, just some mods at the FS level.

(However, I doubt this "feature" would make it into Android.)

Kris


On Mon, Mar 11, 2013 at 7:25 PM, Techlive Zheng <techli...@gmail.com> wrote:
I really hate to see that my sdcard is full of directories created by some stupid applications, and I always wonder if there is a way to properly solve this situation.

I know many applications use sdcard as a way to accomplish persistant/cross-uninstallations data storage, but how this would be done should have a rule.

I suggest that the write access to the sdcard be disabled by default, if an application needs to write to a place in the sdcard other than /sdcard/Android or /sdcard/.android should mannually be granted by the user.

This means an application can access /sdcard/Android or /sdcard/.android freely by default, but if it wants access other location in the sdcard, a popup dialog box should be present to the user asking for permission.

I am not familar with the Andriod base structures, and I don't know if this feature is easy to implement, but it will force the application author to use /sdcard/Android and /sdcard/.android for data storage, because asking user for permission is not frendly experience and most time it is unnecessary.

What do you think?

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
To post to this group, send email to android-...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-platform?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Techlive Zheng

unread,
Mar 13, 2013, 7:00:53 PM3/13/13
to android-...@googlegroups.com


在 2013年3月13日星期三UTC+8上午1时27分03秒,Kristopher Micinski写道:
SD cards are slowly disappearing on devices altogether.

FYI, our group has implemented a fine grained policy for SD card access using binary rewriting, http://www.cs.umd.edu/~jfoster/papers/spsm12.pdf

Although that technique uses binary rewriting, a similar technique could be made at the system level for device specific mods.  It's a pretty simple idea: you just restrict apps not to those directories, and require a permission allowing them to do so.

But the problem with your proposal is: how do you take an app a user "has to have" and make it function without the SD card?  What's it's supposed to do, store its data on the web?  That's a pretty nontrivial transformation : )...

My proposal does not forbid an app use sdcard for storage, it just force the app to use /sdcard/Android, not other location.
 
If you're just suggesting that app developers use /sdcard/Android instead, then the change isn't too bad, just some mods at the FS level.
 
(However, I doubt this "feature" would make it into Android.)

It has to be made into the Android to push the application authors use the /sdcard/Android for storage, and stop messing up with sdcard.

Only those data that need to be awared by the users, e.g. photos, backups, should store on the sdcard in a location determined by the user. That means the user should be able to choose where the data to be stored.
 

Kristopher Micinski

unread,
Mar 13, 2013, 8:13:48 PM3/13/13
to android-...@googlegroups.com
Fine, but what you suggested basically uses the same technology: take
the filesystem calls and make sure the directory a certain app is
writing to properly appends the correct app specific directory.

Since this involves changing the filesystem in a sort of strange way,
I doubt this would be accepted as a patch to vanilla Android, but you
could make the changes yourself easily enough.

But the policy is not always clear: how do you differentiate when an
app *really needs* to be writing to /Android? It's subjective, and
you'd have to allow it on an app by app basis..

Kris
Reply all
Reply to author
Forward
0 new messages