Page 1 of 2
Access to system files
Posted: 14 Mar 2016 08:51
by Klusek
I want to use "File Observer" trigger and "Google Drive Upload Files" Actions but they do not have access to files in system/data (I don't see any folder there), Even if you enter the path manually.
Is this normal or perhaps I do something wrong?
I have root, Secure Settings and any other needed stuff

Re: Access to system files
Posted: 14 Mar 2016 19:05
by Martin
Hi,
Some paths like /data are not accessible by regular apps like Automagic. Automagic does not support to access such files directly but you could copy the files to another location with an action Execute Root Command where regular apps have permission to read the files. Listening to file system events in such paths is also not supported.
Regards,
Martin
Re: Access to system files
Posted: 14 Mar 2016 21:12
by Klusek
Thank you very much. Your suggestion helped me a lot , so that I was able to solve my problem.
Re: Access to system files
Posted: 24 Mar 2016 13:01
by natong
I just updated my phone to Android 6.0. My File Observer can't monitor /sdcard/Pictures. Is there any limit on Android 6.0?
Re: Access to system files
Posted: 24 Mar 2016 21:02
by Martin
Hi,
What device model are you using? Is /sdcard/ a real physical sd card? I think that Android does not support the file observer events on external sd cards.
Regards,
Martin
Re: Access to system files
Posted: 25 Mar 2016 12:43
by natong
Martin wrote:
What device model are you using? Is /sdcard/ a real physical sd card? I think that Android does not support the file observer events on external sd cards.
I using Lenovo K3 Note, official ROM, non root.
Internal storage = /sdcard = /mnt/sdcard = /mnt/m_internal_storage
External storage = /storage/428A-F2FD = /mnt/m_external_sd
Monitor on /sdcard/abcd is working well.
but can't monitor on /sdcard/Pictures/Screenshots
Maybe some stock app lock down these folder.
Re: Access to system files
Posted: 26 Mar 2016 19:01
by Martin
That's interesting. I can reproduce this issue with the built-in screenshot feature on a Nexus device. Maybe it's some kind of security feature to avoid that apps listen for screenshots.
You could try to detect the notification with trigger Notification on Statusbar displayed if the screenshot app on your device also shows such a notification (package: com.android.systemui, Text contains text Screenshot).
Re: Access to system files
Posted: 17 Apr 2017 11:32
by natong
Just update news about File Observer. I saw these statement on Dropsync app.
Instant upload sometimes does not work on Android 6.0/7.0
There is a bug in Android 6.0/7.0 which breaks file change monitoring (technically speaking FileObserver class). Instant upload relies on this system function to work. It’s not that file change monitoring stops working completely. Sometimes it works, sometimes it does not. Changes on SD card definitely cannot be detected. We implemented a limited workaround which works quite well for photos but not for other file types.
This is a system level bug apps cannot do anything about. It must be fixed by Android team.
Re: Access to system files
Posted: 09 Jan 2018 19:54
by srichter
Martin wrote:Hi,
Some paths like /data are not accessible by regular apps like Automagic. Automagic does not support to access such files directly but you could copy the files to another location with an action Execute Root Command where regular apps have permission to read the files. Listening to file system events in such paths is also not supported.
Regards,
Martin
Are there any plans to add this functionality for rooted users? I would love to be able to monitor the file /sys/class/switch/tri-state-key as it will allow me to create flows to interact with the alert slider on my OnePlus 3T
Thanks
Re: Access to system files
Posted: 10 Jan 2018 17:06
by Desmanto
srichter wrote:
Are there any plans to add this functionality for rooted users? I would love to be able to monitor the file /sys/class/switch/tri-state-key as it will allow me to create flows to interact with the alert slider on my OnePlus 3T
Thanks
The tri-state-key is to check the interruptions mode right? If yes, there is trigger Interruptions Mode, which you can use to do something based on the mode. There is also action Set Interruptions mode.
I don't know how file/folder listening normally works. Probably it is done via media storage database, which already monitor all file changes. But for any folder outside of user accessible ones, we have to use root command. It is possible to loop and cat the content of that file. But it will definitely kill your battery, since the flow is running all the time.
Other alternative (if interruptions mode doesn't work) is to create your own widget for slider. When you change the mode in this widget slider, use root command to change the tri-state-key to make it sync.