RikkaApps / Shizuku

Using system APIs directly with adb/root privileges from normal apps through a Java process started with app_process.
Apache License 2.0
11.22k stars 647 forks source link

realme c35 - java.lang.NullPointerException #251

Open kvnzmd opened 2 years ago

kvnzmd commented 2 years ago

Please report bugs of Shizuku itself.

Requirements:

Change "[ ]" to "[x]" if it meets the requirements.

Reports not meet the requirements will be immediately closed.

Information:

Logs:

Starting with wireless adb...

java.lang.NullPointerException

314674099_3457672274468331_2613264658319101603_n

Describe the bug:

the process just stopped at "java.lang.NullPointerException"

Additional context:

did all the necessary steps found on the website

RikkaW commented 2 years ago

https://github.com/RikkaApps/Shizuku/suites/9165314431/artifacts/426796536 Try again with build, it will show detailed log.

kvnzmd commented 2 years ago

here's the detailed log:

Starting with wireless adb...

java.lang.NullPointerException at rikka.shizuku.lb0.e(Unknown Source:5) at moe.shizuku.manager.starter.b$a.l(SourceFile:5) at rikka.shizuku.k7.n(SourceFile:4) at rikka.shizuku.bh.run(SourceFile:18) at rikka.shizuku.bt.run(SourceFile:2) at rikka.shizuku.nd0.run(SourceFile:1) at kotlinx.coroutines.scheduling.a.l(SourceFile:1) at kotlinx.coroutines.scheduling.a$c.d(SourceFile:4) at kotlinx.coroutines.scheduling.a$c.n(SourceFile:4) at kotlinx.coroutines.scheduling.a$c.run(Unknown Source:0)

RikkaW commented 2 years ago

https://github.com/RikkaApps/Shizuku/blob/6c08806a1f7198a03657bedc13a03b0476a43b1a/manager/src/main/java/moe/shizuku/manager/starter/Starter.kt#L34-L53

This part fails, it should never happens. Considering you haven't check "No Xposed installed", are you using Xposed modules that might affect the access to Android/data?

Try this build https://github.com/RikkaApps/Shizuku/suites/9170017213/artifacts/427111481, it will show the detail.

kvnzmd commented 2 years ago

Initial message when I opened the app:

Cannot write files:

java.io.FileNotFoundException: /storage/emulated/0/Android/data/moe.shizuku.privileged.api/starter: open failed: ENOENT (No such file or directory) at libcore.io.IoBridge.open(IoBridge.java:492) at java.io.FileOutputStream.(FileOutputStream.java:236) at java.io.FileOutputStream.(FileOutputStream.java:186) at moe.shizuku.manager.starter.Starter.copyStarter(Starter.kt:90) at moe.shizuku.manager.starter.Starter.writeSdcardFiles(Starter.kt:41) at moe.shizuku.manager.home.HomeActivity$writeStarterFiles$1.invokeSuspend(HomeActivity.kt:154) 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:749) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory) at libcore.io.Linux.open(Native Method) at libcore.io.ForwardingOs.open(ForwardingOs.java:166) at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254) at libcore.io.ForwardingOs.open(ForwardingOs.java:166) at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7838) at libcore.io.IoBridge.open(IoBridge.java:478) ... 13 more


After pairing and starting Shizuku:

Starting with wireless adb...

java.lang.NullPointerException at moe.shizuku.manager.starter.Starter.getSdcardCommand(Starter.kt:22) at moe.shizuku.manager.starter.ViewModel$startAdb$1.invokeSuspend(StarterActivity.kt:187) 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:749) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)


I'm not using Xposed modules. Phone is not rooted as well.

RikkaW commented 2 years ago

Does /storage/emulated/0/Android/data/moe.shizuku.privileged.api exists? This folder should be created automatically.

kvnzmd commented 2 years ago

No, it does not exist and it was not created automatically.

After reading your latest response, I tried creating the folder manually and ran Shizuku but still got the same results. I have now deleted the said folder.

alihusam-1 commented 2 months ago

same here