-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Bug 🐞 故障Confirmed bugs or reports that are very likely to be bugsConfirmed bugs or reports that are very likely to be bugsDoubt ❔ 疑惑Any doubts about this repositoryAny doubts about this repositoryFeedback Awaited 🕒 等待反馈Waiting for the feedback from issue creater and issue will be closed if duration is over one monthWaiting for the feedback from issue creater and issue will be closed if duration is over one month
Description
autojs.isRootAvailable()可以检查是否获得root权限。
那么shizuku呢?
我尝试
var isShizukuAble=false;
try {
shizuku("date");
isShizukuAble=true;
} catch (e) {
isShizukuAble=false;
}
if(isShizukuAble){
log('已获得Shizuku授权');
}else {
log('未获得Shizuku授权');
}
shizuku()函数能执行成功,就表示拥有shizuku权限。
但异常并不能如愿成功拦截。
没有shizuku的时候,报错:
调用方法 "shizuku" 失败: [ 缺少 Shizuku 访问权限 ]
java.lang.RuntimeException: 调用方法 "shizuku" 失败: [ 缺少 Shizuku 访问权限 ]
catch无效了!
另外,我尝试使用sui面具模块,代替shizuku给AutoJs6授权,能够授权成功。
但是依旧无法调用shizuku()函数。
Metadata
Metadata
Assignees
Labels
Bug 🐞 故障Confirmed bugs or reports that are very likely to be bugsConfirmed bugs or reports that are very likely to be bugsDoubt ❔ 疑惑Any doubts about this repositoryAny doubts about this repositoryFeedback Awaited 🕒 等待反馈Waiting for the feedback from issue creater and issue will be closed if duration is over one monthWaiting for the feedback from issue creater and issue will be closed if duration is over one month