I am trying to have Google Markup output its image somewhere other than its default location. I have used different ROMs and versions of those ROMs, and each combination I tried has Google Markup's output location change. Google Markup doesn't look like it has any settings to change its behavior, so I tried to adapt its output to my desired location. The default output on my current setup is at /storage/emulated/0/Android/media/com.google.android.markup/Markups/, but I would like to have it at /storage/emulated/0/Pictures/Screenshots/. I tried the following from Windows ADB:

RMX1921:/ $ su
RMX1921:/ # ln -s /storage/emulated/0/Android/media/com.google.android.markup/Markups /storage/emulated/0/Pictures/Screenshots/
ln: cannot create symbolic link from '/storage/emulated/0/Android/media/com.google.android.markup/Markup' to '/storage/emulated/0/Pictures/Screenshots//Markup': Operation not permitted
RMX1921:/ #

I'm using a Realme XT with DerpFest 10 build 2020-03-29 (Android 10r31) rooted with Magisk v20.4 if it matters. Is there any way I can automatically redirect Google Markup's output to a different location?

Additional things I would like to do:

  • Markup leaves the original file behind on this system (also one of the inconsistent behaviors of Markup on different ROMs). I would like to get the file name of the original file, and use it to rename the file Markup generates. The format is: Screenshot_YYYYMMDD-hh-mm-ss.png.

  • After moving the file, delete the original file, which is at /storage/emulated/0/Pictures/Screenshots/.

I'm thinking of a script that constantly runs in the background, doesn't have to be instant, maybe it triggers and checks and processes everything once every 5 seconds. But I feel like I might be overcomplicating a lot of things. Any ideas?

Thank you for your time.

  • 2
    /storage/emulated/0/Android/media/ is a standard location where apps can store data without having Storage permission: android.stackexchange.com/a/218507/218526. // Symlinks are not supported in emulated storage: android.stackexchange.com/a/218944/218526. // You can use some automation app to achieve what you want. Or with root access use bind mount, may be. Apr 2, 2020 at 15:49
  • 2
    If you are looking for newly created file Android supports the inotify events where you can wait for certain file-system events. Therefore a scripted solution does not have to poll for file-changes. Using inotify-tols for Android you simply have to wait for the matching file-system event.
    – Robert
    Apr 2, 2020 at 15:55
  • I am an idiot. I forgot about automation apps. I now have an excuse to learn how to use those. Thanks a lot! Probably saves me the headache of having to do it all manually xD Apr 2, 2020 at 16:27


You must log in to answer this question.

Browse other questions tagged .