I can't edit, delete or copy any file from /sys directory in Android. How can I fix this? I have root access. I made /sys readable and writable using Root Explorer and Root Browser but that didn't solve the problem.

When I attempt to edit a text file, I just receive "failed saving text".

According to @DeathMaskSalesman, it appears the /sys partition is made uneditable at boot. So I suppose I should edit the files while in recovery mode. How can I do that exactly? Or does someone have a better idea?

  • The /sys partition is made uneditable at boot. I wasn't able to edit most of the files but two.
    – Grimoire
    Jul 29, 2016 at 20:08
  • @DeathMaskSalesman Thanks for the useful information. Then, what should I do?
    – That's me.
    Jul 29, 2016 at 20:19
  • /sys will not load at recovery. Why would you want to edit it anyway? As for the question itself, the only thing I've seen that "edits" /sys stuff is init.d scripts that run at boot time, so you might want to look into that.
    – Andy Yan
    Aug 1, 2016 at 8:56
  • @AndyYan Thanks for the comment. How exactly should I use these init scripts?
    – That's me.
    Aug 1, 2016 at 9:04
  • I have added additional content as a answer, please check it out. I don't guarantee this to work, but worth a try as long as you back up properly.
    – Andy Yan
    Aug 1, 2016 at 9:16

1 Answer 1


Continuing my comment above. This is getting long so I'll just post it as an answer entry.

You will need to enable init.d if your ROM does not support it, for example with this tool: LINK: Google Play

After that, read up on Linux scripting and write the script doing what you intend to do. Put the script in /system/etc/init.d and set permission to 0755 (rwxr-xr-x) to allow execution. Reboot and see if it works.

Check this XDA thread for more info, as well as an example script which you can refer to.

  • Thanks for the answer. I checked out your XDA thread. I edited my init.d file... Here it is: #!/system/bin/sh echo 1200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq But, after a reboot, it doesn't edit the text file. Do you know the why?
    – That's me.
    Aug 1, 2016 at 12:03
  • I'm currently running a stock ROM, but I already had a init.d file
    – That's me.
    Aug 1, 2016 at 12:10
  • If you're just trying to modify the top freq of a CPU (within the kernel limit), apps like Kernel Adiutor will do the job properly.
    – Andy Yan
    Aug 2, 2016 at 0:49
  • This was just 1 simple example. Unfortunately, I can't modify anything...
    – That's me.
    Aug 2, 2016 at 4:29
  • Can you provide help?
    – That's me.
    Aug 3, 2016 at 11:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .