ScriptManager icon indicating copy to clipboard operation
ScriptManager copied to clipboard

Can't execute root commands

Open Sarlay opened this issue 4 years ago • 1 comments

Hello, I am rooted with Magisk and I am using the latest version from the play store

I tried to execute the following script:

#!/system/bin/sh

su -c rm -r /data/data/com.google.android.youtube/cache/image_manager_disk_cache/*.0

The output is:

rm /data/data/com.google.android.youtube/cache/image_manager_disk_cache/*.0: no such file or directory

The expected behavior is the removal of the files ending in .0 in the directory, which works with other apps (such as SH SCRIPT RUNNER) on the play store but doesn't work with Script manager. The app has root privileges and su -c is supposed to execute the command as root.

Am I missing something here ?

Sorry if the issue is on my side I am a beginner with root and commands

Sarlay avatar Jul 10 '21 12:07 Sarlay

@Sarlay Firstly, you don't have to use su -c. Every command executing from app after granting root permission has full su privilege. Secondly, the output clearly says there is no root related issues exist. Otherwise, the output could be something like "permission denied to..." & finally, have you tried to execute the same command from a terminal or ADB. I guess you will get a similar outout.

sunilpaulmathew avatar Jul 10 '21 16:07 sunilpaulmathew