Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magisk with libsu version after 4.0 show version as N/A #7021

Closed
nexplorer-3e opened this issue May 26, 2023 · 21 comments · Fixed by topjohnwu/libsu#158
Closed

Magisk with libsu version after 4.0 show version as N/A #7021

nexplorer-3e opened this issue May 26, 2023 · 21 comments · Fixed by topjohnwu/libsu#158
Labels
app This issue is related to Magisk App confirmed Issue confirmed to exist and the reason is known regression Something works in previous versions but not in the current one

Comments

@nexplorer-3e
Copy link

Device & Android version: See #7020

Magisk version name: dd93556
Magisk version code: 26102

followed instruction in #7014 with no luck.

magisk_log_26102.log
magisk_log_v24.1_ndebug.log
magisk_log_v25.0_ndebug.log
Screenshot_20230526-204251_Magisk

@yujincheng08
Copy link
Collaborator

Duplicate of #6914

@yujincheng08 yujincheng08 marked this as a duplicate of #6914 May 26, 2023
@yujincheng08 yujincheng08 closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2023
@nexplorer-3e
Copy link
Author

nexplorer-3e commented May 26, 2023

Duplicate of #6914

This ROM use https://github.com/html6405/android_device_samsung_n5100 as kernel, and there is no related logic that hide root. @yujincheng08

@yujincheng08
Copy link
Collaborator

to confirm, when you launched magisk and it shows N/A, use a root file explorer or terminal to check if /system/bin/su exists?

@vvb2060
Copy link
Collaborator

vvb2060 commented May 26, 2023

Duplicate of #6976

@vvb2060 vvb2060 marked this as a duplicate of #6976 May 26, 2023
@vvb2060 vvb2060 marked this as not a duplicate of #6914 May 26, 2023
@nexplorer-3e
Copy link
Author

nexplorer-3e commented May 26, 2023

Screenshot

Screenshot_20230527-022542_Termux

@vvb2060 From screenshot it can be indicated that magisk daemon is working, which differ from the case that described in XDA.

to confirm, when you launched magisk and it shows N/A, use a root file explorer or terminal to check if /system/bin/su exists?

@yujincheng08
the output from this device:

konawifi:/ $ su
konawifi:/ # magisk --path
/sbin
konawifi:/ # mount | grep "magisk on"
magisk on /sbin type tmpfs (rw,seclabel,relatime,mode=755)
magisk on /sbin/.magisk/mirror/sbin type tmpfs (rw,seclabel,relatime,mode=755)
magisk on /system/bin/app_process32 type tmpfs (rw,seclabel,relatime,mode=755)

according to 33f5154, if /sbin exists, magisk would not be injected into /system/bin.

@nexplorer-3e
Copy link
Author

nexplorer-3e commented May 27, 2023

na.log
hang_splash.log

tldr for the git bisect log output above:

first bad commit: [0ac19e3] Fix app running without root <- this is the first commit that manager start to show N/A
first bad commit: [f2c15c7] Ensure RootService is launched <- this is the first commit that manager hangs at startup

Should try to bisect between v24.1 and v24.2 to see what breaks the second stage install/log reader.

Rollback libsu to 4.0.2 on commit f2c15c7 produce a manager that can detect Magisk version.

@vvb2060 vvb2060 reopened this May 27, 2023
@nexplorer-3e
Copy link
Author

nexplorer-3e commented May 28, 2023

abnormal_log.log

first bad commit: [71e3734] Update libsu

start from this commit, manager behaves like below:

Screenshot

Screenshot_20230528-113656_Magisk

before this commit:
magisk_log_2023-05-28T11:55:36.log

after v25.0, the manager can get manager log, but still cannot get magisk log

Kernel version: 3.0.101-lineage-g318c6b765916

@yujincheng08 yujincheng08 marked this as not a duplicate of #6976 May 28, 2023
@nexplorer-3e nexplorer-3e changed the title Magisk show version as N/A after v25 Magisk with libsu version after 4.0 show version as N/A May 28, 2023
@canyie
Copy link
Collaborator

canyie commented Jun 7, 2023

Open Magisk app, then run adb bugreport and upload the produced bugreport file?

@nexplorer-3e
Copy link
Author

nexplorer-3e commented Jun 9, 2023

Open Magisk app, then run adb bugreport and upload the produced bugreport file?

@canyie
bugreport-konawifixx-PQ3A.190801.002-2023-06-09-16-07-00.zip

Magisk version: 5e2ef1b

@canyie
Copy link
Collaborator

canyie commented Jun 12, 2023

