Copy File/Dir error to any External OTG/USB Device

152 views
Skip to first unread message

Tasker Pro

unread,
Jan 2, 2017, 1:27:52 PM1/2/17
to Tasker
In previous versions of Tasker this used to work just fine, but now as of v4.9u2 - trying to use the Copy File or Copy Dir actions to any device connected via USB is returning errors, even after granting document tree access:

Copy File Error - http://i.imgur.com/4QDx2pa.jpg

Copy Dir Error - http://i.imgur.com/RmoCavp.jpg

Tasker Pro

unread,
Jan 2, 2017, 1:32:38 PM1/2/17
to Tasker
A note in relation to the errors, it's referencing in there the External SD Card (9977-3E78) which has nothing to do with any Action, since the Copy'ing is happening only between internal storage and the USB device (B02B-3D21).

Pent

unread,
Jan 3, 2017, 5:41:43 AM1/3/17
to Tasker
Android version ?

Pent

Tasker Pro

unread,
Jan 3, 2017, 11:15:39 PM1/3/17
to Tasker
Galaxy Note 4 on OS 6.0.1

Pent

unread,
Jan 4, 2017, 3:59:46 AM1/4/17
to Tasker

Galaxy Note 4 on OS 6.0.1

Thanks. Which Tasker version did you have before u2 (the one where it was
working) ?

Pent

Tasker Pro

unread,
Jan 4, 2017, 8:54:32 AM1/4/17
to Tasker
I am assuming anything prior to 4.9 however the exact version number is difficult to determine since I don't use Tasker to copy files with external USB/OTG very often.

This thread here prompted me to check it on my device - https://www.reddit.com/r/tasker/comments/5lk2el/sync_files_to_otg_usb/

And that person is using a Moto X Play and Galaxy S7 both running 6.0.1.

Pent

unread,
Jan 5, 2017, 3:12:42 AM1/5/17
to Tasker
Thanks for the info. It works fine on my S7 6.0.1, so I think it's related to
an unrelated permission you've granted for something else and have
tightened up the code there for the update today.

Pent

Tasker Pro

unread,
Jan 5, 2017, 10:28:45 AM1/5/17
to Tasker
I think you're correct regarding the existing permissions granted to other directories interfering - specifically on the Ext SD Card (even though the error is occuring when Task tries to write to the USB).

What is the best way to clear/reset all the existing directory permissions granted to Tasker?

Pent

unread,
Jan 5, 2017, 11:27:49 AM1/5/17
to Tasker


I think you're correct regarding the existing permissions granted to other directories interfering - specifically on the Ext SD Card (even though the error is occuring when Task tries to write to the USB).

What is the best way to clear/reset all the existing directory permissions granted to Tasker?


I don't know how you could do that unless I added something in Tasker, but it should
work now in 4.9u3 anyway ?

Pent

Tasker Pro

unread,
Jan 5, 2017, 12:09:25 PM1/5/17
to Tasker
Not working. Here is a screenshot of the error.

http://i.imgur.com/hG7GBlM.jpg

Notice that event though the Write File action is to write to the USB, the error is still referencing other paths on an SD Card.

AND - in further testing - those directories on the External SD Card the error lists (designated with the arrows) are the ONLY directories that Tasker can write to on the SD Card (Even though Tasker has been granted document tree access to the root of the SD Card).

So if you could add something in Tasker that 'resets' all those permissions, perhaps that could be a way to alleviate this issue and/or narrow it down further.

Pent

unread,
Jan 6, 2017, 5:49:46 AM1/6/17
to Tasker

Not working.

Actually, things have improved.
 
Here is a screenshot of the error.

http://i.imgur.com/hG7GBlM.jpg

Notice that event though the Write File action is to write to the USB, the error is still referencing other paths on an SD Card.


They're not errors anymore, they're just diagnostics which wouldn't appear if the action hadn't failed. Those
irrelevant paths are being ignored.
 

AND - in further testing - those directories on the External SD Card the error lists (designated with the arrows) are the ONLY directories that Tasker can write to on the SD Card (Even though Tasker has been granted document tree access to the root of the SD Card).


I found another bug where if you have multiple permission grants, in a particular
part of the code it only checks the first one. That's why the exact same action
worked fine for me before release of u3, because I had only granted the one
permission. Will fix of course, sorry about the delay.

Clearing all the grants should not be necessary and will cause problems
with other things (e.g. access to Local Media images in the UI, images
exported into kid apps).

Pent

Tasker Pro

unread,
Jan 6, 2017, 11:25:13 AM1/6/17
to Tasker
> "I found another bug where if you have multiple permission grants, in a particular
part of the code it only checks the first one."

That definitely sounds like what's going on. Appreciate you looking into it :)

Reply all
Reply to author
Forward
0 new messages