You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
userspace: add susfs lib
manager: completed susfs support check prctl syscall
This commit is contained in:
@@ -10,23 +10,6 @@
|
||||
#define LOG_TAG "KernelSU-Next"
|
||||
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
|
||||
|
||||
// TODO: Try fixing Prctl method to get CMD_SUSFS_SHOW_VERSION 0x555e1
|
||||
extern "C"
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_com_rifsxd_ksunext_Natives_getSusfsVersion(JNIEnv *env, jobject) {
|
||||
int error = -1;
|
||||
char susfsVersion[16];
|
||||
|
||||
error = prctl(KERNEL_SU_OPTION, CMD_SUSFS_SHOW_VERSION, susfsVersion, NULL, &error);
|
||||
if (!error) {
|
||||
return env->NewStringUTF(susfsVersion);
|
||||
LOGD("susfs: found");
|
||||
} else {
|
||||
LOGD("susfs: not foung");
|
||||
return env->NewStringUTF("Error fetching version");
|
||||
}
|
||||
}
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_com_rifsxd_ksunext_Natives_becomeManager(JNIEnv *env, jobject, jstring pkg) {
|
||||
|
||||
Reference in New Issue
Block a user