Repository navigation
Conversation
- clearTimeout / clearInterval / clearImmediate 接受任意类型 id,非数字时安全返回 false - v6-api __globals__.js 同步参数类型声明 - GlobalAppContext 改用 getApplicationInfo 读取版本信息,避免 getPackageInfo 在部分 ROM 上抛异常
新增 RootTool.isRootGranted(),以 root 身份执行 id 判断主进程是否已获得 root 授权,用于区分「完全没有 root」和「有 root 但 Magisk 按进程名拒绝 :script」两种失败;完全无 root 的设备不再弹出误导性提示。 app 侧 AccessibilityServiceTool / AccessibilityProxyServiceImpl 的失败分支 先判断 isRootGranted();autojs 模块 AccessibilityServiceTool 只记日志, 提示统一由主进程判断。 与 setup-v7 的 ff0b5097 等价。
模板 APK 若由 Android Studio 的 Run 生成会带 android:testOnly="true", 打包产物继承后系统拒绝普通安装,报 "Failed to install test-only apk"。 在 ManifestEditor.MutableNodeImpl.onAttr() 里丢弃该属性 (AxmlWriter.NodeImpl.onAttr 只做 attrs.add,跳过无副作用)。 与 setup-v7 的 38c88917 等价。验证:真实脏模板 manifest 改写后 aapt2 dump xmltree 的 testOnly 命中数 1 -> 0,包名/版本改写仍生效。
从 setup-v7 的 7a168848 取回本 PR 范围内遗漏的修复,对应侧边栏
「媒体投影权限」与「显示在应用上层」两个开关:
- 关闭时写 default(MODE_DEFAULT=3,回落系统默认策略「每次都询问」),
不再写 ask;部分 ROM 把 ask 扩展为数值 5,标准工具显示「未知(5)」,
且会留下显式覆盖,永远回不到默认
- 用 JsonParser 结构化解析 AbstractShell.Result 的 code / result,
不再靠 result.contains("\"code\":0") 判断 shell 是否成功
- 新增 isAppOpsAllowed(stdout):逐行解析 appops get,只有 mode 恰为
allow 才算开启,default/foreground/ignore/deny/ask(5) 均为关闭,
避免包名或输出里别处的 allow 造成误判
- root 路径改为检查退出码并 destroy 进程
上游 autojs 模块已有 gson 依赖,无需新增依赖。
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 16 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
android:testOnly="true",普通安装不再报Failed to install test-only apkask模式(会被显示为「未知(5)」且无法回到默认);开关状态改为精确解析appops get结果,不再靠字符串包含判断。clearTimeout()/clearInterval()/clearImmediate()接受任意类型参数并安全转换,不再因脚本传入非数字值出错。