Timeline for Why does multi-user exist in Android if it doesn't work? [duplicate]
Current License: CC BY-SA 3.0
20 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 29, 2017 at 19:23 | comment | added | Izzy | Something like that, yes. A bit more technical, though. Please see my updated answer for more details. | |
Apr 29, 2017 at 19:08 | comment | added | Narcotixs | @Izzy so when a different user logs in, all other users emulated storage is unmounted? So if you are user3, all you would see is /storage/emulated/3 for example? | |
Apr 29, 2017 at 19:00 | history | closed | Izzy | Duplicate of Are files created in "/storage/emulated/0" supposed to appear in "/storage/sdcard0"? | |
Apr 29, 2017 at 19:00 | comment | added | Izzy | @Narcotixs let me close this one here as duplicate. I will update my answer with some additional details I found (the answer why you cannot access another users storage obviously is because it's not mounted – at least not in "your context", and you cannot access what is "not there" ;) | |
Apr 29, 2017 at 18:54 | comment | added | Narcotixs | Interesting...Well, I've exhausted you two, @Izzy and Death Mask Salesman, and I'm sorry for the confusion. Thanks for helping me understand symlinks and emulated storage. All hail the symlink hell! | |
Apr 29, 2017 at 18:42 | comment | added | Izzy | \o/ Yes, exactly so :) And no, the mechanism should take care for that. If you take a closer look, all those targets belong to "root". I don't know how exactly that works, but accessing another user's content should not be possible (except when being root). | |
Apr 29, 2017 at 18:39 | comment | added | Narcotixs | I wonder what would happen if a different user tries to access and save data in a different user's emulated storage (e.g., user3 attempts to access user1's emulated storage folder). Would user3 be able to gain either read or write access in the first place? @Izzy , any thoughts? | |
Apr 29, 2017 at 18:30 | comment | added | Narcotixs | @Izzy , I finally understand now, it all makes sense. Symlinks just redirect content and data to the current user's designated storage location.They don't actually hold any data at all, there merely reflect what is in that location. So if that's the case, then for example, let's say I'm "user3" and my designated storage is "/storage/emulated/3". All the symlinks would only point that location, because that is the current user that is logged in. Thus, multi-user actually works. | |
Apr 29, 2017 at 14:17 | comment | added | Grimoire | @Izzy Not just Latin, but modern Italian as well! | |
Apr 29, 2017 at 14:17 | comment | added | Izzy | @DeathMaskSalesman because I already did that on Narcotixs' original question? Of course I could add my "Latin joke" ("mounting with FUSE (Latin: ’con FUSE’) leads to conFUSion") #D | |
Apr 29, 2017 at 14:14 | comment | added | Grimoire | @Izzy That's the layer of psychotic hell the developers usually hide from the power users, heh. Why don't you write a huge answer with all of the above? | |
Apr 29, 2017 at 14:11 | comment | added | Izzy |
@DeathMaskSalesman You got it, yes! That's what I'm saying all the time :) Just with minor device/ROM-specific differences (as what in our case is /mnt/shell/emulated/X in the OP's case is /storage/emulated/X ). But results are the same, the corresponding ROMs just chose a different mount-point (to achieve better confusion – after all, isn't it a "mounted con FUSE"?)
|
|
Apr 29, 2017 at 14:10 | comment | added | Grimoire |
@Izzy Yes, from the output of mount , I can now see that /dev/fuse is mounted on /mnt/shell/emulated. Pretty hacky way to handle things, especially if you consider that the internal storage visible to a non-rooted user is just a subset of the /data partition (i.e. /data/media).
|
|
Apr 29, 2017 at 14:05 | comment | added | Grimoire | @Izzy So, what you're saying is that /storage/emulated/legacy points to /mnt/shell/emulated/X, with X being the currently logged in user, is it? | |
Apr 29, 2017 at 13:58 | comment | added | Izzy |
@DeathMaskSalesman Yes, same as in Narcotixs post. Now, where does /storage/emulated/legacy point to? #3 above. So what is accessed finally, and where are data written to and read from when accessing /sdcard ? The storage area of the logged-in user (in the example above that's the device owner, as the 0 in emulated/0 indicates, because the device owner is logged in – if you follow the chain of Narcotixs' questions, OP never tried with a "secondary user").
|
|
Apr 29, 2017 at 13:53 | comment | added | Grimoire | @Izzy On my 5.1.1, /storage/sdcard0 points to /storage/emulated/legacy. All hail the Symlink Hell! | |
S Apr 29, 2017 at 10:23 | history | suggested | xavier_fakerat | CC BY-SA 3.0 |
Formatting
|
Apr 29, 2017 at 10:23 | comment | added | Izzy |
See my comments on your similar question: When files are created in Android 4.2 and above, are files ever stored in one location? – and do read the Wikipedia article on symbolic links I told you instead of re-asking the same again. As I already wrote, you're looking at it from the wrong end, symbolic links work the other way around: it's not /storage/emulated/* pointing to /storage/sdcard0 , but just the opposite – so sdcard always points to the current user's storage.
|
|
Apr 29, 2017 at 9:27 | review | Suggested edits | |||
S Apr 29, 2017 at 10:23 | |||||
Apr 29, 2017 at 8:09 | history | asked | Narcotixs | CC BY-SA 3.0 |