topjohnwu / Magisk

The Magic Mask for Android
GNU General Public License v3.0
45.85k stars 11.54k forks source link

ARM32 busybox executable segmentation fault on 27003 #8168

Closed Unknown78 closed 5 days ago

Unknown78 commented 3 weeks ago

Device: Samsung Galaxy Note 4 SM-N910H Android version: 7.1.1 Nougat (API 25) Magisk version name: debug Magisk version code: 27003 (45fa1fce) [Download]

Device platform: armeabi-v7a

System:

Boot:


Problem

I've already direct installed Magisk with the debug of 27001 (3d91a561)

If I try to update the App with the currently latest debug of 27003 (45fa1fce),

Case 1

Then the App could launch, but it's not functional. I could grant superuser access to many apps, but the Magisk App itself seems to be not getting root access.

Might be unrelated, but this buggy App prevents me to view the device's files from Windows Explorer with USB File Transfer, so I need to pull the files manually with adb or rollback the App to the latest working of 27001 (3d91a561).

Screenshot of Home (click to expand) ![Screenshot_30 06 24_15 26 05](https://github.com/topjohnwu/Magisk/assets/25132599/fe12c284-6e55-43e6-ab85-9c0003c7546a)
Screenshot of Logs 1 (click to expand) ![Screenshot_30 06 24_12 25 57](https://github.com/topjohnwu/Magisk/assets/25132599/1a1c4945-73fd-4b6f-9273-75d7b6edfdf6)
Screenshot of Logs 2 (click to expand) ![Screenshot_30 06 24_15 33 48](https://github.com/topjohnwu/Magisk/assets/25132599/86ea7b4b-53de-4321-bae2-47fd36f22272)
Screenshot of Settings (click to expand) ![Screenshot_30 06 24_15 26 21](https://github.com/topjohnwu/Magisk/assets/25132599/b0cd3e9f-af81-4d77-962f-36026de350f5)

logcat_Magisk_27003_45fa1fce_app-debug_2024-06-30T12.17.13.603000.log

06-30 12:17:14.899  3359  5129 E ActivityTrigger: activityStartTrigger: not whiteListedcom.topjohnwu.magisk/com.topjohnwu.magisk.ui.MainActivity/27003

This is the magisk_log from the diskette button, Magisk_27003_45fa1fce_app-debug_magisk_log_2024-06-30T12.17.29.log

Case 2

Then installing Magisk with the method of Direct Install will crash the App. logcat_Magisk_27003_45fa1fce_app-debug_2024-06-30T12.45.10.363000.log

06-30 12:45:14.907  2557  2557 E App     : kotlin.UninitializedPropertyAccessException: lateinit property installDir has not been initialized
06-30 12:45:14.907  2557  2557 E App     :  at com.topjohnwu.magisk.core.tasks.MagiskInstallImpl.getInstallDir(MagiskInstaller.kt:58)
06-30 12:45:14.907  2557  2557 E App     :  at com.topjohnwu.magisk.core.tasks.MagiskInstaller.exec$suspendImpl(MagiskInstaller.kt:576)
06-30 12:45:14.907  2557  2557 E App     :  at com.topjohnwu.magisk.core.tasks.MagiskInstaller$exec$1.invokeSuspend(MagiskInstaller.kt)
06-30 12:45:14.907  2557  2557 E App     :  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
06-30 12:45:14.907  2557  2557 E App     :  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
06-30 12:45:14.907  2557  2557 E App     :  at android.os.Handler.handleCallback(Handler.java)
06-30 12:45:14.907  2557  2557 E App     :  at android.os.Handler.dispatchMessage(Handler.java)
06-30 12:45:14.907  2557  2557 E App     :  at android.os.Looper.loop(Looper.java)
06-30 12:45:14.907  2557  2557 E App     :  at android.app.ActivityThread.main(ActivityThread.java)
06-30 12:45:14.907  2557  2557 E App     :  at java.lang.reflect.Method.invoke(Native Method)
06-30 12:45:14.907  2557  2557 E App     :  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
06-30 12:45:14.907  2557  2557 E App     :  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
06-30 12:45:14.907  2557  2557 E App     :  Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@bebd979, Dispatchers.Main.immediate]
06-30 12:45:14.909  2557  2557 I art     : System.exit called, status: 1
06-30 12:45:14.909  2557  2557 I AndroidRuntime: VM exiting with result code 1, cleanup skipped.

Case 3

Then installing Magisk with the method of Select and Patch a File will fail.

magisk_install_log_2024-06-30T12.57.30.log

- Device platform: armeabi-v7a
- Installing: 45fa1fce (27003)
- Copying image to cache
! Installation failed

logcat_Magisk_27003_45fa1fce_app-debug_2024-06-30T12.57.13.677000.log


Additional Info

I accidently found this issue when troubleshooting other issue, https://github.com/topjohnwu/Magisk/issues/8013?notification_referrer_id=NT_kwDOAX9-N7QxMDQ0MDg2NjE5NzoyNTEzMjU5OQ#issuecomment-2091532113

Then I tried to open up a new issue, https://github.com/topjohnwu/Magisk/issues/8147 It seems to be yet another different issue.

canyie commented 3 weeks ago

image

Ya11123 commented 3 weeks ago

في الاثنين، 1 يوليو 2024 10:01 ص 残页 @.***> كتب:

image.png (view on web) https://github.com/topjohnwu/Magisk/assets/31466456/6cbfe1e9-cd2a-4f81-bb1c-270cb12b7b1a

— Reply to this email directly, view it on GitHub https://github.com/topjohnwu/Magisk/issues/8168#issuecomment-2199385864, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT7LFZXLNRPSBVNUHPDBPMDZKD5FHAVCNFSM6AAAAABKDZWTV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJZGM4DKOBWGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Unknown78 commented 3 weeks ago

@canyie Okay. How did you know that it's busybox fault? Will I open up a new issue again after this? lol

canyie commented 3 weeks ago

Your screenshot shows "Ramdisk no" which gives me some hints, so I tried to run arm32 busybox locally, and it gives me "Segmentation fault" 😄 Not sure if all issues are caused by it, but a broken busybox can explain all issues. So you don't need to open another issue, at least not now :) lol

Unknown78 commented 5 days ago

The pull request was closed and not merged. What does it mean for this issue then?

osm0sis commented 5 days ago

This happened instead: https://github.com/topjohnwu/Magisk/commit/ef81cdab4f6cf211ab2ae37c7c00635ae819b702

Which has also fixed the issue, as you were told by topjohnwu: https://github.com/topjohnwu/Magisk/pull/8174#issuecomment-2232933158

Should be good for the next Canary.

Unknown78 commented 4 days ago

I've just direct install the latest build of https://github.com/topjohnwu/Magisk/actions/runs/9979051444 And it's working fine.

This issue come up in late April, so almost three months. Good job everyone to have the patience to solve this issue!