06-09 16:06:52.623  root  1934  2169 D Magisk  : su: return code=[1]
06-09 16:06:52.636  root  1934  1936 D Magisk  : su: request from pid=[3647], client=[9]
06-09 16:06:52.636  root  1934  1936 D Magisk  : su: request from uid=[10170]
06-09 16:06:52.637  root  1934  1936 D Magisk  : su: waiting child pid=[3648]
06-09 16:06:52.637  root  3648  3648 D Magisk  : su: fork handler
06-09 16:06:52.638  root  3648  3648 D Magisk  : su: use namespace of pid=[3647]
06-09 16:06:53.503 10101  3422  3655 D ProfileInstaller: Skipping profile installation for com.steadfastinnovation.android.projectpapyrus
06-09 16:06:54.639 10119  3497  3657 D ProfileInstaller: Skipping profile installation for com.zacharee1.systemuituner
06-09 16:06:54.643  root  1934  1936 D Magisk  : su: return code=[1]
06-09 16:06:54.770 10170  3656  3656 W libbusybox.so: type=1400 audit(0.0:55): avc: denied { search } for name="block" dev=tmpfs ino=563 scontext=u:r:untrusted_app:s0:c170,c256,c512,c768 tcontext=u:object_r:block_device:s0 tclass=dir permissive=0
06-09 16:06:54.770 10170  3656  3656 W libbusybox.so: type=1400 audit(0.0:56): avc: denied { search } for name="block" dev=tmpfs ino=563 scontext=u:r:untrusted_app:s0:c170,c256,c512,c768 tcontext=u:object_r:block_device:s0 tclass=dir permissive=0
06-09 16:06:54.827 10170  3431  3611 W opjohnwu.magis: Long monitor contention with owner DefaultDispatcher-worker-1 (3610) at void java.lang.Object.wait(long, int)(Object.java:-2) waiters=0 in com.topjohnwu.superuser.internal.ShellImpl com.topjohnwu.superuser.internal.MainShell.get() for 3.154s

🤔 It's weird. I'll send you a version with more logs to test later
EDIT: Sorry, I'm too busy recently to debug 😢 maybe I'll be free this weekend

@nexplorer-3e
Copy link
Author

app-debug.zip Try this build? Just install the app and send me the log saved from magisk app.

magisk_log_2023-06-12T22.59.51.log

@canyie
Copy link
Collaborator

canyie commented Jun 16, 2023

🤔 Not sure how the shell get blocked

06-12 22:59:18.183  5274  5302 D BUILDER : exec su --mount-master
06-12 22:59:28.226  5274  5302 D LIBSU   : java.io.IOException: Shell check timeout
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at com.topjohnwu.superuser.internal.ShellImpl.<init>(ShellImpl.java:116)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at com.topjohnwu.superuser.internal.BuilderImpl.build(BuilderImpl.java:148)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at com.topjohnwu.superuser.internal.BuilderImpl.build(BuilderImpl.java:136)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at com.topjohnwu.superuser.internal.BuilderImpl.build(BuilderImpl.java:103)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at com.topjohnwu.superuser.internal.MainShell.get(MainShell.java:50)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at com.topjohnwu.superuser.internal.MainShell.lambda$get$1(MainShell.java:71)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at com.topjohnwu.superuser.internal.MainShell$$ExternalSyntheticLambda1.run(Unknown Source:4)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at com.topjohnwu.magisk.core.utils.DispatcherExecutor$execute$1.invokeSuspend(DispatcherExecutor.kt:24)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
06-12 22:59:28.226  5274  5302 D LIBSU   : Caused by: java.util.concurrent.TimeoutException
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at java.util.concurrent.FutureTask.get(FutureTask.java:206)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	at com.topjohnwu.superuser.internal.ShellImpl.<init>(ShellImpl.java:107)
06-12 22:59:28.226  5274  5302 D LIBSU   : 	... 15 more

@canyie canyie assigned canyie and unassigned canyie Jun 16, 2023
@canyie canyie added the needs investigation Reason of this issue is yet unkown label Jun 27, 2023
@canyie canyie self-assigned this Jun 27, 2023
@canyie
Copy link
Collaborator

canyie commented Jun 27, 2023

app-debug.zip
Sorry for the long delay... Try this build and see if it works?

@nexplorer-3e
Copy link
Author

app-debug.zip Sorry for the long delay... Try this build and see if it works?

not working.
Installation via manager outputs error:

! Process Error
! Installation Failed

via recovery it gave Unsupported Image format error. I flashed the older magisk patched boot and there are no logs (same as the normal debug variant, output some reflection warning)

@canyie
Copy link
Collaborator

canyie commented Jun 29, 2023

Maybe some other regressions I think? Does this build still show version N/A?

@nexplorer-3e
Copy link
Author

Maybe some other regressions I think? Does this build still show version N/A?

Yes.

@canyie canyie added regression Something works in previous versions but not in the current one confirmed Issue confirmed to exist and the reason is known app This issue is related to Magisk App and removed needs investigation Reason of this issue is yet unkown labels Jul 8, 2023
@canyie
Copy link
Collaborator

canyie commented Jul 21, 2023

Try artifacts from the latest CI build? https://github.com/topjohnwu/Magisk/actions/runs/5617639740

@nexplorer-3e
Copy link
Author

Try artifacts from the latest CI build? https://github.com/topjohnwu/Magisk/actions/runs/5617639740

Works. Thank you!

@nexplorer-3e
Copy link
Author

Another thing that I noticed is that the magisk cannot install by patch image in manager (saying unknown image format) when no root, it can only be installed via recovery. As the method is deprecated, more regression test is needed.

@canyie
Copy link
Collaborator

canyie commented Jul 25, 2023

Yeah, I noticed some regressions as well, and I submitted some fixes to the master branch. Retry with the latest CI build? https://github.com/topjohnwu/Magisk/actions/runs/5625739626

@nexplorer-3e
Copy link
Author

nexplorer-3e commented Jul 25, 2023

Yeah, I noticed some regressions as well, and I submitted some fixes to the master branch. Retry with the latest CI build? https://github.com/topjohnwu/Magisk/actions/runs/5625739626

Hmm, looks like I messed up my internal storage's permission which makes it not working. Anyway, boot patch method is now working.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app This issue is related to Magisk App confirmed Issue confirmed to exist and the reason is known regression Something works in previous versions but not in the current one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants