reading about android 10 implementing some privacy features from ios. the most interesting is scoped storage. in the end, apple was right, few need a real filesystem on phones!

@Wolf480pl ...i'd argue that if those few are tech-savvy enough people and another filesystem can be implemented as an app, there's little need for exposing the real one unless one has root access. and if they have root access, for them that storage can hardly be called scoped anymore.

@leip4Ier hm... I don't know how it works on iOS, but if it's still possible to have a common filesystem shared between apps, accessible from a PC, and preferably also accessible when you remove the microSD card and plug it into a PC, then I'm fine with it.

@Wolf480pl each app has its own filesystem (if it chooses to), they all are accessible from pc. you can open a file from one app's filesystem in another app, but only if you choose it explicitly, like when you choose a file to upload to a website. there's no microsd support.

i still see little use for a shared between apps filesystem (except for malicious uses). how do you use it?

@leip4Ier let's say I download a pdf with Firefox. Then I want to read it with MuPDF. Then I want to send it to a friend with K-9 Mail. Then I want to serve it over sftp (another app) so that I can download it to my laptop without messing with USB and MTP.

Another example: I have a text file with notes. I started writing it using one text editor, but one day maybe I'll find a better text editor app and will want to switch to it, or maybe I'll switch to vim in Termux.

@leip4Ier not to mention that sometimes I need to look through the fileststem to see which files or directories take the most space and delete them. There's an app for that.

@Wolf480pl @leip4Ier the fact that software can't write to anywhere other than their own directories has already been very inconvenient for me for file synchronisation software

I'm only using android 7, too, so I imagine it only gets worse from here
Follow

@izaya @Wolf480pl oh, i didn't think about this use case, thanks for sharing. yeah, in ios you can either store files in a cloud (will act like a local filesystem, i. e. openable in apps, from the same file selection dialog) with some caching, or locally.

@izaya @Wolf480pl the app i use for storing non-app-specific files can do sync, and it acts as a storage provider. some apps have an option to have an app-specific folder with a storage provider other than the default fs. for example, the apple's office suite can save your files there by default. but e. g. my graphics editing app doesn't allow it.

@leip4Ier @izaya
so it requires extra effort from the app's developer to support 3rd party storage providers?

@Wolf480pl @izaya i don't know the details, i think it either requires a single system api call or depends on a parameter during storage initialization.

@leip4Ier @izaya so it's a policy decision whether an app allows 3rd party storage providers or not?

@Wolf480pl @izaya it's a matter of whether they add the configuration option or not, i guess. i don't know why would they not do it, maybe they think it isn't necessary. i don't see any ideological reasons possible?

@leip4Ier @izaya
system designer> *gives app developers power to disable OS feature $X from affecting their app*
developer> who will need $X anyway
developer> *disables $X in their app*

what could possibly go wrong.

IMO, app developers should never have such control.

@Wolf480pl i know it isn't a good point (more like me venting), but at least apple's app store policies require apps to work even if the user didn't give them access to something. i remember trying the google's (now dead) messenger that upon startup asked me to let it see my contacts (or smth else, i don't remember), and would just say "this app won't run without access [to arbitrary info it doesn't really need]" if i didn't.

so here google was trying to disable a security feature it built

@Wolf480pl but yeah, i agree, this feature could be implemented in system setting instead of an app's settings, and the app wouldn't even know where its files reside, bc it doesn't need to.

@izaya @Wolf480pl i'm not sure i explained it in an understandable way...

but in short, all apps that choose to have a private folder, can store it with a storage provider. it can be the default local fs (i. e. only the app has access) or fs of another app that implements the storage provider api (and in this case, two apps have access to the folder, storage provider and the owner app). that api was created for clouds, but may as well be used by apps storing everything locally.

@Wolf480pl @izaya sorry, i don't understand what you're talking about.. you're asking whether it can be opened in a way local files are opened or something else?

@leip4Ier @izaya
I'm asking whether I can take source code of a more-or-less POSIX-compatible program, like aria2 or vim, build it for the mobile OS, and have it access the files sitting on a provider without any modifications to the source code, as if the files were on your usual POSIX filesystem.

@Wolf480pl @izaya i don't think so, ios doesn't aim to be posix-compatible afaik? i don't write ios apps (i would if apple made it less expensive...) anyway, so there's no point in asking me.

but from what i know, the app opens its own files in the same way, regardless of its folder location. while opening files from other apps' folders does at least require calling the file selection dialog or implementing a share dialog extension.

@VyrCossont could you please comment on this? (i'm not sure my knowledge of this reflects the reality at all...)

@Wolf480pl @izaya

@leip4Ier @izaya
yeah but if we want the same thing on Android, which is kinda POSIX-compatible (or at least you can compile most of Linux tools on it, see Termux), we need to consider how we'll deal with those apps which don't use Java APIs to open files.

@Wolf480pl @izaya i'm not sure how it's done there, do `open` calls get translated to some android api calls or are they executed directly? if it's the latter, then yeah, it'll be hard to implement cloud providers..

@leip4Ier @izaya
the latter.
So you'd need to use FUSE or 9P or add another filesystem driver to the kernel.

@Wolf480pl @izaya seems so. i didn't think about it, but yeah, that ios api acts just like fuse, it could be used for this.

@leip4Ier @Wolf480pl I wanted to synchronise my local music folder on my phone with syncthing.

I could either
- not
- run syncthing as root and set it up once a day
- convince all my other software to look at the syncthing data folders

https://shadowkat.net/blog/22.html

I just have a script to sync the folder using adb when I plug my phone in now.

@izaya I wanted to boost this post, or actually the link to the blog post, but wanted to keep leip4ler out of it. Do you have some fedi post linking to that blogpost that I can boost, or should I just post the link myself?

Sign in to participate in the conversation
Infosec Exchange

A Mastodon instance for info/cyber security-minded people.