adb shell使用su命令提示 /system/bin/su: No such file or directory
jecelyin opened this issue · 7 comments
Please check before submitting an issue/在提交 issue 前请检查
- I have searched the issues and haven't found anything relevant/我已经搜索了 issues 列表,没有发现于本问题相关内容
- If patch failed, root failed, or device unable to boot after flashing the new boot.img. Please goto KernelPatch/修复失败或刷入修补后镜像不能启动,请前往 KernelPatch 提问
- I will upload bugreport file in APatch Manager - Settings - Report log/我会上传 bureport 文件从 APatch 管理器 - 设置 - 发送日志
- I know how to reproduce the issue which may not be specific to my device/我知道如何重新复现这个问题
Version requirement/版本要求
- I am using latest CI version of APatch/我正在使用最新 CI 版本
Describe the bug/描述 bug
adb shell 之后,死活拿不到root,其他应用可以正常root
lime:/ $ su
/system/bin/sh: /system/bin/su: No such file or directory
Reproduce method/复现方法
已经试过unchecked com.android.shell 重启系统后再checked,然后adb shell 还是不行
Expected behavior/预期行为
如何做可以正常su,ls查看 /system/bin/su 是存在的
Actual behaviour /实际行为
/system/bin/sh: /system/bin/su: No such file or directory
Screenshots/截图
No response
Logs/日志
No response
Device Name/设备名称
Redmi Note 9 4G
OS Version/系统版本
12
APatch Version/APatch 版本
10763
Kernel Version/内核版本
4.19.157
KernelPatch Version/KernelPatch 版本
0.10.7
Additional context/其他信息
boot.img是通过Manager应用右上角Patch得到新的boot.img然后fastboot flash boot上去
我把 termux 的自带的 usr 目录copy到 /data/local/tmp/下面,然后使用termux的bash命令,再调用 su 就可以了
看了一下,miui系统没有 bash命令
boot.img是通过Manager应用右上角Patch得到新的boot.img然后fastboot flash boot上去
I'm facing the same issue. Below are the screenshots while performing su
command on both Windows Terminal and Termux Terminal.
Note: com.android.shell
is given superuser privileges via APatch!
What I know about APatch is that it uses good features of both KernelSU and Magisk. I also know that KernelSU tricks the shell into thinking that /system/bin/su
exists on the device when it is not. KernelSU does allow su
to work in adb shell
, but APatch cannot.
still now, i am facing problem in nethunter app. not gained root access at all.
same issue for me, when i give root access it give no such directory
i have the same issue. I've checked /system/bin
directory but there's no su
binary there. i tried /storage/emulated/0/su
as su
path but still it doesn't generate. if i name the su
binary to already existing directory it works. (for example /system/bin
removes the /system/bin/
folder and replaces with a bin
binary)
[18360.176997] [+] KP I su_reset_path: /system/bin/su
[18360.403219] IRQ6 no longer affine to CPU4
[18361.420778] type=1400 audit(1725793363.022:309): avc: denied { search } for comm="libkpatch.so" name="tests" dev="mmcblk0p89" ino=1474564 scontext=u:r:untrusted_app:s0:c190,c256,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=me.bmax.apatch
[18361.421231] type=1400 audit(1725793363.022:310): avc: denied { search } for comm="libkpatch.so" name="tests" dev="mmcblk0p89" ino=1474564 scontext=u:r:untrusted_app:s0:c190,c256,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=me.bmax.apatch
[18361.421330] type=1400 audit(1725793363.022:311): avc: denied { search } for comm="libkpatch.so" name="tests" dev="mmcblk0p89" ino=1474564 scontext=u:r:untrusted_app:s0:c190,c256,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=me.bmax.apatch
[18361.421413] type=1400 audit(1725793363.022:312): avc: denied { search } for comm="libkpatch.so" name="tests" dev="mmcblk0p89" ino=1474564 scontext=u:r:untrusted_app:s0:c190,c256,c512,c768 tcontext=u:object_r:shell_test_data_file:s0 tclass=dir permissive=0 app=me.bmax.apatch
[18361.436995] [+] KP I commit_su: pid: 31197, tgid: 972, to_uid: 0, sctx: u:r:magisk:s0, via_hook: 0
i've found this in dmesg output which seems to be causing the error.