capntrips / KernelFlasher

Kernel Flasher is an Android app to flash, backup, and restore kernels.
https://forum.xda-developers.com/t/dev-kernel-flasher.4439887/
Other
864 stars 50 forks source link

systemui崩溃 #10

Closed ghost closed 11 months ago

ghost commented 1 year ago

在打开Kernel Flasher时,我的systemui崩溃。 [ 2023-04-12T06:31:07.279 10060: 3881: 4351 E/AndroidRuntime ] FATAL EXCEPTION: wmshell.splashscreen Process: com.android.systemui, PID: 3881 java.lang.NullPointerException: Attempt to invoke direct method 'void android.view.SurfaceControl.checkNotReleased()' on a null object reference at android.os.Parcel.createExceptionOrNull(Parcel.java:3017) at android.os.Parcel.createException(Parcel.java:2995) at android.os.Parcel.readException(Parcel.java:2978) at android.os.Parcel.readException(Parcel.java:2920) at android.app.IActivityTaskManager$Stub$Proxy.onSplashScreenViewCopyFinished(IActivityTaskManager.java:3992) at android.app.ActivityTaskManager.onSplashScreenViewCopyFinished(ActivityTaskManager.java:218) at com.android.wm.shell.startingsurface.StartingSurfaceDrawer.copySplashScreenView(StartingSurfaceDrawer.java:550) at com.android.wm.shell.startingsurface.StartingWindowController.lambda$copySplashScreenView$1(StartingWindowController.java:175) at com.android.wm.shell.startingsurface.StartingWindowController.$r8$lambda$Nsve7j-qdEujmRJ49hHw0qVTWtY(Unknown Source:0) at com.android.wm.shell.startingsurface.StartingWindowController$$ExternalSyntheticLambda6.run(Unknown Source:4) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:242) at android.os.Looper.loop(Looper.java:374) at android.os.HandlerThread.run(HandlerThread.java:67) Caused by: android.os.RemoteException: Remote stack trace: at android.view.SurfaceControl.-$$Nest$mcheckNotReleased(Unknown Source:0) at android.view.SurfaceControl$Transaction.checkPreconditions(SurfaceControl.java:2981) at android.view.SurfaceControl$Transaction.setPosition(SurfaceControl.java:3149) at com.android.server.wm.TaskOrganizerController.applyStartingWindowAnimation(TaskOrganizerController.java:492) at com.android.server.wm.ActivityRecord.onCopySplashScreenFinish(ActivityRecord.java:2791)

capntrips commented 1 year ago

Unless there's some incompatibly with Kernel Flasher's splash screen, I don't see anything related to Kernel Flasher in that stack trace. Can you attach a log file with more context?

I assume the app crashed before ever loading the UI? Can you provide some details about the app, device, and OS (versions, etc)?

ghost commented 1 year ago

KernelSU_bugreport_2023-04-12_13_43.tar.gz

capntrips commented 1 year ago

