File Modified Event not triggered

518 views
Skip to first unread message

Alex B

unread,
Dec 19, 2014, 7:40:44 AM12/19/14
to tas...@googlegroups.com
Hi,

i was trying to set-up a Profile to react on file modifications using Tasker 4.6u1m on different KitKat 4.4.4 devices with root access [Tasker root working!].

Trying different files, Event "File Modified" was never triggered:
1. /data/data/com.google.android.gm/databases/mailstore.<my_email_address>@gmail.com.db
2. /sdcard/Tasker/dummy.txt
3. Tasker/dummy.txt
4. /storage/emulated/0/Tasker/dummy.txt

A Task with Test File (Type Modified) Action was showing different data (assume change time in seconds since...) for the files, so the files had been changed.

Here the simple Profile with test path as in 2. (a simple Flash in A1 made no difference!):

Profile: File Activity (58)
    Event: File Modified [ File:/sdcard/Tasker/Dummy.txt ]
Enter: Anon (59)
    A1: Perform Task [ Name:Log to File Priority:%priority Parameter 1 (%par1):Monitored File modified! Parameter 2 (%par2): Return Value Variable: Stop:Off ]

Do i need special settings for Profile, Tasks? What could be the issue? Thanks for your feedback!

Cheers
Alex

Pent

unread,
Dec 19, 2014, 8:56:18 AM12/19/14
to tas...@googlegroups.com
You can't use File Modified if Tasker doesn't have permissions to get to the file (without root).

Root doesn't help because Tasker uses the Android API to detect file changes (which doesn't run
as root)

Pent

Alex B

unread,
Dec 19, 2014, 9:14:39 AM12/19/14
to tas...@googlegroups.com
ok, so the first file can't be tested.

What about the files in the Tasker directory? They should be accessible!?

Cheers
Alex

Pent

unread,
Dec 19, 2014, 11:19:47 AM12/19/14
to tas...@googlegroups.com


What about the files in the Tasker directory?

Did you select the path with the magnifying glass or just assume
it's in /sdcard ?

Pent

Pent

unread,
Dec 19, 2014, 11:20:28 AM12/19/14
to tas...@googlegroups.com
Nevermind, I see you tried various possibilities.

Let me test it and see.

Pent

Pent

unread,
Dec 19, 2014, 11:22:45 AM12/19/14
to tas...@googlegroups.com
Tasker/dummy.txt works fine for me.

Possibly your task is failing, check Menu / More / Run Log.

Pent

Alex B

unread,
Dec 19, 2014, 3:28:06 PM12/19/14
to tas...@googlegroups.com
Strange thing happened (not only on the moon)...
I moved the file to a different folder, profile worked with changed parameters, moved the file back and now it works!?!

Sad it doesn't work for system folders, but i checked the Android API and now understand the reason.

Would there be a chance with a low-level inotify implementation? Anybody had a look at that?

...and many thanks for your help Pent!

Cheers
Alex

Pent

unread,
Dec 20, 2014, 3:54:11 AM12/20/14
to tas...@googlegroups.com
Feel free to write a plugin :-)

Pent

John Doe

unread,
Dec 20, 2014, 4:32:12 AM12/20/14
to tas...@googlegroups.com
inotify is depracated now. You have to use fanotify and it requires c/c++ so it's not easy to implement, you have to "fight" with Android NDK, good luck :)
Reply all
Reply to author
Forward
0 new messages