From 2f0f4b97029de0b7da34a0f0ca8442be8fa8cc76 Mon Sep 17 00:00:00 2001 From: herry Date: Sat, 14 Nov 2026 13:25:37 +0800 Subject: [PATCH] =?UTF-8?q?feat(rtos):=20=E9=A6=96=E6=AC=A1=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=89=8B=E6=9C=BA=E7=9C=9F=E6=9C=BA=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E6=A1=A5=E4=B8=8ES2=E6=8E=A2=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 4 + .gitignore | 16 + CHANGELOG.md | 5 + LICENSE | 131 ++++++ NOTICE.md | 11 + PUBLIC_SOURCE_MANIFEST.json | 68 +++ README.md | 171 +++++++ build-rtos-game.ps1 | 81 ++++ com.sydxky.rtos.deviceprobe/.gitignore | 1 + com.sydxky.rtos.deviceprobe/LICENSE | 131 ++++++ com.sydxky.rtos.deviceprobe/README.md | 20 + com.sydxky.rtos.deviceprobe/build.ps1 | 2 + com.sydxky.rtos.deviceprobe/glyphix.config.js | 1 + com.sydxky.rtos.deviceprobe/src/app.js | 6 + .../src/assets/icon.png | Bin 0 -> 2164 bytes com.sydxky.rtos.deviceprobe/src/main/index.ux | 70 +++ com.sydxky.rtos.deviceprobe/src/manifest.json | 10 + .../tests/screen-lifecycle.cjs | 85 ++++ docs/ARCHITECTURE.md | 29 ++ docs/BUILD.md | 18 + docs/PRIVACY.md | 11 + docs/VALIDATION.md | 57 +++ docs/images/S2-1.0.4-idle-baseline.jpg | Bin 0 -> 19991 bytes docs/images/S2-1.0.4-idle-recheck.jpg | Bin 0 -> 19991 bytes docs/images/S2-1.0.4-manual-tap.jpg | Bin 0 -> 19990 bytes docs/validation.json | 138 ++++++ phone-debug-bridge/.gitignore | 6 + phone-debug-bridge/LICENSE | 131 ++++++ phone-debug-bridge/NOTICE.md | 11 + phone-debug-bridge/README.md | 155 +++++++ phone-debug-bridge/app/build.gradle | 17 + .../app/src/main/AndroidManifest.xml | 19 + .../com/sydxky/rtos/bridge/BridgeService.java | 53 +++ .../java/com/sydxky/rtos/bridge/Journal.java | 60 +++ .../java/com/sydxky/rtos/bridge/LocalApi.java | 159 +++++++ .../com/sydxky/rtos/bridge/MainActivity.java | 105 +++++ .../sydxky/rtos/bridge/UiToolsActivity.java | 150 +++++++ .../com/sydxky/rtos/bridge/WearEngine.java | 241 ++++++++++ .../app/src/main/res/drawable/ic_bridge.xml | 6 + .../main/res/xml/data_extraction_rules.xml | 4 + phone-debug-bridge/bridge.py | 196 ++++++++ phone-debug-bridge/build.gradle | 1 + phone-debug-bridge/build.ps1 | 19 + .../examples/probe-inspector.json | 8 + phone-debug-bridge/gradle.properties | 2 + .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59203 bytes .../gradle/wrapper/gradle-wrapper.properties | 8 + phone-debug-bridge/gradlew.bat | 91 ++++ phone-debug-bridge/settings.gradle | 7 + phone-debug-bridge/tests/native_ui.py | 98 ++++ phone-debug-bridge/tests/test_client.py | 117 +++++ phone-debug-bridge/tests/test_ui.py | 118 +++++ phone-debug-bridge/tests/test_verify.py | 38 ++ .../third_party/Gradle-LICENSE.txt | 421 ++++++++++++++++++ .../third_party/oppo-watch-s-sideload-MIT.txt | 21 + phone-debug-bridge/ui.py | 397 +++++++++++++++++ phone-debug-bridge/verify.py | 136 ++++++ third_party/Gradle-LICENSE.txt | 421 ++++++++++++++++++ third_party/oppo-watch-s-sideload-MIT.txt | 21 + 59 files changed, 4303 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 CHANGELOG.md create mode 100644 LICENSE create mode 100644 NOTICE.md create mode 100644 PUBLIC_SOURCE_MANIFEST.json create mode 100644 README.md create mode 100644 build-rtos-game.ps1 create mode 100644 com.sydxky.rtos.deviceprobe/.gitignore create mode 100644 com.sydxky.rtos.deviceprobe/LICENSE create mode 100644 com.sydxky.rtos.deviceprobe/README.md create mode 100644 com.sydxky.rtos.deviceprobe/build.ps1 create mode 100644 com.sydxky.rtos.deviceprobe/glyphix.config.js create mode 100644 com.sydxky.rtos.deviceprobe/src/app.js create mode 100644 com.sydxky.rtos.deviceprobe/src/assets/icon.png create mode 100644 com.sydxky.rtos.deviceprobe/src/main/index.ux create mode 100644 com.sydxky.rtos.deviceprobe/src/manifest.json create mode 100644 com.sydxky.rtos.deviceprobe/tests/screen-lifecycle.cjs create mode 100644 docs/ARCHITECTURE.md create mode 100644 docs/BUILD.md create mode 100644 docs/PRIVACY.md create mode 100644 docs/VALIDATION.md create mode 100644 docs/images/S2-1.0.4-idle-baseline.jpg create mode 100644 docs/images/S2-1.0.4-idle-recheck.jpg create mode 100644 docs/images/S2-1.0.4-manual-tap.jpg create mode 100644 docs/validation.json create mode 100644 phone-debug-bridge/.gitignore create mode 100644 phone-debug-bridge/LICENSE create mode 100644 phone-debug-bridge/NOTICE.md create mode 100644 phone-debug-bridge/README.md create mode 100644 phone-debug-bridge/app/build.gradle create mode 100644 phone-debug-bridge/app/src/main/AndroidManifest.xml create mode 100644 phone-debug-bridge/app/src/main/java/com/sydxky/rtos/bridge/BridgeService.java create mode 100644 phone-debug-bridge/app/src/main/java/com/sydxky/rtos/bridge/Journal.java create mode 100644 phone-debug-bridge/app/src/main/java/com/sydxky/rtos/bridge/LocalApi.java create mode 100644 phone-debug-bridge/app/src/main/java/com/sydxky/rtos/bridge/MainActivity.java create mode 100644 phone-debug-bridge/app/src/main/java/com/sydxky/rtos/bridge/UiToolsActivity.java create mode 100644 phone-debug-bridge/app/src/main/java/com/sydxky/rtos/bridge/WearEngine.java create mode 100644 phone-debug-bridge/app/src/main/res/drawable/ic_bridge.xml create mode 100644 phone-debug-bridge/app/src/main/res/xml/data_extraction_rules.xml create mode 100644 phone-debug-bridge/bridge.py create mode 100644 phone-debug-bridge/build.gradle create mode 100644 phone-debug-bridge/build.ps1 create mode 100644 phone-debug-bridge/examples/probe-inspector.json create mode 100644 phone-debug-bridge/gradle.properties create mode 100644 phone-debug-bridge/gradle/wrapper/gradle-wrapper.jar create mode 100644 phone-debug-bridge/gradle/wrapper/gradle-wrapper.properties create mode 100644 phone-debug-bridge/gradlew.bat create mode 100644 phone-debug-bridge/settings.gradle create mode 100644 phone-debug-bridge/tests/native_ui.py create mode 100644 phone-debug-bridge/tests/test_client.py create mode 100644 phone-debug-bridge/tests/test_ui.py create mode 100644 phone-debug-bridge/tests/test_verify.py create mode 100644 phone-debug-bridge/third_party/Gradle-LICENSE.txt create mode 100644 phone-debug-bridge/third_party/oppo-watch-s-sideload-MIT.txt create mode 100644 phone-debug-bridge/ui.py create mode 100644 phone-debug-bridge/verify.py create mode 100644 third_party/Gradle-LICENSE.txt create mode 100644 third_party/oppo-watch-s-sideload-MIT.txt diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..af3f2f0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +* text=auto eol=lf +*.png binary +*.jpg binary +*.jar binary diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5cce5b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +**/.gradle/ +**/build/ +**/.glyphix-work/ +**/__pycache__/ +**/*.local.json +**/local.properties +**/artifacts/ +**/*.jks +**/*.keystore +**/*.p12 +**/*.pem +**/connection.local.json +temp/ +work/ +downloads/ +!phone-debug-bridge/gradle/wrapper/gradle-wrapper.jar diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d8e2d5c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# 0.2.0(探针 1.0.4) + +首次独立源码发布,PolyForm Noncommercial 1.0.0。包含手机回环认证桥、Binder 262/263 适配、PC 查询/安装/日志/作业工具、官方健康截屏、图片导入预览与校验导出、明确目标的 UI 工具及圆/方探针。 + +1.0.4 增加前台 wakeScreenOn 续期,修复 1.0.3 在本台 S2 的常亮失败。至少 159 秒无触摸静置及用户实体亮屏观察通过,手动计数 0→1 已截图。未取得通用真机遥控、Inspector 隧道、稳定远程前台启动或 JS console 标记。软件及设备证据见 docs/VALIDATION.md。 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1a71cb6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,131 @@ +# PolyForm Noncommercial License 1.0.0 + + + +## Acceptance + +In order to get any license under these terms, you must agree +to them as both strict obligations and conditions to all +your licenses. + +## Copyright License + +The licensor grants you a copyright license for the +software to do everything you might do with the software +that would otherwise infringe the licensor's copyright +in it for any permitted purpose. However, you may +only distribute the software according to [Distribution +License](#distribution-license) and make changes or new works +based on the software according to [Changes and New Works +License](#changes-and-new-works-license). + +## Distribution License + +The licensor grants you an additional copyright license +to distribute copies of the software. Your license +to distribute covers distributing the software with +changes and new works permitted by [Changes and New Works +License](#changes-and-new-works-license). + +## Notices + +You must ensure that anyone who gets a copy of any part of +the software from you also gets a copy of these terms or the +URL for them above, as well as copies of any plain-text lines +beginning with `Required Notice:` that the licensor provided +with the software. For example: + +> Required Notice: Copyright Yoyodyne, Inc. (http://example.com) + +## Changes and New Works License + +The licensor grants you an additional copyright license to +make changes and new works based on the software for any +permitted purpose. + +## Patent License + +The licensor grants you a patent license for the software that +covers patent claims the licensor can license, or becomes able +to license, that you would infringe by using the software. + +## Noncommercial Purposes + +Any noncommercial purpose is a permitted purpose. + +## Personal Uses + +Personal use for research, experiment, and testing for +the benefit of public knowledge, personal study, private +entertainment, hobby projects, amateur pursuits, or religious +observance, without any anticipated commercial application, +is use for a permitted purpose. + +## Noncommercial Organizations + +Use by any charitable organization, educational institution, +public research organization, public safety or health +organization, environmental protection organization, +or government institution is use for a permitted purpose +regardless of the source of funding or obligations resulting +from the funding. + +## Fair Use + +You may have "fair use" rights for the software under the +law. These terms do not limit them. + +## No Other Rights + +These terms do not allow you to sublicense or transfer any of +your licenses to anyone else, or prevent the licensor from +granting licenses to anyone else. These terms do not imply +any other licenses. + +## Patent Defense + +If you make any written claim that the software infringes or +contributes to infringement of any patent, your patent license +for the software granted under these terms ends immediately. If +your company makes such a claim, your patent license ends +immediately for work on behalf of your company. + +## Violations + +The first time you are notified in writing that you have +violated any of these terms, or done anything with the software +not covered by your licenses, your licenses can nonetheless +continue if you come into full compliance with these terms, +and take practical steps to correct past violations, within +32 days of receiving notice. Otherwise, all your licenses +end immediately. + +## No Liability + +***As far as the law allows, the software comes as is, without +any warranty or condition, and the licensor will not be liable +to you for any damages arising out of these terms or the use +or nature of the software, under any kind of legal claim.*** + +## Definitions + +The **licensor** is the individual or entity offering these +terms, and the **software** is the software the licensor makes +available under these terms. + +**You** refers to the individual or entity agreeing to these +terms. + +**Your company** is any legal entity, sole proprietorship, +or other kind of organization that you work for, plus all +organizations that have control over, are under the control of, +or are under common control with that organization. **Control** +means ownership of substantially all the assets of an entity, +or the power to direct its management and policies by vote, +contract, or otherwise. Control can be direct or indirect. + +**Your licenses** are all the licenses granted to you for the +software under these terms. + +**Use** means anything you do with the software requiring one +of your licenses. diff --git a/NOTICE.md b/NOTICE.md new file mode 100644 index 0000000..23a9dae --- /dev/null +++ b/NOTICE.md @@ -0,0 +1,11 @@ +# 版权、许可与参考 + +Required Notice: Copyright 2026 herry / sydxky (https://git2.sydxky.cn/sydxky/rtos-watch-debug-bridge) + +本项目自研手机桥、PC 工具、配套探针及文档以 [PolyForm Noncommercial 1.0.0](LICENSE) 提供。允许许可条款覆盖的非商业用途、修改及分发;商业用途须另获许可。分发时保留许可全文与 Required Notice。准确权限和例外以英文许可全文为准,不将第三方原有许可改为本许可。 + +参考 [chengchengking/oppo-watch-s-sideload](https://github.com/chengchengking/oppo-watch-s-sideload),本地参考版本 `162fca4aa51302e18ee9802dc5269e54814c02e8`。Binder 协议和工具为本工程实现;前台亮屏续期参考其公开用法。保留上游 Copyright (c) 2026 chengchengking 及完整 [MIT 许可](third_party/oppo-watch-s-sideload-MIT.txt)。不分发其助手 APK 或反编译结果。 + +Gradle Wrapper 是第三方构建工具,按其原有 Apache-2.0 及随附第三方条款提供,见 [Gradle 许可全文](third_party/Gradle-LICENSE.txt)。Gradle、Android Gradle Plugin、Android SDK/JDK、Glyphix SDK/运行时各自适用其许可;除 Wrapper 外,本项目不打包这些工具。 + +开发图标沿用作者工作区的贪吃蛇应用资源,作为本项目探针开发资源提供。Glyphix 文档、OPPO 运动健康、设备及相关商标属于各自权利人。本项目为独立调试工具,不表示设备厂商或上游作者背书;不包含厂商 SDK、运动健康 APK、配对资料、令牌、私有签名密钥或内部 Git 历史。 diff --git a/PUBLIC_SOURCE_MANIFEST.json b/PUBLIC_SOURCE_MANIFEST.json new file mode 100644 index 0000000..d761482 --- /dev/null +++ b/PUBLIC_SOURCE_MANIFEST.json @@ -0,0 +1,68 @@ +{ + "project": "RTOS Watch Debug Bridge", + "version": "0.2.0", + "probe": "1.0.4", + "license": "PolyForm-Noncommercial-1.0.0", + "independent_history": true, + "sensitive_findings": [], + "files": { + ".gitignore": "4cbafe661a8261c06b3a7bc95405c574f07c0090697176ec04f8fb0d7bb14e7f", + "CHANGELOG.md": "de8109c1530dd0ccf1a014ee9048ae259e72f9cf04255019a1c638365374a2f9", + "LICENSE": "ffcca38841adb694b6f380647e15f17c446a4d1656fed51a1e2041d064c94cc8", + "NOTICE.md": "0eaa82a4eb8e84b7d89e1e0279815c98dc232565a914ed2f29bab6fc424bbf54", + "README.md": "a458838ca35d3a30363c1da620e9fbf5a81f5ad90a9df2b5a15a4971a8033199", + "build-rtos-game.ps1": "207ff9875af96221559f314364c932fe37bfc22c698ad1afabb9aeec40a8679e", + "com.sydxky.rtos.deviceprobe/.gitignore": "3fc9fbb6fa7795f07ed0f60fe5e3f900e17ea77a793493ef2a3ef582de5fe572", + "com.sydxky.rtos.deviceprobe/LICENSE": "ffcca38841adb694b6f380647e15f17c446a4d1656fed51a1e2041d064c94cc8", + "com.sydxky.rtos.deviceprobe/README.md": "be00b351472bdbb3566508b1c189a0e400dc3313ef16a6fe3ae4eb3eaf3230f7", + "com.sydxky.rtos.deviceprobe/build.ps1": "4a9e503fb14e0de09fa5297c37d0b68850de9463adaadfb46e9332d6625d124d", + "com.sydxky.rtos.deviceprobe/glyphix.config.js": "c7e2b3af659b18c9dc82377fd31dbb1d0f49c232bed2508e7f8ad82e7b3d216e", + "com.sydxky.rtos.deviceprobe/src/app.js": "b892392748f9b4ee66f146364676baa1bb443502b1beaeaaa9b952798c70b2e6", + "com.sydxky.rtos.deviceprobe/src/assets/icon.png": "503c979d3a45ceb0643c279e2e8d67bea67bd17b38bc4f3007094f570113967b", + "com.sydxky.rtos.deviceprobe/src/main/index.ux": "282c7ea96fb9a58ec695bd70e57f2c519218b53057611e3ecb342a86da027bc7", + "com.sydxky.rtos.deviceprobe/src/manifest.json": "338ea23d4271f1e67a8469d9f2df2343d87bbd26df648722da911a16e95bf3cc", + "com.sydxky.rtos.deviceprobe/tests/screen-lifecycle.cjs": "823c6bf1c7e7b514648bb9e2b6c2124f13ef62efcb3e7210e9fd7ce1deecc715", + "docs/ARCHITECTURE.md": "49214e342482b870fa69da4457295904d0abe199dd8f961e4d465dd9b2274904", + "docs/BUILD.md": "3f1b7050a51ab2fe129922d5ff659b4e3e05a54649b3cc59ce879b9e6fcc309c", + "docs/PRIVACY.md": "180601f2f4925dc9bfd2508d12786e0a2bf2d23ea364a7fe58791bc4d6cfc1bb", + "docs/VALIDATION.md": "f915064457ce5680ceec773100931c94a7366602d0e95864206b43c2b026c6e2", + "docs/images/S2-1.0.4-idle-baseline.jpg": "b46fd339dcee4d6ba5406c98847867a6f50f89a64f605cada383125ee6c1c13a", + "docs/images/S2-1.0.4-idle-recheck.jpg": "b46fd339dcee4d6ba5406c98847867a6f50f89a64f605cada383125ee6c1c13a", + "docs/images/S2-1.0.4-manual-tap.jpg": "4e0eacffaefef868382d8d92db2f07864090306f9b3d61114d3cbc9630783aab", + "docs/validation.json": "e57b88b1fed602f4f4e7db9fe52f61ad5c209d53ec7c9646f2356b9d557cd819", + "phone-debug-bridge/.gitignore": "0a8d360b9b497252e065ab7e2fdceb94d2735549d264a3edf112897542b5fddd", + "phone-debug-bridge/LICENSE": "ffcca38841adb694b6f380647e15f17c446a4d1656fed51a1e2041d064c94cc8", + "phone-debug-bridge/NOTICE.md": "0eaa82a4eb8e84b7d89e1e0279815c98dc232565a914ed2f29bab6fc424bbf54", + "phone-debug-bridge/README.md": "9371b82f67abbf474e14fe713367f747bbce27073258f7f9685adec169932825", + "phone-debug-bridge/app/build.gradle": "668cfef7d332c5f428ba2ff56a6dc4a1b0d0c3950bddc7b22411d5d4579364a0", + "phone-debug-bridge/app/src/main/AndroidManifest.xml": "c49aa75bd964369eb56d680cd9430a4cbc43e32cc96030276aabc352cbed130a", + "phone-debug-bridge/app/src/main/java/com/sydxky/rtos/bridge/BridgeService.java": "dd7e5246630bed70cd390219b87780298691da46b369fd4d55629d82acd46bcd", + "phone-debug-bridge/app/src/main/java/com/sydxky/rtos/bridge/Journal.java": "6e47206f897d6f9f43a174cb3b0dfd90dbc5539b81dd3213494b88446606e991", + "phone-debug-bridge/app/src/main/java/com/sydxky/rtos/bridge/LocalApi.java": "af731a7cdc91536ec78e1eeb3ddf50f0b8d5a090d2ff5323d18f14422fa7d5c7", + "phone-debug-bridge/app/src/main/java/com/sydxky/rtos/bridge/MainActivity.java": "7a3888d57a09c719cdd4316135d4c3da1ff47a273e321ac55be87b1ec086fb1a", + "phone-debug-bridge/app/src/main/java/com/sydxky/rtos/bridge/UiToolsActivity.java": "9146e1dd1d51a4af0f5ae85af57e72c255514311d4313e5fce8c22d01869f75f", + "phone-debug-bridge/app/src/main/java/com/sydxky/rtos/bridge/WearEngine.java": "36910c95e310c3e6b7e4ab27a6d0216ddeabeee3d9a351614c67668da08e4c1e", + "phone-debug-bridge/app/src/main/res/drawable/ic_bridge.xml": "f09152b6b4da93220829473cbce6bb5a8364e585d1ea899a0b16f5e28ea2bb5d", + "phone-debug-bridge/app/src/main/res/xml/data_extraction_rules.xml": "ec0f1c6431c2434ac85c7933dd0fe21c430e9601ec4db70d0112557cbebf9993", + "phone-debug-bridge/bridge.py": "b940cf000dc9619f50ac59a44fc3fa60aedee6127b25288c05114a5f1c9a599c", + "phone-debug-bridge/build.gradle": "de886547be160389c21b4d01d6584abd662e751da42d6bc10b5e7e1d12f64d0e", + "phone-debug-bridge/build.ps1": "a00ddde57bc932146f62fd307204c6babde7a5847eae0690135214f26a913471", + "phone-debug-bridge/examples/probe-inspector.json": "8385a334b15d0cbbb45b1507318ca82bc7cdaeee569abd19e1b68fb826136fb0", + "phone-debug-bridge/gradle.properties": "29602ce1e53b5477d1746258b44e370a09735415abdab1d92de86d0201456f45", + "phone-debug-bridge/gradle/wrapper/gradle-wrapper.jar": "e996d452d2645e70c01c11143ca2d3742734a28da2bf61f25c82bdc288c9e637", + "phone-debug-bridge/gradle/wrapper/gradle-wrapper.properties": "e9cedbd5a065eb2c1319cbf50f9eb38871ff957598dffa0d9cf822825a4e6287", + "phone-debug-bridge/gradlew.bat": "0e82fa239f8f4dca4efc83863c16c3b143cb6faab6f50cbefab4ee0bd03e5b5f", + "phone-debug-bridge/settings.gradle": "739bd191eff46009c1ac5b9ab73d523c544d90e36d333f3e222dcc75471efb92", + "phone-debug-bridge/tests/native_ui.py": "3f65b708a1da0a405afa2a0cb767f4af3ad2fc753e6a7cbd793eb93630cd7763", + "phone-debug-bridge/tests/test_client.py": "70ab60e2efa727f7ce351f77c0eae191a29c9bfd7946b90d5a29e3249a74adc7", + "phone-debug-bridge/tests/test_ui.py": "ec9f01413a06eb5bbd3564e9737f18d8f4c936c8a8bf73e24395a013f2e63449", + "phone-debug-bridge/tests/test_verify.py": "29facb49689a41790dad1e31284f2d8b91369cf97d6a3395ff56dc0bb6e4ed16", + "phone-debug-bridge/third_party/Gradle-LICENSE.txt": "9536d88ea948603d18e232a13f5958d67807cd80828036b082bff171d2cf0703", + "phone-debug-bridge/third_party/oppo-watch-s-sideload-MIT.txt": "be0683b824ae7ed6444427c322f6b77ee42e113ef2e88e6240e1557442fac519", + "phone-debug-bridge/ui.py": "556d108aa3ebc88debc7ac5f72d432ccc4c7f9f36a5dce6b67199516a98f26eb", + "phone-debug-bridge/verify.py": "00f172339e389c4529ca2f6a901cb5b636348d534a472e00c5e782eca3bb5ce2", + "third_party/Gradle-LICENSE.txt": "9536d88ea948603d18e232a13f5958d67807cd80828036b082bff171d2cf0703", + "third_party/oppo-watch-s-sideload-MIT.txt": "be0683b824ae7ed6444427c322f6b77ee42e113ef2e88e6240e1557442fac519", + ".gitattributes": "b417160239022500ff4070f251d4701b745c5c545996c82dfdfc2b46d001df5b" + } +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..98ded85 --- /dev/null +++ b/README.md @@ -0,0 +1,171 @@ +# RTOS 手表真机调试桥 + +通过 Android 手机上已配对的 Wear Engine 服务,让电脑安装 Glyphix 手表应用、查询设备、采集官方截图,并开展有证据的 UI 验证。适合已经拥有合法配对设备、希望反复安装和验收自己手表应用的开发者。 + +**源码公开 · PolyForm Noncommercial 1.0.0 · 仅限许可允许的非商业用途。** 商业用途须另获许可。完整条款见 [LICENSE](LICENSE),版权及第三方条款见 [NOTICE.md](NOTICE.md)。 + +当前发布:**手机桥 0.2.0 / versionCode 3**,配套探针 **1.0.4 / 10004**。这是开发测试版,APK 安装到手机;手表安装 `bundle.pkg`。已测组合为 P30PRO + OPPO Watch S2 / OWW265,其他型号和固件需自行验收。 + +![S2 实体手动点击后的官方截图](docs/images/S2-1.0.4-manual-tap.jpg) + +上图是 S2 官方截屏导出,用户手动触摸后计数变为 1;画面中的“待实测”是每次运行的请求状态文案。本次另外完成了实体观察:无触摸静置至少 159 秒后仍亮屏。两者均不能替代通用远程输入验证。 + +## 下载和反馈 + +- [发布页:APK、探针包、源码与完整工具包](https://git2.sydxky.cn/sydxky/rtos-watch-debug-bridge/releases) +- [已有问题与建议](https://git2.sydxky.cn/sydxky/rtos-watch-debug-bridge/issues) +- [免注册提交问题与建议](https://git2.sydxky.cn/feedback/sydxky/rtos-watch-debug-bridge) +- [完整操作说明](phone-debug-bridge/README.md) · [真机验收记录](docs/VALIDATION.md) · [隐私与安全](docs/PRIVACY.md) + +Git2 允许免登录浏览、克隆和下载,当前关闭注册,由所有者维护代码与发行版。 + +```powershell +git clone https://git2.sydxky.cn/sydxky/rtos-watch-debug-bridge.git +cd rtos-watch-debug-bridge +``` + +## 工作方式 + +```mermaid +flowchart TD + PC[电脑 bridge.py / ui.py] -->|已授权 ADB forward| APK[手机调试桥:回环认证 API] + APK -->|bindService + Binder.transact| WE[手机运动健康 Wear Engine] + WE -->|厂商配对传输| WATCH[S2 / Glyphix 应用] + PC -->|正常导航手机健康 UI| SHOT[官方手表截屏并导出] +``` + +RTOS 手表不需要 Android ADB。手机必须先在受支持的官方配套应用中正常配对,桥接工具不会替你完成配对,也不会绕过系统安装确认或厂商消息授权。 + +## 能力与实测范围 + +| 能力 | 当前结果 | +| --- | --- | +| 手机 APK 安装、回读 hash、Binder 绑定 | P30PRO 已通过 | +| 等待手表上线、查询型号及运行时版本 | S2 已通过;OWW265 / runtime 0.8.0-5 | +| Glyphix 应用检查、安装 | S2 探针 1.0.4 已实装,回调成功并显示实际页面 | +| 官方手表截屏 | 电脑导航健康界面并导出 480×464 JPEG,已通过 | +| 图片导入、原比例预览、安全区辅助线、PNG 导出校验 | 手机已通过 | +| 手表探针手动触摸 | 官方截图确认计数 0→1,已通过 | +| 探针内前台调试常亮 | 1.0.4 静置至少 159 秒后,截图及用户实体观察通过 | +| 手机控件树、点击、滑动和步骤报告 | 支持,作用于 Android 手机 | +| Inspector 控件检查、点击和截图 | 圆/方原生模拟器通过;真机隧道尚未打通 | +| S2 通用远程点击/滑动 | 尚未打通 | +| 远程打开手表应用到前台 | 回调 200 仍可能停在表盘,目前需手动从图标进入 | +| READY/TAP JS console、自动测试 RPC | 未通过;部分 RPC 返回 3000 | +| 消息和文件互联 | 需要匹配 appId/license,默认 test/test 不构成授权 | + +`phone`、`watch-health`、`watch-import`、`inspector` 必须显式选择,避免把手机或模拟器结果误认为 S2 真机证据。 + +## 开始使用 + +准备 Windows PowerShell 7、Python 3(标准库即可)、Android platform-tools,并将 `adb` 放入 PATH。先把 P30PRO 与 S2 在运动健康中正常配对,解锁手机并让手表唤醒。 + +1. 从发布页下载 APK,安装到 **Android 手机**;华为手机可能需要本机点击“继续安装”。 +2. 在手机开启并授权 USB 调试,运行 `adb devices -l`,确认手机序列号。也可使用自己已授权的网络 ADB;地址会变化。 +3. 打开运动健康,等待手表连接。多设备环境始终指定手机 `--serial`。 +4. 在仓库的 `phone-debug-bridge` 目录运行: + +```powershell +$phone = 'YOUR_PHONE_SERIAL' +adb -s $phone install -r '..\downloads\RTOS-Phone-Bridge-0.2.0-debug.apk' +python bridge.py --serial $phone connect +python bridge.py --serial $phone wait-link --seconds 45 +python bridge.py --serial $phone info +python ui.py --target watch-health --serial $phone screenshot --output artifacts/s2.jpg +``` + +将示例 APK 路径改为自己的实际下载位置。也可用 `bridge.py setup --apk <文件>` 安装并启动桥。手机上仅监听 `127.0.0.1:18765`,PC 经 `adb forward` 访问,令牌由工具通过已授权 ADB 读取,不需要手动复制。 + +### 安装并验证探针 + +解压发行版 `S2-DeviceProbe-1.0.4-dist.zip`,保留每种屏幕完整的 `bundle.pkg`、`manifest.json`、`icon.png`。S2 本轮使用圆屏配置: + +```powershell +python bridge.py --serial $phone install '..\downloads\dist\generic-watch-466x466-quickapp\com.sydxky.rtos.deviceprobe\bundle.pkg' +python bridge.py --serial $phone check com.sydxky.rtos.deviceprobe +python bridge.py --serial $phone launch com.sydxky.rtos.deviceprobe +``` + +启动返回成功后仍需检查实际画面。若仍是表盘,请在手表图标列表打开“真机链路验证”。页面显示版本、常亮请求状态、点击次数和按钮;手动点一下再截图,核对计数变化。 + +1.0.4 使用 `setKeepScreenOn(true)` 配合 `wakeScreenOn({screenOn:true})` 前台 15 秒续期;隐藏/销毁停止续期并释放。它没有永久改写系统设置,不保证所有固件或系统覆盖界面下都常亮。退出探针即可结束应用内调试常亮。 + +### 截图和 UI 检查 + +`watch-health` 正常进入运动健康“设备 → 更多功能 → 手表截屏”,读取本次生成的官方公开图片;不会在失败时拿手机截图冒充手表图。手机图片检查页可通过系统文件选择器导入截图、显示圆屏安全区、导出 PNG。 + +```powershell +python ui.py --target phone --serial $phone tree --output artifacts/phone.tree.json +python ui.py --target phone --serial $phone screenshot --output artifacts/phone.png +python ui.py --target watch-import --serial $phone screenshot --output artifacts/imported.png +``` + +后两种图必须按来源解释:手机截图属于手机;任意导入图片本身不构成手表身份背书。JPEG 转 PNG 会改变字节和 SHA-256。步骤 JSON 的 `click`、`scroll`、`assert-visible`、`screenshot` 示例见 [examples](phone-debug-bridge/examples)。 + +## 从源码构建 + +仓库包含手机工程、PC 工具、探针及测试,不含厂商 SDK、Android SDK、JDK 或健康 APK。 + +### 手机 APK + +需要 JDK 17、Android SDK Platform 35 及对应 Build Tools。工程使用 Gradle 8.13、AGP 8.13.1,minSdk 27 / targetSdk 34 / compileSdk 35。 + +```powershell +cd phone-debug-bridge +.\build.ps1 -JavaHome 'C:\path\to\jdk17' -AndroidSdk 'C:\path\to\Android\Sdk' +python -m unittest discover -s tests -v +``` + +APK 输出 `phone-debug-bridge/artifacts/RTOS-Phone-Bridge-0.2.0-debug.apk`。这是 Android Debug 签名工具,不是商店上架包;自行构建会使用自己的 debug 证书,与作者发布版可能不同。 + +### Glyphix 探针 + +自行按厂商许可取得完整 Windows Glyphix SDK,将含 `bin/gx.exe` 和 `share/` 的 SDK 放在仓库根 `temp/glyphix-v0.7.2-windows-x64/`。本次验证 CLI v0.10.1 / 3ed38835,目录名保留历史命名;不要仅凭目录名判断实际版本。 + +```powershell +cd com.sydxky.rtos.deviceprobe +node --test tests/screen-lifecycle.cjs +.\build.ps1 -QuickAppOnly +``` + +输出在 `.glyphix-work/dist/generic-watch-466x466-quickapp/` 和 `generic-watch-390x450-quickapp/`,每屏必须保留完整三个文件。这些是 Glyphix QuickApp,不是 APK 或 HAP。 + +原生 UI 验收需厂商模拟器和初始化的 global/launcher 镜像。先按官方教程构建普通探针镜像并初始化模拟器资源,再显式提供 `--seed`: + +```powershell +python phone-debug-bridge/tests/native_ui.py --seed 'C:\path\to\initialized-image' --output work/native-ui +``` + +脚本拒绝占用中的 Inspector 14201,只终止自己启动的模拟器。相关资源不会随源码分发。完整路径、工具链及测试边界见[工程说明](phone-debug-bridge/README.md)。 + +## 发布文件 + +| 文件 | 内容 | +| --- | --- | +| `RTOS-Phone-Bridge-0.2.0-debug.apk` | 手机 APK,安装到 P30PRO 等 Android 手机 | +| `S2-DeviceProbe-1.0.4-dist.zip` | 圆/方各三文件,安装 bundle.pkg 到手表 | +| `RTOS-Phone-Bridge-0.2.0-source.zip` | 独立源码、构建脚本、完整许可和文档 | +| `RTOS-S2-DebugKit-0.2.0.zip` | APK、探针、源码、文档及脱敏证据 | +| `SHA256SUMS.txt` / `KIT-SHA256.txt` | 逐文件与完整工具包校验 | + +APK SHA-256:`316221A6751C9ED8A23BD1FA4381F8AA35620AB1A85123468F8DD04811F880E0`。 + +可用 `Get-FileHash -Algorithm SHA256 <文件>` 对照发布校验表。发布附件中包含 LICENSE、NOTICE 及第三方许可,使用和再分发遵守各自条款。 + +## 常见问题 + +**Binder 已绑定但手表不在线:** 先在健康确认已连接,再执行 `wait-link`;绑定成功早于蓝牙重连。`bind_rejected` 时先正常打开已配对的健康。 + +**请求超时或返回 3000:** 先查同一个作业的实际结果,不要自动重复安装。已有一次会话通过保留配对数据重启健康并等待上线恢复,但内部根因尚未确定。 + +**安装回调成功却找不到应用:** 从图标列表检查实际入口,结合官方截图核实。回调 200 不代表远程调至前台。 + +**截图无法导出:** 当前适配健康 6.10.15 的公开截图目录和 JPEG 编号规则;其他版本可能需要重新适配。手机锁屏时先在本机解锁,不绕过锁屏。 + +**为什么没有通用手表遥控:** 当前接口没有取得可验证的真机通用触摸或 Inspector 隧道。手机 ADB 输入和模拟器自动化不会被计为 S2 遥控成功。 + +结束调试:先 `logs off`(若开启过),再执行 `disconnect`、`cleanup`、`stop`,并退出手表探针。清理只删除调试桥上传缓存,不删除健康配对、用户图片或其他应用数据。 + +## 参考与许可 + +参考 [Glyphix 教程](https://docs.xfaith-tech.com/glyphix/docs/tutorials/)、[亮度接口](https://docs.xfaith-tech.com/glyphix/docs/api/system-brightness.html)、[测试框架](https://docs.xfaith-tech.com/glyphix/docs/api/system-test.html) 和 [oppo-watch-s-sideload](https://github.com/chengchengking/oppo-watch-s-sideload)。本项目独立实现手机桥和 PC 工具,保留上游 MIT 署名;厂商 SDK 和第三方构建工具不受本项目自研部分许可重新授权。完整声明见 [NOTICE.md](NOTICE.md)。 diff --git a/build-rtos-game.ps1 b/build-rtos-game.ps1 new file mode 100644 index 0000000..5c614ac --- /dev/null +++ b/build-rtos-game.ps1 @@ -0,0 +1,81 @@ +param( + [Parameter(Mandatory = $true)][string]$ProjectRoot, + [switch]$QuickAppOnly, + [switch]$Clean +) + +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' +$ProjectRoot = (Resolve-Path -LiteralPath $ProjectRoot).Path +$toolBin = Join-Path $PSScriptRoot 'temp\glyphix-v0.7.2-windows-x64\bin' +$gx = Join-Path $toolBin 'gx.exe' +if (-not (Test-Path -LiteralPath $gx)) { throw "Glyphix toolchain not found: $gx" } +$manifestPath = Join-Path $ProjectRoot 'src\manifest.json' +$manifest = Get-Content -LiteralPath $manifestPath -Raw | ConvertFrom-Json +if ($manifest.package -cnotmatch '^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$') { + throw 'Invalid Glyphix package name' +} +$quickAppTargets = @('generic-watch-466x466-quickapp', 'generic-watch-390x450-quickapp') + +$targets = if ($QuickAppOnly) { + $quickAppTargets +} else { + @('generic-watch-466x466', 'generic-watch-390x450', 'generic-watch-466x466-quickapp', 'generic-watch-390x450-quickapp') +} + +$originalPath = $env:Path +Push-Location $ProjectRoot +try { + $env:Path = "$toolBin;$originalPath" + $availableDevices = @(& $gx list device) + if ($LASTEXITCODE -ne 0) { throw 'Unable to read Glyphix device profiles' } + foreach ($device in $targets) { + if ($availableDevices -cnotcontains $device) { throw "Missing Glyphix device profile: $device" } + } + if ($Clean) { + & $gx clean + if ($LASTEXITCODE -ne 0) { throw 'Glyphix clean failed' } + } + foreach ($device in $targets) { + $arguments = @('build', '-d', $device) + if (-not $device.Contains('quickapp')) { $arguments += '-e' } + $output = @(& $gx @arguments 2>&1 | ForEach-Object { $_.ToString() }) + $output | ForEach-Object { Write-Host $_ } + if ($LASTEXITCODE -ne 0 -or ($output -join "`n") -match '(?im)^\s*(?:error|fatal):\s') { + throw "Glyphix build failed for $device" + } + } + + foreach ($device in $quickAppTargets) { + $deliveryRoot = Join-Path $ProjectRoot ".glyphix-work\dist\$device\$($manifest.package)" + foreach ($fileName in @('bundle.pkg', 'manifest.json', 'icon.png')) { + $artifact = Join-Path $deliveryRoot $fileName + if (-not (Test-Path -LiteralPath $artifact -PathType Leaf) -or (Get-Item -LiteralPath $artifact).Length -eq 0) { + throw "Missing or empty QuickApp artifact: $artifact" + } + } + $packedManifest = Get-Content -LiteralPath (Join-Path $deliveryRoot 'manifest.json') -Raw | ConvertFrom-Json + if ($packedManifest.package -cne $manifest.package -or + $packedManifest.versionName -cne $manifest.versionName -or + $packedManifest.versionCode -ne $manifest.versionCode) { + throw "QuickApp package/version mismatch: $device" + } + $icon = [IO.File]::ReadAllBytes((Join-Path $deliveryRoot 'icon.png')) + if ($icon.Length -lt 8 -or [Convert]::ToHexString($icon[0..7]) -cne '89504E470D0A1A0A') { + throw "Invalid QuickApp PNG icon: $device" + } + foreach ($fileName in @('bundle.pkg', 'manifest.json', 'icon.png')) { + $artifact = Join-Path $deliveryRoot $fileName + [pscustomobject]@{ + Package = $manifest.package + Device = $device + File = $fileName + Bytes = (Get-Item -LiteralPath $artifact).Length + SHA256 = (Get-FileHash -LiteralPath $artifact -Algorithm SHA256).Hash + } + } + } +} finally { + Pop-Location + $env:Path = $originalPath +} diff --git a/com.sydxky.rtos.deviceprobe/.gitignore b/com.sydxky.rtos.deviceprobe/.gitignore new file mode 100644 index 0000000..c68d06e --- /dev/null +++ b/com.sydxky.rtos.deviceprobe/.gitignore @@ -0,0 +1 @@ +.glyphix-work/ diff --git a/com.sydxky.rtos.deviceprobe/LICENSE b/com.sydxky.rtos.deviceprobe/LICENSE new file mode 100644 index 0000000..1a71cb6 --- /dev/null +++ b/com.sydxky.rtos.deviceprobe/LICENSE @@ -0,0 +1,131 @@ +# PolyForm Noncommercial License 1.0.0 + + + +## Acceptance + +In order to get any license under these terms, you must agree +to them as both strict obligations and conditions to all +your licenses. + +## Copyright License + +The licensor grants you a copyright license for the +software to do everything you might do with the software +that would otherwise infringe the licensor's copyright +in it for any permitted purpose. However, you may +only distribute the software according to [Distribution +License](#distribution-license) and make changes or new works +based on the software according to [Changes and New Works +License](#changes-and-new-works-license). + +## Distribution License + +The licensor grants you an additional copyright license +to distribute copies of the software. Your license +to distribute covers distributing the software with +changes and new works permitted by [Changes and New Works +License](#changes-and-new-works-license). + +## Notices + +You must ensure that anyone who gets a copy of any part of +the software from you also gets a copy of these terms or the +URL for them above, as well as copies of any plain-text lines +beginning with `Required Notice:` that the licensor provided +with the software. For example: + +> Required Notice: Copyright Yoyodyne, Inc. (http://example.com) + +## Changes and New Works License + +The licensor grants you an additional copyright license to +make changes and new works based on the software for any +permitted purpose. + +## Patent License + +The licensor grants you a patent license for the software that +covers patent claims the licensor can license, or becomes able +to license, that you would infringe by using the software. + +## Noncommercial Purposes + +Any noncommercial purpose is a permitted purpose. + +## Personal Uses + +Personal use for research, experiment, and testing for +the benefit of public knowledge, personal study, private +entertainment, hobby projects, amateur pursuits, or religious +observance, without any anticipated commercial application, +is use for a permitted purpose. + +## Noncommercial Organizations + +Use by any charitable organization, educational institution, +public research organization, public safety or health +organization, environmental protection organization, +or government institution is use for a permitted purpose +regardless of the source of funding or obligations resulting +from the funding. + +## Fair Use + +You may have "fair use" rights for the software under the +law. These terms do not limit them. + +## No Other Rights + +These terms do not allow you to sublicense or transfer any of +your licenses to anyone else, or prevent the licensor from +granting licenses to anyone else. These terms do not imply +any other licenses. + +## Patent Defense + +If you make any written claim that the software infringes or +contributes to infringement of any patent, your patent license +for the software granted under these terms ends immediately. If +your company makes such a claim, your patent license ends +immediately for work on behalf of your company. + +## Violations + +The first time you are notified in writing that you have +violated any of these terms, or done anything with the software +not covered by your licenses, your licenses can nonetheless +continue if you come into full compliance with these terms, +and take practical steps to correct past violations, within +32 days of receiving notice. Otherwise, all your licenses +end immediately. + +## No Liability + +***As far as the law allows, the software comes as is, without +any warranty or condition, and the licensor will not be liable +to you for any damages arising out of these terms or the use +or nature of the software, under any kind of legal claim.*** + +## Definitions + +The **licensor** is the individual or entity offering these +terms, and the **software** is the software the licensor makes +available under these terms. + +**You** refers to the individual or entity agreeing to these +terms. + +**Your company** is any legal entity, sole proprietorship, +or other kind of organization that you work for, plus all +organizations that have control over, are under the control of, +or are under common control with that organization. **Control** +means ownership of substantially all the assets of an entity, +or the power to direct its management and policies by vote, +contract, or otherwise. Control can be direct or indirect. + +**Your licenses** are all the licenses granted to you for the +software under these terms. + +**Use** means anything you do with the software requiring one +of your licenses. diff --git a/com.sydxky.rtos.deviceprobe/README.md b/com.sydxky.rtos.deviceprobe/README.md new file mode 100644 index 0000000..b0e6f53 --- /dev/null +++ b/com.sydxky.rtos.deviceprobe/README.md @@ -0,0 +1,20 @@ +# 真机链路验证 + +自研部分采用 [PolyForm Noncommercial 1.0.0](LICENSE),仅限许可允许的非商业用途;版权、Required Notice 和第三方声明见[手机桥 NOTICE](../phone-debug-bridge/NOTICE.md)。 + +独立 Glyphix 应用 `com.sydxky.rtos.deviceprobe`,版本 1.0.4 / 10004。供 [手机调试桥](../phone-debug-bridge/README.md) 测试安装、启动、手动点击和应用内调试常亮,保留 `icon` 清单字段。 + +```powershell +.\build.ps1 -QuickAppOnly +node --test tests/screen-lifecycle.cjs +``` + +沿用 RTOS 固定厂商 `gx.exe`,生成圆 / 方两种 QuickApp 包。页面初始化输出 `RTOS_DEVICE_PROBE_READY_V1`,点击按钮增加次数并输出 `RTOS_DEVICE_PROBE_TAP_V1=<次数>`。无网络、账号和后台订阅;前台常亮只维护一个 15 秒定时器。`READY` 日志只证明执行到页面就绪阶段,屏幕和点击须另行观察。 + +1.0.3 仅调用 `@system.brightness.setKeepScreenOn(true)`,在 S2 上静置至少 79 秒后回到表盘,用户确认已熄屏,常亮实测失败。1.0.4 增加官方 `wakeScreenOn({ screenOn: true })`,省略 timeout(文档定义为不限时间),每 15 秒续期。隐藏/销毁均清理定时器、使旧回调失效并释放 setKeepScreenOn(false);亮屏调用缺失、抛错或拒绝时停止续期。不会修改亮度或自动亮度,不在后台续期。 + +2026-11-14,1.0.4 已在 S2 / OWW265 实装。用户取下充电座并打开后,起始采集结束 13:01:35,复查请求始于 13:04:14,结束 13:04:25(Asia/Shanghai),保守静置至少 159 秒;截图仍为探针,用户确认实体屏幕仍亮着。随后用户手动点击,截图确认次数由 0 变成 1。该结果只覆盖本固件上的短时前台调试常亮及手动触摸;不是永久系统常亮或电脑远程输入。页面保留“常亮续期中 · 待实测”,因为每次新会话仍需观察实际结果。 + +1.0.4 的圆/方 QuickApp 构建、两种原生模拟器 UI 和 5 项生命周期回归通过。真机 READY/TAP 日志与 Inspector 隧道尚未取得。来源:[官方亮度接口](https://docs.xfaith-tech.com/glyphix/docs/api/system-brightness.html);完整证据见[补测记录](../docs/VALIDATION.md)。退出探针可结束调试常亮。 + +图标暂沿用本仓库贪吃蛇应用的本地资源,仅供开发验证。实际设备状态见手机桥的验收记录。 diff --git a/com.sydxky.rtos.deviceprobe/build.ps1 b/com.sydxky.rtos.deviceprobe/build.ps1 new file mode 100644 index 0000000..893186f --- /dev/null +++ b/com.sydxky.rtos.deviceprobe/build.ps1 @@ -0,0 +1,2 @@ +param([switch]$QuickAppOnly, [switch]$Clean) +& (Join-Path $PSScriptRoot '..\build-rtos-game.ps1') -ProjectRoot $PSScriptRoot -QuickAppOnly:$QuickAppOnly -Clean:$Clean diff --git a/com.sydxky.rtos.deviceprobe/glyphix.config.js b/com.sydxky.rtos.deviceprobe/glyphix.config.js new file mode 100644 index 0000000..eb9e57e --- /dev/null +++ b/com.sydxky.rtos.deviceprobe/glyphix.config.js @@ -0,0 +1 @@ +module.exports = { minify: false }; diff --git a/com.sydxky.rtos.deviceprobe/src/app.js b/com.sydxky.rtos.deviceprobe/src/app.js new file mode 100644 index 0000000..59e9a9a --- /dev/null +++ b/com.sydxky.rtos.deviceprobe/src/app.js @@ -0,0 +1,6 @@ +export default { + onCreate() { console.log('RTOS_DEVICE_PROBE_APP_CREATE_V1'); }, + onShow() { console.log('RTOS_DEVICE_PROBE_APP_SHOW_V1'); }, + onHide() { console.log('RTOS_DEVICE_PROBE_APP_HIDE_V1'); }, + onDestroy() { console.log('RTOS_DEVICE_PROBE_APP_DESTROY_V1'); } +}; diff --git a/com.sydxky.rtos.deviceprobe/src/assets/icon.png b/com.sydxky.rtos.deviceprobe/src/assets/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce7b4a908ffc02b72f95cc9125a1c003bddfbb5c GIT binary patch literal 2164 zcmV-)2#fcLP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D2nk62V_!}piGZ)_7T=&PHZg#%YGUf%qX#M2M=Nn@`{QT1$ zBaXrDXP?-J;?ifAH-eMD$r2_7z(YT`bFq2s#b-LknFEA}hp^}!%n0Du-+pgCy!>&q z|M=mK0czsOm!E4ce6(XGj;LM$jCS1neUCrbdDyk{%IOo$wd>bA_f!+r3IKP?1C$Td zA_q?#X}1!@xnwend^&8z}o6fi%^hqES_7UoPJXA=N(VQz(PX;5*bm?fXl6wD$3%Czz! zIJ-9KF0qh&USl$;0LbZUFXYS(g`_E`gvkWJO;JOaH|%s_N|>r{Fo^)T8E#76s1t_g zMRp{gWobqi05{>r&x4u>D~|G+mSj``5ZSJwuroGe)(b`x03+XxUyiXvFp2qKQ}|;fk6VG(kFkA zGd(P?OWSD4767XAl&=n$3UYTSWeecsdvA7rh%+Bd#nMI^vIIaO!t4C?ky9$p5`YJO zb;4drX{$bx1wbuYez8*zsm-Oy0`SpaH>qAANdT<$$uD&3Bc(W$Bmml$<(E12k&+Rp z1;8#IkNoYRT{2b+fQ1M7CAK)w9R2fB^G=lW&A~(Rb2gz)BW<`1wE(QH_3ynZjjZK# zvvl+1>g706j6p(X(4V zQ!y0pVsSuJ0Ji4;NTDaubr1I>brFjLq5@!RvbR(zYrA@IiU8n%TW`ev8oqq)rQl zVdIXptx5pqwt4qN@G-1K_o;-ArVR>!K67~y3&bLLElZ3SLR~^Z0nkt&FJc2tETCjT z(?lp03<|*Zj^B7jkc`39PZBy~XrTgtf}Q}3dxK;F*eU`=7!VkCFzg9J#h{=7OsxW{ zDB}^VW(%QJ!Jq)_H-W~<&K8VL1<3+fo(G7KG)>s7Cb|HWXsU@8r-5Vv*v|rn5Kkj5 z7K)Oy0J{RX+jzOgih2Tr*+8-YOl<>?&EdI0+roMRLWf5L1+bWIpv<5x<^giO%A6#Z zg2B#a(4HJW*$c!3Witp29U>JKKrOFl*AN@AX(H$mlflklmi47=RRXYe8c2N9-X=1C ztBOOB&(})q)R3qEtQ`f{>jegr7f;L$t$otADgoFl2KBk`VOR|QAXEhE6@aN!@HQif zz@Y1IiJcr46#$s)3;Yk&e6Gam$ZrYt1F8gID-e_@1H%yN%%NUl0ia3%=XNf3E@~5{ z7#3jkJKLhjaLzV!*GlIInE2oZr$QA%~0XuEu%SW5{OR@z3whoe9F50T!HUz(EA^2Rr2$8uUqu3jplxDYQXsk6$jM2mriDRF)DE z|29Sw09e~zUMoW?eSM570PtqgVT?8MTSgZEcubJT7<0a45&;0Ii>HWsN=N%4CKCX# zWJ%YGyjkaeDDsrd^ZS@o0Km!>@3WOR?)=--!K-@YGaHl11<>Nb;oT7Im8k8fGMfN^ zs^QwF1YG`9^Zhnv6#%e^#3>f?!K?v}ZyVCgQG(e8(85V1*4|W_3p=ethc{16H3DeC z9WHfQ8Fx>Ke2%$3M0EmaS&|TlbLg7tJFaC8sue&Br(9TVJVn5~e5W6t|eRYIO54%n9I5c-V|I(#WZ&2_kulH;8fW zRBi~S1t7r?7=$V#N2HY!1;%ECb6rMxsfNrNSd;)lP+up8z*}I%KKMWWpW1}H*3wvo q0Gu!`fR*C{SUE0$mE!_fIsX7UROu#z +
+

