I have been trying to change root files in my phone through an app I am developing. The phone I have is a Moto G6, fully rooted. I'm using terminal emulators to run commands on my phone. I've tried "Terminal Emulator for Android" and "Shell Terminal Emulator" apps to try to make my files modifiable.
The commands I've tried to run are as follows:
su
mount -o rw,remount /system
In Terminal Emulator for Android this appears to work because it offers no error message but in Shell Terminal Emulator I'm hit with the following:
"...whatever.../system not user mountable in fstab"
So I went to check if it worked anyway and tried to modify a file in the root browser. The file:
/sys/devices/virtual/android_usb/android0/power/control
The file currently has the permissions set as "rw-r--r--" and filled with the text "auto" and after trying to save the file with the contents "0" instead I'm provided with this big ugly error message:
Error when saving file
=====Description=====
java.io.FileNotFoundException: "...file name..." and then (permission denied)
What I want to know is why I don't have permission to edit these files, afterall my phone is fully rooted and I have granted root access to the text editor.
Any solution or step in the right direction is greatly appreciated.