libsu icon indicating copy to clipboard operation
libsu copied to clipboard

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

Open nitanmarcel opened this issue 1 year ago • 5 comments

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

nitanmarcel avatar Mar 15 '24 15:03 nitanmarcel

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

androidacy-user avatar Mar 26 '24 14:03 androidacy-user

Same problem on android 14

kodein1 avatar Mar 27 '24 11:03 kodein1

Would an update be possible?

kodein1 avatar Mar 28 '24 09:03 kodein1

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;
        }

DerGoogler avatar Jun 16 '24 19:06 DerGoogler

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.

androidacy-user avatar Jul 03 '24 05:07 androidacy-user