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

@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

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?

@Wolf480pl I wrote it pre fedi so not from me.

Feel free to post it yourself.

@Wolf480pl the disk usage thing is indeed impossible on ios, everything else is, with no hassle. you either copy the file to the needed app's fs or choose it from the app inside of which you need to use it. e. g. mail apps usually don't have their own filesystem.

@Wolf480pl and there're apps for general storage, they usually can play music (and you don't need itunes for that, etc) or edit text documents, everything else is done by opening the file in another app (like from the share dialog you can send it via email). the point is, a 3rd-party app cannot access a file without you knowing it.

@leip4Ier well if I need to copy a file into sshd app before I can access it over sftp, and then I need to copy any file I upload via sftp into eg. music app before that app can use them, then it's a nuissance, not to mention I'll end up having multiple versions of the same file.

@leip4Ier not to mention that now even more things can be only done with GUI and not with CLI.

@Wolf480pl one of things i hated the most on android was that if i wanted to use an app requiring storage access, i'd have to allow it to see my photos, which is something i'd prefer to not do. (one could argue that people shouldn't take photos of themselves using a smartphone, but it'd be a very marginal viewpoint, imo.)

with phones, it's hard to verify all the code your apps are running. and even if they aren't doing anything bad, they can contain security vulnerabilities.

@leip4Ier I never understood why people take photos of themselves or of other people, but considering that they do, I guess photos shouldn't be stored in the shared filesystem.

@Wolf480pl you don't? o:

it's interesting, i'd like to hear more about it, but i guess it's something personal and i don't know how to word a question anyway..

(yeah, i think, whether the fs is open or not, anyway there should be a gallery api for storing photos outside of the main filesystem)

I only take photos if:
a) I see something very cool / unusual / interesting that I want to brag that I saw
b) there is some number or other information that I will need later but am too lazy to remember or write down, so I take a photo of the text.

@leip4Ier that being said, I sometimes go through my old IRC logs the same way some people go through their holiday photos.

@Wolf480pl oh, i see. it's kinda weird to me.. there indeed is an advantage of not having to worry about your photos getting stolen if you don't keep them, though..

@leip4Ier the weirdest thing is that it's not like I decided to not take photos of myself because security or sth. It's just that I never feel like taking photos of myself.

Sign in to participate in the conversation

Welcome to your niu world ! We are a cute and loving international community O(≧▽≦)O !