真机链路验证

+

手机桥接 · S2 · 1.0.4

+

{{ screenStatus }}

+

点击次数:{{ count }}

+ +
+ + + diff --git a/com.sydxky.rtos.deviceprobe/src/manifest.json b/com.sydxky.rtos.deviceprobe/src/manifest.json new file mode 100644 index 0000000..9c661ae --- /dev/null +++ b/com.sydxky.rtos.deviceprobe/src/manifest.json @@ -0,0 +1,10 @@ +{ + "package": "com.sydxky.rtos.deviceprobe", + "name": "真机链路验证", + "icon": "/assets/icon.png", + "versionName": "1.0.4", + "versionCode": 10004, + "features": [], + "router": { "entry": "main", "pages": { "main": { "component": "index" } } }, + "config": { "designWidth": 410 } +} diff --git a/com.sydxky.rtos.deviceprobe/tests/screen-lifecycle.cjs b/com.sydxky.rtos.deviceprobe/tests/screen-lifecycle.cjs new file mode 100644 index 0000000..5e9d1bd --- /dev/null +++ b/com.sydxky.rtos.deviceprobe/tests/screen-lifecycle.cjs @@ -0,0 +1,85 @@ +const { test } = require('node:test'); +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const vm = require('node:vm'); +const path = require('node:path'); + +function load(brightness) { + const source = fs.readFileSync(path.join(__dirname, '../src/main/index.ux'), 'utf8') + .match(/