File created in AM, access denied when run command mv

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
jassing
Posts: 94
Joined: 16 Jul 2017 01:42
Location: SF Bay Area

File created in AM, access denied when run command mv

Post by jassing » 15 Dec 2019 03:37

I created a file, then tried to use mv to rename it via execute command. It failed, permission denied.
I thought it might be a timing issue, but even trying to rename 5 minutes later failed.
Using the built in move file works, so it's not a big deal; the m just curious as to the why...

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: File created in AM, access denied when run command mv

Post by Desmanto » 15 Dec 2019 10:09

It is working fine at mine. What is your example that fail.

I try to write to file, "hello" to /sdcard/Download/a.txt
Then use execute command (not root one)

Code: Select all

mv a.txt b.txt
at the working directory /sdcard/Download/. The flow works just fine, immediate rename.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
jassing
Posts: 94
Joined: 16 Jul 2017 01:42
Location: SF Bay Area

Re: File created in AM, access denied when run command mv

Post by jassing » 15 Dec 2019 12:11

Thanks for looking at this.(do you get any rest? ;-)

Flow Attached.
flow_mv_Fail_20191215_034942.zip
Demo flow, permission denied
(916 Bytes) Downloaded 641 times
Screenshot_20191215-035309.png
Debug showing error
Screenshot_20191215-035309.png (73.81 KiB) Viewed 8480 times
Termux session, same thing. (w attrib missing for other)
Screenshot_20191215-040206.png
Termux session
Screenshot_20191215-040206.png (126.36 KiB) Viewed 8480 times


But any file manager or AM can rename or delete the file

Strange, eh?

Cheers

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: File created in AM, access denied when run command mv

Post by Desmanto » 15 Dec 2019 15:48

I am restless soul with messed up timezone :lol

I thought you are dealing with root directory, turns out to be external storage. I don't use microsd since I use this phone 1,5 year ago. Somehow I plugged in OTG and I can't find it using move file or AM's standard folder browsing. This is maybe the bug you are encountering too.

The last time I remember ever tested it out at old phone, there is a bug where the move files has the correct permission after granted SDcard access in the Feature & permissions setting; but the command version or the root version can't see it. The other reverse bug is move/copy files can't see the root directory, since they are executed as normal privellege although I have granted Automagic root. It seems you encounter the first one. Let's wait for Martin's insight on this.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply