Page 1 of 1

Help with Root Command

Posted: 18 Oct 2017 20:44
by Kyrux
Okay so, I have installed a module which stops charging at the specified charge level and I want to automate this.

But when I try to do "su -c cs 80" it adds to the last part of the command "in" and I think this is why script fails.

All I need is it to run "su -c cs 80" or "cs 80" i tried both but fails.

With MacroDroid this works hasslefree but I couldn't get it to work with Automagic and neither do I want to keep two automater app.

Re: Help with Root Command

Posted: 19 Oct 2017 04:08
by Desmanto
Which action do you use? You need to use action "Execute Root Command", not "Execute Command".

Try without su anymore, since it is implied already.

Re: Help with Root Command

Posted: 19 Oct 2017 10:59
by Kyrux
Yes I do "Root Command" since it involves root permission.

But still it fails. Red thing with error stuff pops up, it fails.

Re: Help with Root Command

Posted: 19 Oct 2017 16:28
by Desmanto
What is the error? especially the one in the red.

Maybe your root management app deny automagic root permission access. Try to disable and reenable the permission in automagic and in the root management app. (usually it is SuperSU).

Re: Help with Root Command

Posted: 20 Oct 2017 13:24
by Kyrux
I attached log output and flow.

Yes Automagic grabs root fully because I use another root function (notification interaction) and it works flawless.

Re: Help with Root Command

Posted: 20 Oct 2017 15:14
by Desmanto
Red is for executing elements.

Can you try other root command to see if it works? Try

Code: Select all

ls /data
Then, attach a debug dialog to see the result (condition > debug dialog), check content of variable stdout.

I never use the battery limiter script. Can you post the link to the original thread which utilize this?

There is actually another way to limit the battery, by giving input directly to sys/class. But I never try it.