Skip to content

Multiuser support: Filesystem operations malfunction when using the app in secondary users #2479

@violet-octagon

Description

@violet-octagon

⚠️ This issue respects the following points: ⚠️

  • This is a bug. Not a question or feature request.
  • The topic is not already reported at Issues. (I've searched it).
  • Markor is up to date. See Releases for the latest version. Updates are available from F-Droid and GitHub.
  • The bug is still present in the latest development version (git master). (Please download and try the test version of Markor, named Marder. Don't worry; Markor and Marder appear as completely separate applications. You can install both side-by-side, and Markor settings are not touched. In case the issue is resolved there, you don't need to create a bug report. The change will be part of the next Markor update.)

Description

Not to be patronizing, but I thought this issue could be easy to misunderstand, so I just wanted to state what I mean by the terminology I use (derived from here):

  • System user, meaning the user that must exist on single-user phones; the primary user. On my phone, its data is stored in /storage/emulated/0/.
  • Secondary user, meaning an additional user besides the owner. On my phone, the secondary user I use Markor in has its data stored in /storage/emulated/10/.
  • Symlinks, meaning those shortcuts to certain parts of the filesystem that can be seen if you tap on the "Go to" folder button at the right of the top navigation bar. Alternatively, you can find the symlinks by going up directories until you reach "storage".

When using Markor in a secondary user, navigation through folders malfunctions. Also, copy/move operations to symlinks malfunction. This may be related to #2350. Some specifics:

  1. In the filesystem browser, when tapping "..", Markor will usually go all the way up to "storage" and show the symlinks. I expected Markor to go to the parent directory. A workaround is using the system back button, which will cause Markor to correctly go to the parent directory (if the last action you took was going to a child directory).
  2. The "Download" symlink in "storage" and the "0" symlink in "storage/emulated" are crossed out and inaccessible. I didn't expect Markor to be able to access /storage/emulated/0/Download or /storage/emulated/0/ in the secondary profile. Instead, I expected Markor to have symlinks for /storage/emulated/10/Download and /storage/emulated/10.
  3. Strange things happen when data is copied to "AppData (storage-emulated-#-Android-data-net.gsantner.markor)" (which I'll call "the public directory" from now on). Specifically:
  • In Markor, all copied files and directories will appear in the public directory and can be accessed.
  • In the system files app, the public directory usually appears to have nothing. Occasionally, some files that were copied will appear, but will be broken. If a directory was copied, that directory and its contents will not appear.
  • Through MTP, the public directory will contain a "cache" directory and a "files" directory, as expected. Inside the "files" directory, some files that were copied will appear, but will be broken. If a directory was copied, the directory will appear, but it will appear to be empty.

When I say these files are broken and aren't accessible, I mean that trying to open them with another app doesn't work. My PC displays errors when attempting to read/copy/move/delete the files through MTP. This doesn't just happen with note files, this also happens with image files.

Markor is storing the data somewhere. According to Android, storage gets taken up when Markor copies these broken files. I expected files and directories copied to the public directory to show up and be accessible by the system files app and through MTP.


Where this issue doesn't manifest:

  • When using Markor in the system user. I'm not sure if Markor works correctly in other profiles (Private Space, Work, Restricted, Clone) or the Guest user.
  • In Marder, copy operations to symlinks work correctly. Files copied to the public directory (/storage/emulated/#/Android/data/net.gsantner.markor_test) can be read by the system files app and through MTP. The other problems are still present in Marder, though.
  • I don't remember this being an issue on the v2.12.# releases from July 2024. Though, I didn't test those when making this issue.

I want this bug resolved because most of my notes are stored in Markor's data partition in a secondary user. Resolving this issue would make it possible to copy files from the data partition to somewhere another computer can access the files via MTP, and it would restore intended behavior when browsing though the filesystem. Right now, in secondary users, it isn't possible to accees or make a backup copy of files in the data partition or the public directory, nor is it possible to enter /storage/emulated/#/ in Markor if you didn't already have save locations for the Notebook/To-Do/QuickNote set there.

Steps to reproduce

  1. In a secondary user, open Markor and enter a directory. Tap "..". You will be at "storage" and not the parent directory. To workaround this issue, open Markor and enter a directory. Then, you can use the system back button to go to the parent directory. However, if your last action was going to a symlink, then the system back button will take you there.
  2. In a secondary user, open Markor and go to storage by tapping "..". Try tapping on "Download", or tap on "emulated" then try tapping on "0".
  3. In a secondary user, open Markor. Try copying a file and a directory with a file inside of it to the public directory. Then, try accessing the copied data in the system files app and through MTP.

Information

Android version: 15 (AP3A.241105.007)
Device: Google Pixel 7 Pro
Custom ROM: GrapheneOS
App Version: 2.13.1

Source

GitHub Releases

Format / File type

Not specific

Additional info / Log

-

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions