xuexiangjys / XUpdate

🚀A lightweight, high availability Android version update framework.(一个轻量级、高可用性的Android版本更新框架)
https://github.com/xuexiangjys/XUpdate/wiki
Apache License 2.0
2.32k stars 406 forks source link

ShellUtils execCommand方法报错: Cannot run program "su": error=13, Permission denied #145

Closed zhubinsheng closed 2 years ago

zhubinsheng commented 2 years ago

问题描述(必填) ShellUtils execCommand方法报错: Cannot run program "su": error=13, Permission denied

使用的XUpdate版本(必填) 最新 com.github.xuexiangjys:XUpdate:2.1.1'

如何重现(必填) 重现的步骤: 1.adb root 2.adb remount 3.adb shell setenforce 0 4 安装某apk

期望的效果 应该是高版本的手机不支持su指令,即使手机已经root aok有系统权限

截图 通过测试,如果不用su指令,便可以安装。

zhubinsheng commented 2 years ago

Screenshot from 2022-01-26 11-42-31 请看stack info

zhubinsheng commented 2 years ago

Screenshot from 2022-01-26 11-45-35 Screenshot from 2022-01-26 11-46-26

xuexiangjys commented 2 years ago

不同版本,不同平台都不太一样,框架无法做到全兼容适配. https://github.com/xuexiangjys/XUpdate/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98#9%E9%97%AE%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E8%AE%BE%E7%BD%AE%E4%BA%86isautomodetrue%E8%87%AA%E5%8A%A8%E7%89%88%E6%9C%AC%E6%9B%B4%E6%96%B0%E6%A8%A1%E5%BC%8F%E4%BD%86%E6%98%AF%E5%8D%B4%E6%97%A0%E6%B3%95%E5%81%9A%E5%88%B0%E8%87%AA%E5%8A%A8%E9%9D%99%E9%BB%98%E5%AE%89%E8%A3%85