我是靠谱客的博主 重要老鼠,这篇文章主要介绍autojs永久开启无障碍,现在分享给大家,希望可以做个参考。

/*
* @Author: 麒麟
* @Date: 2021-09-30 11:14:54
* @LastEditTime: 2021-09-30 20:06:45
* @LastEditors: DESKTOP-K37CL87
* @Description: In User Settings Edit
* @FilePath: autojs麒麟社-晋级课程自启无障碍不掉线.js
* 使用方法 电脑点击手机开启USB链接 使用adb
//授权方法:开启usb调试并使用adb工具连接手机,执行 adb shell pm grant org.autojs.autojspro android.permission.WRITE_SECURE_SETTING
* adb devices 查看设备
*/
importClass(android.content.Context);
importClass(android.provider.Settings);
try {
var enabledServices = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES);
// toastLog('启用的是', enabledServices);
var Services = enabledServices + ":org.autojs.autojspro/com.stardust.autojs.core.accessibility.AccessibilityService";
Settings.Secure.putString(context.getContentResolver(), Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, Services);
Settings.Secure.putString(context.getContentResolver(), Settings.Secure.ACCESSIBILITY_ENABLED, '1');
toastLog("成功开启AutoJS的辅助服务");
} catch (error) {
toastLog("请给与adb权限", error);
}

最后

以上就是重要老鼠最近收集整理的关于autojs永久开启无障碍的全部内容,更多相关autojs永久开启无障碍内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(103)

评论列表共有 0 条评论

立即
投稿
返回
顶部