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

Apps using libsu do not work on root solutions like APatch. #179

Open
nitanmarcel opened this issue Mar 15, 2024 · 5 comments
Open

Apps using libsu do not work on root solutions like APatch. #179

nitanmarcel opened this issue Mar 15, 2024 · 5 comments

Comments

@nitanmarcel
Copy link

I've been redirected here from the APatch repository regarding an issue with libsu not being able to normally function.

This issue persist over any apps that uses this library, and it seems to be related specifically to libsu.

https://bin.kv2.dev/~65f4075c5de7ed6bfdbfad3c

@androidacy-user
Copy link

I've been redirected here from the APatch repository regarding an issue with libsu not being able to normally function.

This issue persist over any apps that uses this library, and it seems to be related specifically to libsu.

https://bin.kv2.dev/~65f4075c5de7ed6bfdbfad3c

Your issue looks like something potentially is wrong with your ProGuard configuration, but we're also seeing an issue where isAppGrantedRoot always returns false on APatch specifically

@kodein1
Copy link

kodein1 commented Mar 27, 2024

Same problem on android 14

@kodein1
Copy link

kodein1 commented Mar 28, 2024

Would an update be possible?

@DerGoogler
Copy link

I've been redirected here from the APatch repository regarding an issue with libsu not being able to normally function.
This issue persist over any apps that uses this library, and it seems to be related specifically to libsu.
https://bin.kv2.dev/~65f4075c5de7ed6bfdbfad3c

Your issue looks like something potentially is wrong with your ProGuard configuration, but we're also seeing an issue where isAppGrantedRoot always returns false on APatch specifically

isAppGrantedRoot is always false on KernelSU and APatch. This method looks for a file but su is not a real file in those

Workaround is to use

        try {
            Runtime.getRuntime().exec("su --version");
            return true;
        } catch (IOException e) {
            // java.io.IOException: Cannot run program "su": error=2, No such file or directory
            return false;
        }

@androidacy-user
Copy link

I've been redirected here from the APatch repository regarding an issue with libsu not being able to normally function.
This issue persist over any apps that uses this library, and it seems to be related specifically to libsu.
https://bin.kv2.dev/~65f4075c5de7ed6bfdbfad3c

Your issue looks like something potentially is wrong with your ProGuard configuration, but we're also seeing an issue where isAppGrantedRoot always returns false on APatch specifically

isAppGrantedRoot is always false on KernelSU and APatch. This method looks for a file but su is not a real file in those

Workaround is to use

        try {
            Runtime.getRuntime().exec("su --version");
            return true;
        } catch (IOException e) {
            // java.io.IOException: Cannot run program "su": error=2, No such file or directory
            return false;
        }

Works fine on KernelSU, provided the app is whitelisted in the manager. It's APatch specifically that (not tested with the recent 6.0.0 release) that always insists it does not have root or crashes.

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

4 participants