Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

storage redirection #1079

Closed
M1cha opened this issue Jan 8, 2014 · 10 comments
Closed

storage redirection #1079

M1cha opened this issue Jan 8, 2014 · 10 comments

Comments

@M1cha
Copy link

M1cha commented Jan 8, 2014

It would be nice if storage access could be redirected into a sub folder so I can give apps storage access without allowing them to read any other files

@jpeg729
Copy link
Contributor

jpeg729 commented Jan 8, 2014

Android restricts access to storage by using a special group id for the
whole sdcard mount point, and also setting permissions on it to only allow
access to apps that belong to that linux group.

XPrivacy changes the effective group membership of an app when it loads.

As the sdcard is generally formatted using the FAT filesystem which doesn't
support linux file/directory ownership and permissions, it would be hard
(possibly nigh on impossible) to implement finer controls.

I know kitkat does separate user directories, but I guess that is done on a
too low a level.

On 8 January 2014 17:58, M1cha [email protected] wrote:

It would be nice if storage access could be redirected into a sub folder
so I can give apps storage access without allowing them to read any other
files


Reply to this email directly or view it on GitHubhttps://github.com//issues/1079
.

@M66B
Copy link
Owner

M66B commented Jan 8, 2014

@jpeg729 look into XIoBridge ;-)
Which doesn't mean it is feasible to do considering for example performance.

@vanowm
Copy link

vanowm commented Jan 15, 2014

Is there a way to change (spoof) path for SD card for each app? If so, perhaps mounting /storage/sdcard_blah/ that points to /storage/sdcard/myfolder/ would be doable?

@M66B
Copy link
Owner

M66B commented Jan 15, 2014

This is exactly what was initially asked for ...

@vanowm
Copy link

vanowm commented Jan 15, 2014

Ops...but the question wasn't actually answered, I think...
jpeg729 explained how XP currently denies access to SD card, but not if android allows changing what each app see. There are so many different possible locations of SD cards on different phones, and apps work fine regardless. This suggests that apps "ask" system for the location, in which case in theory it can be spoofed with sacrifice of lots of virtual folders in /mount/ ...

@M1cha
Copy link
Author

M1cha commented Jan 15, 2014

doing that for java shouldn't be any problem. if they obtain the storage path you can return another one. if they directly open the path(which is bad style btw) like "/sdcard" it could be changed with some work, too.

The big problem I see are native apps(like unity3d games). We would have to intercept libc calls somehow which could get complicated. And then there would still be problems with statically compiled libs.

I don't think that there's a 100% solution.

@M66B
Copy link
Owner

M66B commented Feb 18, 2014

I am going to close this issue, since the recent versions of XPrivacy will allow you to deny/allow on per file basis, also on demand. Later there will probably be a white list, see #1375

@M66B M66B closed this as completed Feb 18, 2014
@M1cha
Copy link
Author

M1cha commented Feb 18, 2014

ok that's nice btw does the permission denial implementation prevent apps from accessing features via native code or is this module completely useless in case I allow them loading their libs?

@M66B
Copy link
Owner

M66B commented Feb 18, 2014

That is what the IPC category is for ...

@M1cha
Copy link
Author

M1cha commented Feb 18, 2014

sry I didn't try all features of the new versions yet.
Nice work :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants