bmax121 / APatch

The patching of Android kernel and Android system
GNU General Public License v3.0
3.48k stars 278 forks source link

adb shell使用su命令提示 /system/bin/su: No such file or directory #439

Open jecelyin opened 1 month ago

jecelyin commented 1 month ago

Please check before submitting an issue/在提交 issue 前请检查

Version requirement/版本要求

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上去

jecelyin commented 1 month ago

APatch_bugreport_2024-05-09_14_12.tar.gz

jecelyin commented 1 month ago

我把 termux 的自带的 usr 目录copy到 /data/local/tmp/下面,然后使用termux的bash命令,再调用 su 就可以了 看了一下,miui系统没有 bash命令

rayshabh commented 1 month ago

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!

On Windows: Screenshot (4)

On Termux: Screenshot_20240512-230513_Termux

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.

APatch Version: Screenshot_20240510-234840_APatch Screenshot_20240510-234852_APatch

Ai686Leo commented 1 month ago

可以使用爱玩机之类的软件让这类软件强制被自己调用root几次就好了Screenshot_2024-05-22-00-00-26-29_a5c17d2e2fb3cc7223d3ad8bda19a0b6.jpg

jkriyabd commented 2 weeks ago

still now, i am facing problem in nethunter app. not gained root access at all.