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

Better check for if device has root #19

Merged
merged 2 commits into from
Jul 24, 2021
Merged

Conversation

goshawk22
Copy link
Contributor

"which su" will return the path of the su binary, or it will return nothing.
The python boolean of a string with something in it (such as the path of the su binary), will be True.
An empty string (where there is no su binary) will be False.

This fixes Issue #9

"which su" will return the path of the su binary, or it will return nothing. 
The python boolean of a string with something in it (such as the path of the su binary), will be True.
An empty string (where there is no su binary) will be False.
@U039b
Copy link
Contributor

U039b commented Jul 22, 2021

Looks good to me!

@mateuszjablonski
Copy link

Actually command -v su would be better and safer. Explanation can be found here: https://stackoverflow.com/a/677212

@goshawk22
Copy link
Contributor Author

Thanks for the suggestion!

Copy link

@thyarles thyarles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

Copy link
Contributor

@Trigus42 Trigus42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on Android 11 with latest Magisk canary build.

@Lunarequest
Copy link

can confirm this works without issues

@botherder
Copy link
Contributor

Thank you, merged.

@botherder botherder merged commit 97558ec into mvt-project:main Jul 24, 2021
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

Successfully merging this pull request may close these issues.

None yet

7 participants