First of all, I'm experimenting a DVFS with my rooted phone, Galaxy A12. Nevertheless, if I use a command inside of adb shell
then it does not throw a Permission Denied
.
~$ adb shell
a12:/ $ su
a12:/ # echo 500000 > sys/kernel/gpu/gpu_max_clock
a12:/ #
However, when I use this command outside of android kernel with adb shell su -c
, it throws a Permission denied
~$ adb shell su -c "echo 680000 > sys/kernel/gpu/gpu_max_clock"
/system/bin/sh: can't create sys/kernel/gpu/gpu_max_clock: Permission denied
I've tried some commands like the below, however the commands threw the same thing.
adb shell su -c "chmod 755 sys/kernel/gpu/gpu_max_clock && echo 680000 > sys/kernel/gpu/gpu_max_clock"
adb shell su -c "chmod 777 sys/kernel/gpu/gpu_max_clock && echo 680000 > sys/kernel/gpu/gpu_max_clock"
How can I handle this situation?