Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shutdown command from advanced details not recognised #32

Closed
spicewiesel opened this issue Oct 28, 2022 · 6 comments
Closed

shutdown command from advanced details not recognised #32

spicewiesel opened this issue Oct 28, 2022 · 6 comments

Comments

@spicewiesel
Copy link

Hi there and thanks for this app, it's so useful for us as we use it to wake and suspend our home server which saves some energy.

Recently it stopped working and I saw that the app always tries to execute "sudo /usr/bin/shutdown -r now" allthough I set an other command in the advanced settings. After saving the device the advanced settings toggle is always back to "off" but when activated I can see my custom command. Would be great to have the app back! Thanks a lot.

@fralik
Copy link
Owner

fralik commented Nov 2, 2022

Thanks for letting me know. I will try to find some time to look into it.

@spicewiesel
Copy link
Author

would be super cool, thank you!

@fralik
Copy link
Owner

fralik commented Nov 10, 2022

Unfortunately, I can't reproduce the problem. If you want, you can try out this build, it should show you the command that is being sent to the device.

Otherwise: what android version do you use?

@spicewiesel
Copy link
Author

Thanks for the help!

I installed your debug apk and I still do not see the sent command in the app itself, but I see what's happening on my system after the duorem user is logged in via ssh:

duorem : command not allowed ; TTY=pts/1 ; PWD=/tmp ; USER=root ; COMMAND=/usr/bin/shutdown -r now

So the app executes the default value for "Shutdown command" which is sudo shutdown -h now although I configured sudo systemctl suspend (which is the only allowed sudo command for this user).

I am on Android 13.

@fralik
Copy link
Owner

fralik commented Nov 11, 2022

Hm. Could it be that you are still running the other version? Just to be sure, I've prepared a new bundle, which:

  • should show you the shutdown command;
  • should show version 1.1.5 in the About dialog. The version on F-Droid is 1.1.4.

I see this in the emulator (android 13):
duorem

And in the auth.log on the target system:

<...> sudo: duorem : TTY=pts/4 ; PWD=/home/duorem ; USER=root ; COMMAND=/usr/bin/systemctl reboot
<...> sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
<...> sudo: pam_unix(sudo:session): session closed for user root

@spicewiesel
Copy link
Author

Hi, that did the trick, but I don't know why :) I reinstalled the fdroid version afterwards and that one is working again, too.
So maybe it was just some weird local stuff on my phone and I hope I did not use too much of your time. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants