Help with Root Command

Post your questions and help other users.

Moderator: Martin

Post Reply
Kyrux
Posts: 4
Joined: 14 Oct 2017 13:47

Help with Root Command

Post by Kyrux » 18 Oct 2017 20:44

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.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Help with Root Command

Post by Desmanto » 19 Oct 2017 04:08

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Kyrux
Posts: 4
Joined: 14 Oct 2017 13:47

Re: Help with Root Command

Post by Kyrux » 19 Oct 2017 10:59

Yes I do "Root Command" since it involves root permission.

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

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Help with Root Command

Post by Desmanto » 19 Oct 2017 16:28

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).
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Kyrux
Posts: 4
Joined: 14 Oct 2017 13:47

Re: Help with Root Command

Post by Kyrux » 20 Oct 2017 13:24

I attached log output and flow.

Yes Automagic grabs root fully because I use another root function (notification interaction) and it works flawless.
Attachments
Screenshot_20171020-152225.jpg
Screenshot_20171020-152225.jpg (107.18 KiB) Viewed 14109 times
Screenshot_20171020-152209.jpg
Screenshot_20171020-152209.jpg (770.2 KiB) Viewed 14109 times

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Help with Root Command

Post by Desmanto » 20 Oct 2017 15:14

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply