manager: remove libksu

This commit is contained in:
tiann
2023-01-26 12:36:25 +08:00
parent ed86635b3c
commit f810ce2d0d
3 changed files with 2 additions and 15 deletions

View File

@@ -16,5 +16,3 @@ add_library(kernelsu
find_library(log-lib log) find_library(log-lib log)
target_link_libraries(kernelsu ${log-lib}) target_link_libraries(kernelsu ${log-lib})
add_executable(libksu.so su.c)

View File

@@ -1,10 +0,0 @@
#include <unistd.h>
#include <stdlib.h>
#include <sys/prctl.h>
int main(){
int32_t result = 0;
prctl(0xdeadbeef, 0, 0, 0, &result);
system("/system/bin/sh");
return 0;
}

View File

@@ -23,10 +23,9 @@ private fun getKsuDaemonPath(): String {
fun createRootShell(): Shell { fun createRootShell(): Shell {
Shell.enableVerboseLogging = BuildConfig.DEBUG Shell.enableVerboseLogging = BuildConfig.DEBUG
val su = ksuApp.applicationInfo.nativeLibraryDir + File.separator + "libksu.so"
val builder = Shell.Builder.create() val builder = Shell.Builder.create()
return try { return try {
builder.build(su) builder.build(getKsuDaemonPath(), "debug", "su")
} catch (e: Throwable) { } catch (e: Throwable) {
builder.build("sh") builder.build("sh")
} }