I see it gets force stopped, but I'm not seeing any obvious causes. ~I don't know anything about KernelSU, but assuming it provides a similar interface to Magisk, can you ensure Kernel Flasher is allowed root access?~ Edit: I uninstalled Magisk and installed KernelSU on a Pixel 6a, and while it gives an error about an invalid boot.img (which I'll try to look into in the next few days), it does not crash, even when it doesn't have root access.

Does any part of the UI load? Again, can you provide some detail of your set up (app version, ~device, OS version~, KernelSU version)? (Edit: I see this is a Nubia NNX729J (TKQ1.221013.002) on Android 13 in the bugreport.) Assuming you're using v1.0.0-alpha14, can you confirm that v1.0.0-alpha13 is also affected?

ghost commented 1 year ago

I see it gets force stopped, but I'm not seeing any obvious causes. ~I don't know anything about KernelSU, but assuming it provides a similar interface to Magisk, can you ensure Kernel Flasher is allowed root access?~ Edit: I uninstalled Magisk and installed KernelSU on a Pixel 6a, and while it gives an error about an invalid boot.img (which I'll try to look into in the next few days), it does not crash, even when it doesn't have root access.

Does any part of the UI load? Again, can you provide some detail of your set up (app version, ~device, OS version~, KernelSU version)? (Edit: I see this is a Nubia NNX729J (TKQ1.221013.002) on Android 13 in the bugreport.) Assuming you're using v1.0.0-alpha14, can you confirm that v1.0.0-alpha13 is also affected?

I confirm that v1.0.0-alpha13 is also affected. I found that switching to the background when opening Kernel Flasher directly causes the issue. I have reproduced this problem on Magisk version 709f25f6-alpha (26101), and the following are the detailed logs recorded by Isposed. LSPosed_2023-04-13T02_24_14.241920.zip

capntrips commented 1 year ago

I tried both stock (d0c93842) and alpha (709f25f6) Magisk 26101, but I'm unable to replicate the issue on a Pixel 6a. I'm not seeing anything obvious causes from looking through your logs. My only suggestion at this point is to maybe try to build the run it from source in Android Studio, and maybe it will provide more interesting feedback (or at least more isolated logs in the Logcat tool window with package:mine).

Edit: I bumped all of the dependencies here, if you want to give it a try:

KernelFlasher-v1.0.0-alpha14+deps.apk.gz

(Github wouldn't let me attach the apk directly, so you'll need to gunzip it.)

Xynonners commented 1 year ago

Also encountering a similar issue, magisk 26.2, SM-X900 (Tab S8 Ultra). Crashes on app startup, no UI is loaded.

The provided +deps apk is also "invalid" according to installer.

capntrips commented 1 year ago

Do you have anything interesting in your logcat when it crashes?

Xynonners commented 1 year ago

Do you have anything interesting in your logcat when it crashes?

09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at android.view.ViewGroup.addViewInner(ViewGroup.java:5565)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at android.view.ViewGroup.addView(ViewGroup.java:5341)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at android.view.ViewGroup.addView(ViewGroup.java:5313)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:572)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at android.app.Activity.setContentView(Activity.java:3717)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at androidx.activity.ComponentActivity.setContentView(ComponentActivity.java:462)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at androidx.activity.compose.ComponentActivityKt.setContent(ComponentActivity.kt:68)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at androidx.activity.compose.ComponentActivityKt.setContent$default(ComponentActivity.kt:49)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.github.capntrips.kernelflasher.MainActivity.onAidlConnected(MainActivity.kt:166)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.github.capntrips.kernelflasher.MainActivity$AidlConnection.onServiceConnected(MainActivity.kt:75)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.topjohnwu.superuser.internal.RootServiceManager.lambda$bindInternal$3(RootServiceManager.java:241)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.topjohnwu.superuser.internal.RootServiceManager$$ExternalSyntheticLambda1.run(Unknown Source:6)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.topjohnwu.superuser.internal.UiThreadHandler.run(UiThreadHandler.java:31)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.topjohnwu.superuser.internal.UiThreadHandler$$ExternalSyntheticLambda0.execute(Unknown Source:0)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.topjohnwu.superuser.internal.RootServiceManager.bindInternal(RootServiceManager.java:241)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.topjohnwu.superuser.internal.RootServiceManager.lambda$createBindTask$5$com-topjohnwu-superuser-internal-RootServiceManager(RootServiceManager.java:257)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.topjohnwu.superuser.internal.RootServiceManager$$ExternalSyntheticLambda4.run(Unknown Source:8)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.topjohnwu.superuser.internal.RootServiceManager$ServiceReceiver.onReceive(RootServiceManager.java:400)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$android-app-LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1919)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        ... 9 more
09-15 05:44:50.050  3190  6556 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
09-15 05:44:50.050  3190 21788 D Debug   : low && ship && 3rdparty app crash, do not dump
09-15 05:44:50.050  3190 21788 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1252 com.android.server.am.AppErrors.crashApplicationInner:722 com.android.server.am.AppErrors.crashApplication:598 com.android.server.am.ActivityManagerService.handleApplicationCrashInner:10519 com.android.server.am.ActivityManagerService.handleApplicationCrash:10388
09-15 05:44:50.050  3190 21788 W ActivityManager: crash : com.github.capntrips.kernelflasher,10392

this is what I get right before the crash.

Xynonners commented 1 year ago

One thing to note also is that on my device, armabi-v7a apks crash for some reason.

Xynonners commented 1 year ago

there's also this part (probably more important tbh, grep'd for kernel)

09-15 05:44:50.048  6446  6446 E AndroidRuntime: java.lang.RuntimeException: Error receiving broadcast Intent { act=8c6abb5c-7b69-4488-895e-f172503e8b16 flg=0x400010 pkg=com.github.capntrips.kernelflasher (has extras) } in com.topjohnwu.superuser.internal.RootServiceManager$ServiceReceiver@a61f553
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.github.capntrips.kernelflasher.ui.screens.main.MainViewModel.<init>(MainViewModel.kt:59)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.github.capntrips.kernelflasher.MainActivity$onAidlConnected$2$1.invoke(MainActivity.kt:170)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.github.capntrips.kernelflasher.MainActivity$onAidlConnected$2$1.invoke(MainActivity.kt:168)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.github.capntrips.kernelflasher.MainActivity$onAidlConnected$2.invoke(MainActivity.kt:317)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.github.capntrips.kernelflasher.MainActivity$onAidlConnected$2.invoke(MainActivity.kt:166)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.github.capntrips.kernelflasher.MainActivity.onAidlConnected(MainActivity.kt:166)
09-15 05:44:50.048  6446  6446 E AndroidRuntime:        at com.github.capntrips.kernelflasher.MainActivity$AidlConnection.onServiceConnected(MainActivity.kt:75)
09-15 05:44:50.050  3190 21788 W ActivityManager: crash : com.github.capntrips.kernelflasher,10392
09-15 05:44:50.051  3190 21788 W ActivityTaskManager:   Force finishing activity com.github.capntrips.kernelflasher/.MainActivity
09-15 05:44:50.051  3190 21788 D ActivityTaskManager: scheduleTopResumedActivityChanged, onTop=false r=ActivityRecord{859f13 u0 com.github.capntrips.kernelf
Xynonners commented 1 year ago

and also these 3 lines:

09-15 05:44:49.735  6491  6491 D com.github.capntrips.kernelflasher:root: Time zone APEX ICU file found: /apex/com.android.tzdata/etc/icu/icu_tzdata.dat
09-15 05:44:49.735  6491  6491 D com.github.capntrips.kernelflasher:root: I18n APEX ICU file found: /apex/com.android.i18n/etc/icu/icudt70l.dat
09-15 05:44:49.741  6491  6491 W ziparchive: Unable to open '/data/user_de/0/com.github.capntrips.kernelflasher/cache/main.dm': No such file or directory
capntrips commented 11 months ago

Give v1.0.0-alpha15 a try. I'm not seeing anything obvious in the logs, but the full stack traces and a bit more context around them might be helpful if the issue persists.