kevlar-kt / kevlar

Android Security Toolkit & Framework
https://kevlar-kt.github.io/kevlar
Apache License 2.0
74 stars 3 forks source link

[BUG] Libsu dependency needed #9

Closed javichaques closed 1 year ago

javichaques commented 1 year ago

Bug description

I''m using Kevlar Rooting v1.1.0 and i'm getting this error when attestate targets

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/topjohnwu/superuser/Shell; at com.kevlar.rooting.shell.DumperKt$BinaryDump$2$shellId$3.invokeSuspend(Dumper.kt:120) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

To solve this error I had to implement this library (libsu) I have seen in the code that this library is implemented but the Maven version does not have it as a dependency https://mvnrepository.com/artifact/io.github.kevlar-kt/rooting/1.1.0

cioccarellia commented 1 year ago

Sorry for the delay! I could just reproduce this error. It's weird because the library has libsu as a dependency, and it runs fine by itself. I could add to the docs a note, to add the dependency if you depend on the rooting module, but I feel it should work as it is now.

(Also, Maven doesn't show any of the actual dependencies as dependency on their website, so no clue what's wrong there)