-
Notifications
You must be signed in to change notification settings - Fork 378
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
adb shell使用su命令提示 /system/bin/su: No such file or directory #439
Comments
我把 termux 的自带的 usr 目录copy到 /data/local/tmp/下面,然后使用termux的bash命令,再调用 su 就可以了 |
I'm facing the same issue. Below are the screenshots while performing 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 |
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 [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. |
一样的问题 |
FYI:
I (first) patched the boot image in my Ofox backup with APatch app and flashed it with fastboot. If I entered the Superuser tab, I got a spinner, I waited a long time, but it did not finish. As I am impatient (sometimes), I tried adb in the meantime. with kp configured (this was the default)
I noticed that KMP was not installed, so I thought, that could eventually be a reason (despite nobody says something similar, as far as I read). So I patched boot again, but this time directly in APatch app.
as a conclusion from this alone:
NeoBackup vs KSU vs vs su/kp Some time ago we had several users that tried to use NeoBackup with KSU (!) and other unusual root solutions. For such situations, I recently changed the whole behavior of NeoBackup to use piping commands into a suCommand that is configurable (to really work, you need my test builds, called pumpkins, from telegram group). this does two things, become root and enter the mount namespace of init process. Lately, we had several users that tried to use NeoBackup with APatch. So, I investigate how APatch works. I see, that kp can not take a command line. For quick commands, this is quite slow. Also, I am quite sure there are a lot of apps that also use (some) su commands with parameters. Even before KSU, su implementations varied according to the way they interpret the command line (poor design about quoting, escaping etc.). So more complicated command lines are usually piped into su. |
I wondered, why termux can execute su and gets root, but still cannot access /system/bin/su. Well, (my?) connectbot uses I tried The main difference may be that exec replaces the current process (and keeps it's rights etc.) and without exec it's a new process.
one step further and even more interesting...the first semicolon seems to terminate the command line:
the same command without exec, in APatch:
in KernelSU:
|
with this new knowledge NeoBackup can now use:
but still three sh or su to start |
It seems weird that my connectbot root@localhost config is configured with [EDIT: I just used exec, to end the connection, when the shell is left, instead of dropping out to an unprivileged shell] It maybe that I had this problem in the past (long ago) with another su... Is it possible, that your su code is from old origins? |
I installed APatch_10763-244-g68e6ead_11007-release-signed.apk from APatch_ci telegram group. With this version almost all problems are solved. NeoBackup can use it's normal procedure, using the default: I can use in adb:
It could be argued, that it should not be readable. I would only expect, that it can be executed. I wondered if selinux forbids reading, but selinux context cannot be shown by ls:
also According to #734 a main change happened before 10979... |
Please check before submitting an issue/在提交 issue 前请检查
Version requirement/版本要求
Describe the bug/描述 bug
adb shell 之后,死活拿不到root,其他应用可以正常root
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上去
The text was updated successfully, but these errors were encountered: