0

i want to change value in sched_mc_power_savings file, using this code :

   #!/system/bin/sh
   mount -o remount,rw /
   mount -o remount,rw /system
   busybox echo "4" > /sys/device/system/cpu/sched_mc_power_savings

but it not work, and it always give an error like

/etc/init.d/00myfile : not found

or

can't create /sys/device/system/cpu/sched_mc_power_savings : no such file or directory

and i though using busybox echo to change the value is enough, so does im doing something wrong ? and how make it works ?

  • Are you running that as root – or as normal user? In the latter case: I doubt the system will let you write to /sys/* without using root. And, btw, I don't see how the error /etc/init.d/00myfile : not found can be related here as that path/file isn't even mentioned in the scriptlet you've posted. – Izzy Nov 17 '17 at 10:29
  • i was run it with root, and i change the permission to 0755 – user243084 Nov 17 '17 at 10:50
  • Permission on what? Ah: You saved the quoted script as /etc/init.d/00myfile? Then what did start the script to throw the error? And what do you get when, at root, you run cat /sys/device/system/cpu/sched_mc_power_savings and ls /sys/device/system/cpu? – Izzy Nov 17 '17 at 12:47
  • 1
    i was check everything (path and file) and im not realize that something wrong on the path, that must be /sys/devices not /sys/device. it was work now, thanks for help izzy :) :) :) – user243084 Nov 17 '17 at 13:20
  • I was expecting something like that :) Glad it solved! Mind answering your own question and then "accepting" that answer as solution (might help others if they can identify it that way – and as side-effect earn you some rep)? While doing that, a little note on what that statement does (and what the "4" stands for) would certainly be welcome – as would the source (link) of that information, if you still have it. – Izzy Nov 17 '17 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.