deepadb 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/LICENSE +202 -21
  2. package/NOTICE +16 -0
  3. package/README.md +55 -29
  4. package/build/bridge/adb-bridge.d.ts +14 -0
  5. package/build/bridge/adb-bridge.d.ts.map +1 -1
  6. package/build/bridge/adb-bridge.js +34 -5
  7. package/build/bridge/adb-bridge.js.map +1 -1
  8. package/build/bridge/device-manager.d.ts.map +1 -1
  9. package/build/bridge/device-manager.js +18 -9
  10. package/build/bridge/device-manager.js.map +1 -1
  11. package/build/bridge/local-bridge.d.ts +10 -2
  12. package/build/bridge/local-bridge.d.ts.map +1 -1
  13. package/build/bridge/local-bridge.js +51 -16
  14. package/build/bridge/local-bridge.js.map +1 -1
  15. package/build/config/config.d.ts +7 -0
  16. package/build/config/config.d.ts.map +1 -1
  17. package/build/config/config.js +26 -10
  18. package/build/config/config.js.map +1 -1
  19. package/build/graphql-api.d.ts.map +1 -1
  20. package/build/graphql-api.js +73 -3
  21. package/build/graphql-api.js.map +1 -1
  22. package/build/http-transport.d.ts.map +1 -1
  23. package/build/http-transport.js +44 -7
  24. package/build/http-transport.js.map +1 -1
  25. package/build/index.d.ts.map +1 -1
  26. package/build/index.js +41 -16
  27. package/build/index.js.map +1 -1
  28. package/build/middleware/auth.d.ts.map +1 -1
  29. package/build/middleware/auth.js +43 -6
  30. package/build/middleware/auth.js.map +1 -1
  31. package/build/middleware/chipset.d.ts.map +1 -1
  32. package/build/middleware/chipset.js +16 -1
  33. package/build/middleware/chipset.js.map +1 -1
  34. package/build/middleware/cleanup.d.ts +39 -7
  35. package/build/middleware/cleanup.d.ts.map +1 -1
  36. package/build/middleware/cleanup.js +148 -16
  37. package/build/middleware/cleanup.js.map +1 -1
  38. package/build/middleware/fetch-utils.d.ts +50 -7
  39. package/build/middleware/fetch-utils.d.ts.map +1 -1
  40. package/build/middleware/fetch-utils.js +127 -14
  41. package/build/middleware/fetch-utils.js.map +1 -1
  42. package/build/middleware/fs-utils.d.ts +126 -0
  43. package/build/middleware/fs-utils.d.ts.map +1 -0
  44. package/build/middleware/fs-utils.js +229 -0
  45. package/build/middleware/fs-utils.js.map +1 -0
  46. package/build/middleware/logger.d.ts +16 -0
  47. package/build/middleware/logger.d.ts.map +1 -1
  48. package/build/middleware/logger.js +18 -0
  49. package/build/middleware/logger.js.map +1 -1
  50. package/build/middleware/output-processor.d.ts.map +1 -1
  51. package/build/middleware/output-processor.js +43 -8
  52. package/build/middleware/output-processor.js.map +1 -1
  53. package/build/middleware/parse-utils.d.ts +19 -0
  54. package/build/middleware/parse-utils.d.ts.map +1 -0
  55. package/build/middleware/parse-utils.js +30 -0
  56. package/build/middleware/parse-utils.js.map +1 -0
  57. package/build/middleware/png-utils.d.ts.map +1 -1
  58. package/build/middleware/png-utils.js +33 -11
  59. package/build/middleware/png-utils.js.map +1 -1
  60. package/build/middleware/result-handle.d.ts +76 -0
  61. package/build/middleware/result-handle.d.ts.map +1 -0
  62. package/build/middleware/result-handle.js +378 -0
  63. package/build/middleware/result-handle.js.map +1 -0
  64. package/build/middleware/sanitize.d.ts +26 -0
  65. package/build/middleware/sanitize.d.ts.map +1 -1
  66. package/build/middleware/sanitize.js +43 -2
  67. package/build/middleware/sanitize.js.map +1 -1
  68. package/build/middleware/security.d.ts.map +1 -1
  69. package/build/middleware/security.js +30 -5
  70. package/build/middleware/security.js.map +1 -1
  71. package/build/middleware/ui-dump.d.ts.map +1 -1
  72. package/build/middleware/ui-dump.js +30 -10
  73. package/build/middleware/ui-dump.js.map +1 -1
  74. package/build/server.d.ts.map +1 -1
  75. package/build/server.js +34 -5
  76. package/build/server.js.map +1 -1
  77. package/build/tool-context.d.ts.map +1 -1
  78. package/build/tool-context.js +2 -0
  79. package/build/tool-context.js.map +1 -1
  80. package/build/tools/accessibility.d.ts.map +1 -1
  81. package/build/tools/accessibility.js +39 -40
  82. package/build/tools/accessibility.js.map +1 -1
  83. package/build/tools/at-commands.d.ts.map +1 -1
  84. package/build/tools/at-commands.js +31 -6
  85. package/build/tools/at-commands.js.map +1 -1
  86. package/build/tools/baseband.d.ts.map +1 -1
  87. package/build/tools/baseband.js +18 -7
  88. package/build/tools/baseband.js.map +1 -1
  89. package/build/tools/build.d.ts.map +1 -1
  90. package/build/tools/build.js +30 -8
  91. package/build/tools/build.js.map +1 -1
  92. package/build/tools/ci.d.ts.map +1 -1
  93. package/build/tools/ci.js +16 -5
  94. package/build/tools/ci.js.map +1 -1
  95. package/build/tools/control.d.ts.map +1 -1
  96. package/build/tools/control.js +19 -11
  97. package/build/tools/control.js.map +1 -1
  98. package/build/tools/device-farm.d.ts.map +1 -1
  99. package/build/tools/device-farm.js +27 -3
  100. package/build/tools/device-farm.js.map +1 -1
  101. package/build/tools/device-profiles.d.ts.map +1 -1
  102. package/build/tools/device-profiles.js +70 -8
  103. package/build/tools/device-profiles.js.map +1 -1
  104. package/build/tools/device.d.ts.map +1 -1
  105. package/build/tools/device.js +4 -2
  106. package/build/tools/device.js.map +1 -1
  107. package/build/tools/diagnostics.d.ts.map +1 -1
  108. package/build/tools/diagnostics.js +17 -9
  109. package/build/tools/diagnostics.js.map +1 -1
  110. package/build/tools/emulator.d.ts.map +1 -1
  111. package/build/tools/emulator.js +12 -13
  112. package/build/tools/emulator.js.map +1 -1
  113. package/build/tools/files.d.ts +1 -1
  114. package/build/tools/files.d.ts.map +1 -1
  115. package/build/tools/files.js +98 -56
  116. package/build/tools/files.js.map +1 -1
  117. package/build/tools/firmware-analysis.d.ts.map +1 -1
  118. package/build/tools/firmware-analysis.js +35 -12
  119. package/build/tools/firmware-analysis.js.map +1 -1
  120. package/build/tools/forwarding.d.ts.map +1 -1
  121. package/build/tools/forwarding.js +248 -6
  122. package/build/tools/forwarding.js.map +1 -1
  123. package/build/tools/health.d.ts.map +1 -1
  124. package/build/tools/health.js +14 -3
  125. package/build/tools/health.js.map +1 -1
  126. package/build/tools/input-gestures.d.ts.map +1 -1
  127. package/build/tools/input-gestures.js +65 -13
  128. package/build/tools/input-gestures.js.map +1 -1
  129. package/build/tools/logcat-watch.d.ts.map +1 -1
  130. package/build/tools/logcat-watch.js +21 -14
  131. package/build/tools/logcat-watch.js.map +1 -1
  132. package/build/tools/logs.d.ts.map +1 -1
  133. package/build/tools/logs.js +8 -4
  134. package/build/tools/logs.js.map +1 -1
  135. package/build/tools/mirroring.d.ts.map +1 -1
  136. package/build/tools/mirroring.js +21 -19
  137. package/build/tools/mirroring.js.map +1 -1
  138. package/build/tools/multi-device.d.ts.map +1 -1
  139. package/build/tools/multi-device.js +10 -0
  140. package/build/tools/multi-device.js.map +1 -1
  141. package/build/tools/network-capture.d.ts.map +1 -1
  142. package/build/tools/network-capture.js +32 -8
  143. package/build/tools/network-capture.js.map +1 -1
  144. package/build/tools/network-discovery.d.ts.map +1 -1
  145. package/build/tools/network-discovery.js +11 -2
  146. package/build/tools/network-discovery.js.map +1 -1
  147. package/build/tools/ota-monitor.d.ts.map +1 -1
  148. package/build/tools/ota-monitor.js +26 -12
  149. package/build/tools/ota-monitor.js.map +1 -1
  150. package/build/tools/packages.d.ts.map +1 -1
  151. package/build/tools/packages.js +18 -11
  152. package/build/tools/packages.js.map +1 -1
  153. package/build/tools/plugins.d.ts +18 -0
  154. package/build/tools/plugins.d.ts.map +1 -1
  155. package/build/tools/plugins.js +47 -2
  156. package/build/tools/plugins.js.map +1 -1
  157. package/build/tools/prompts.d.ts.map +1 -1
  158. package/build/tools/prompts.js +2 -0
  159. package/build/tools/prompts.js.map +1 -1
  160. package/build/tools/qemu.d.ts +6 -3
  161. package/build/tools/qemu.d.ts.map +1 -1
  162. package/build/tools/qemu.js +28 -16
  163. package/build/tools/qemu.js.map +1 -1
  164. package/build/tools/registry.d.ts.map +1 -1
  165. package/build/tools/registry.js +76 -26
  166. package/build/tools/registry.js.map +1 -1
  167. package/build/tools/regression.d.ts +37 -0
  168. package/build/tools/regression.d.ts.map +1 -1
  169. package/build/tools/regression.js +63 -22
  170. package/build/tools/regression.js.map +1 -1
  171. package/build/tools/resources.d.ts.map +1 -1
  172. package/build/tools/resources.js +62 -15
  173. package/build/tools/resources.js.map +1 -1
  174. package/build/tools/result-handles.d.ts +37 -0
  175. package/build/tools/result-handles.d.ts.map +1 -0
  176. package/build/tools/result-handles.js +286 -0
  177. package/build/tools/result-handles.js.map +1 -0
  178. package/build/tools/ril-intercept.d.ts.map +1 -1
  179. package/build/tools/ril-intercept.js +15 -18
  180. package/build/tools/ril-intercept.js.map +1 -1
  181. package/build/tools/screen-record.d.ts.map +1 -1
  182. package/build/tools/screen-record.js +34 -5
  183. package/build/tools/screen-record.js.map +1 -1
  184. package/build/tools/screenshot-diff.d.ts.map +1 -1
  185. package/build/tools/screenshot-diff.js +29 -21
  186. package/build/tools/screenshot-diff.js.map +1 -1
  187. package/build/tools/selinux-audit.d.ts.map +1 -1
  188. package/build/tools/selinux-audit.js +7 -5
  189. package/build/tools/selinux-audit.js.map +1 -1
  190. package/build/tools/sensors.d.ts.map +1 -1
  191. package/build/tools/sensors.js +26 -4
  192. package/build/tools/sensors.js.map +1 -1
  193. package/build/tools/shell.d.ts.map +1 -1
  194. package/build/tools/shell.js +9 -0
  195. package/build/tools/shell.js.map +1 -1
  196. package/build/tools/snapshot.d.ts.map +1 -1
  197. package/build/tools/snapshot.js +38 -19
  198. package/build/tools/snapshot.js.map +1 -1
  199. package/build/tools/split-apk.d.ts.map +1 -1
  200. package/build/tools/split-apk.js +48 -24
  201. package/build/tools/split-apk.js.map +1 -1
  202. package/build/tools/test-gen.d.ts.map +1 -1
  203. package/build/tools/test-gen.js +29 -10
  204. package/build/tools/test-gen.js.map +1 -1
  205. package/build/tools/testing.d.ts.map +1 -1
  206. package/build/tools/testing.js +27 -9
  207. package/build/tools/testing.js.map +1 -1
  208. package/build/tools/thermal-power.d.ts +8 -1
  209. package/build/tools/thermal-power.d.ts.map +1 -1
  210. package/build/tools/thermal-power.js +35 -10
  211. package/build/tools/thermal-power.js.map +1 -1
  212. package/build/tools/ui.d.ts.map +1 -1
  213. package/build/tools/ui.js +20 -13
  214. package/build/tools/ui.js.map +1 -1
  215. package/build/tools/wireless-firmware.d.ts.map +1 -1
  216. package/build/tools/wireless-firmware.js +21 -7
  217. package/build/tools/wireless-firmware.js.map +1 -1
  218. package/build/tools/wireless.d.ts.map +1 -1
  219. package/build/tools/wireless.js +39 -3
  220. package/build/tools/wireless.js.map +1 -1
  221. package/build/tools/workflow-market.d.ts.map +1 -1
  222. package/build/tools/workflow-market.js +67 -13
  223. package/build/tools/workflow-market.js.map +1 -1
  224. package/build/tools/workflow.d.ts.map +1 -1
  225. package/build/tools/workflow.js +77 -8
  226. package/build/tools/workflow.js.map +1 -1
  227. package/build/ws-transport.d.ts.map +1 -1
  228. package/build/ws-transport.js +21 -3
  229. package/build/ws-transport.js.map +1 -1
  230. package/package.json +20 -8
package/LICENSE CHANGED
@@ -1,21 +1,202 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Jason
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 Jason <fullread@github>
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,16 @@
1
+ DeepADB
2
+ Copyright 2026 Jason <fullread@github>
3
+
4
+ This product includes software developed by Jason (https://github.com/fullread).
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this software except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  MCP (Model Context Protocol) server providing full Android Debug Bridge (ADB) integration for AI agents. Enables MCP clients to directly interact with connected Android devices — inspecting state, running commands, managing apps, capturing logs, controlling device settings, analyzing UI hierarchies, recording screens, managing emulators, running structured test sessions, orchestrating multi-device operations, capturing network traffic, running CI pipelines, auditing accessibility, detecting performance regressions, executing cloud device farm tests, debugging over WiFi, building projects, and managing community plugins.
4
4
 
5
- **198 tools, 4 resources, and 4 prompts across 44 modules** — the most comprehensive ADB MCP server available, with triple transport (stdio + HTTP/SSE + WebSocket), optional GraphQL API, defense-in-depth security, modem firmware analysis, workflow marketplace, AT command interface with multi-chipset support, RIL message interception, device profiling, baseband/modem integration, automated test generation, OTA update monitoring, SELinux auditing, thermal/power profiling, network device discovery, visual regression detection, workflow orchestration, accessibility auditing, and contextual truncation.
5
+ **204 tools, 5 resources, and 4 prompts across 45 modules** — the most comprehensive ADB MCP server available, with triple transport (stdio + HTTP/SSE + WebSocket), optional GraphQL API, defense-in-depth security, modem firmware analysis, workflow marketplace, AT command interface with multi-chipset support, RIL message interception, device profiling, baseband/modem integration, automated test generation, OTA update monitoring, SELinux auditing, thermal/power profiling, network device discovery, visual regression detection, workflow orchestration, accessibility auditing, and contextual truncation.
6
6
 
7
7
  ## Architecture
8
8
 
@@ -16,7 +16,7 @@ MCP (Model Context Protocol) server providing full Android Debug Bridge (ADB) in
16
16
  │ DeepADB Server │
17
17
  │ │
18
18
  │ ┌─────────────────────────────────────────────┐ │
19
- │ │ Tool Modules (44) │ │
19
+ │ │ Tool Modules (45) │ │
20
20
  │ │ device │ shell │ packages │ files │ logs │ │
21
21
  │ │ diagnostics │ ui │ build │ health │ │
22
22
  │ │ wireless │ control │ logcat-watch │ │
@@ -33,7 +33,7 @@ MCP (Model Context Protocol) server providing full Android Debug Bridge (ADB) in
33
33
  │ │ thermal-power │ network-discovery │ │
34
34
  │ │ input-gestures │ wireless-firmware │ │
35
35
  │ ├─────────────────────────────────────────────┤ │
36
- │ │ Resources (4) │ Prompts (4) │ │
36
+ │ │ Resources (5) │ Prompts (4) │ │
37
37
  │ └───────────────────┬─────────────────────────┘ │
38
38
  │ │ │
39
39
  │ ┌───────────────────▼─────────────────────────┐ │
@@ -79,20 +79,20 @@ DeepADB operates in two modes, auto-detected at startup:
79
79
  ```
80
80
  AI Agent (PC) ←→ MCP ←→ DeepADB (PC) ←→ ADB (USB) ←→ Android Device
81
81
  ```
82
- Standard mode: DeepADB runs on a PC/Mac/Linux host and communicates with the device over USB via ADB. All 198 tools work through the ADB bridge with automatic retry on transient failures.
82
+ Standard mode: DeepADB runs on a PC/Mac/Linux host and communicates with the device over USB via ADB. All 204 tools work through the ADB bridge with automatic retry on transient failures.
83
83
 
84
84
  ### On-Device Mode — direct local execution
85
85
  ```
86
86
  AI Agent (Termux) ←→ MCP (stdio/HTTP) ←→ DeepADB (Termux) ←→ sh/su (local)
87
87
  ```
88
- When DeepADB runs directly on the Android device (e.g., inside Termux), it auto-detects the environment and switches to `LocalBridge`. Commands execute directly via `sh`/`su` — no ADB server, no USB, no serialization overhead. All 198 tools work identically, with significantly lower latency.
88
+ When DeepADB runs directly on the Android device (e.g., inside Termux), it auto-detects the environment and switches to `LocalBridge`. Commands execute directly via `sh`/`su` — no ADB server, no USB, no serialization overhead. All 204 tools work identically, with significantly lower latency.
89
89
 
90
- **Validated on hardware** (Pixel 6a, Android 16, Termux + Magisk + QEMU 10.2.1) across a four-cell test matrix, 0 failures in any cell:
90
+ **Validated on hardware** (Pixel 6a, Android 16, Termux + Magisk + QEMU 10.2.1) across a four-cell test matrix — host (ADB) and on-device (LocalBridge), each with and without a device PIN — with **0 failures in every cell**. The full suite is 577 tests in the host/ADB configuration and 613 on-device; the difference is the QEMU virtualization and Alpine VM-boot suites, which run only on-device:
91
91
 
92
- - **ADB mode, no PIN:** 383 passed / 10 skipped (393 total). Skips: 5 QEMU (on-device only), 1 shell round-trip (requires /bin/sh on host, skipped on Windows), 4 screen-state (require DA_TEST_PIN).
93
- - **ADB mode, with PIN:** 387 passed / 6 skipped. The 4 screen-state tests unlock.
94
- - **On-device mode, no PIN:** 419 passed / 4 skipped (423 total). All QEMU tests unlock including Alpine Linux VM boot with KVM acceleration, big.LITTLE CPU topology detection, guest ADB connectivity error handling, and clean VM shutdown. Skips: 4 screen-state (require PIN).
95
- - **On-device mode, with PIN:** 420 passed / 3 skipped. Every test enabled by the environment runs; the 3 skips are setup-phase steps that no-op when Alpine kernel/initrd/disk are already cached.
92
+ - **ADB mode, no PIN:** 556 passed / 0 failed / 21 skipped (577 total). Skips: 5 QEMU (on-device only), 7 gracefulKill unit tests (require POSIX signals, skipped on the Windows host), 3 tcpdump sanitization (tcpdump is root-only and unreachable over a non-root ADB shell), 2 host-shell round-trips (require a POSIX /bin/sh), 4 screen-state (require DA_TEST_PIN).
93
+ - **ADB mode, with PIN:** 560 passed / 0 failed / 17 skipped (577 total). The 4 screen-state tests unlock and run.
94
+ - **On-device mode, no PIN:** 606 passed / 0 failed / 7 skipped (613 total). All QEMU tests run, including Alpine Linux VM boot with KVM acceleration, big.LITTLE CPU topology detection, guest ADB connectivity error handling, and clean VM shutdown; the tcpdump and gracefulKill suites also run here (root + POSIX). Skips: 3 QEMU setup steps that no-op when the Alpine kernel/initrd/disk are already cached, 4 screen-state (require PIN).
95
+ - **On-device mode, with PIN:** 610 passed / 0 failed / 3 skipped (613 total). Every test enabled by the environment runs; the 3 skips are the cached-VM setup steps.
96
96
 
97
97
  **Privilege escalation:** In ADB mode, all shell commands run as uid=2000 (the `shell` user) which has system-level permissions. In Termux, commands run as a regular app user. LocalBridge automatically elevates privileged commands through `su` when root (Magisk) is available:
98
98
  - **Command allowlist:** 16 system commands (`settings`, `dumpsys`, `am`, `input`, `screencap`, `screenrecord`, `uiautomator`, `app_process`, `getenforce`, `setenforce`, `cmd`, `pm`, `wm`, `svc`, `ip`, `ifconfig`) are routed through `su -c` to match ADB-mode behavior.
@@ -142,7 +142,7 @@ DA_GRAPHQL_PORT=4000 npm start
142
142
  }
143
143
  ```
144
144
 
145
- ## Available Tools (198)
145
+ ## Available Tools (204)
146
146
 
147
147
  ### Health (1 tool)
148
148
  - `adb_health_check` — Comprehensive toolchain validation: ADB binary, server, device connection, authorization, root access, and storage writability
@@ -241,12 +241,15 @@ DA_GRAPHQL_PORT=4000 npm start
241
241
  - `adb_disconnect` — Disconnect wireless device(s)
242
242
  - `adb_tcpip` — Switch USB device to TCP/IP mode (auto-detects device IP)
243
243
 
244
- ### Port Forwarding (5 tools)
244
+ ### Port Forwarding (8 tools)
245
245
  - `adb_forward` — Forward a local port to a device port (host → device)
246
246
  - `adb_reverse` — Reverse-forward a device port to the host (device → host)
247
247
  - `adb_forward_list` — List all active forward and reverse port mappings
248
248
  - `adb_forward_remove` — Remove a port forward or all forwards
249
249
  - `adb_reverse_remove` — Remove a reverse forward or all reverse forwards
250
+ - `adb_tunnel_open` — Open a managed tunnel with opaque ID. Auto-picks a free host port for forward direction when omitted; registers cleanup so the tunnel is removed on server exit
251
+ - `adb_tunnel_list` — List active managed tunnels (those opened via adb_tunnel_open). Optional device filter; shows ID, direction, endpoints, and age
252
+ - `adb_tunnel_close` — Close a managed tunnel by ID, or close all at once with id="all"
250
253
 
251
254
  ### Emulator Management (3 tools)
252
255
  - `adb_avd_list` — List available AVDs (PC mode) or detect KVM/QEMU virtualization capabilities (on-device mode)
@@ -430,7 +433,12 @@ DA_GRAPHQL_PORT=4000 npm start
430
433
  - `adb_sensor_read` — Read current hardware sensor values via dumpsys sensorservice. Enumerates all sensors with vendor, type, mode, rate range, and wake capability. Returns last-known readings with timestamps and axis-labeled formatting. Category filter (13 categories) and listOnly discovery mode. No root required
431
434
  - `adb_iio_read` — Read raw hardware data from the Linux IIO subsystem. Auto-discovers IIO devices, classifies by kernel driver. On Tensor/Exynos: exposes per-rail ODPM power monitors showing real-time power consumption per SoC subsystem. Generic IIO path handles raw channels with calibrated scale+offset. Root required
432
435
 
433
- ## MCP Resources (4)
436
+ ### Result Handles (3 tools)
437
+ - `adb_result_list` — List active result handles in the tempdir-backed cache. Shows tool, name, size, age, and remaining TTL for each handle
438
+ - `adb_result_get` — Retrieve the content of a stored handle by tool + name. Returns the original content blocks as the source tool produced them; updates last-accessed time. For URI-based retrieval, use the `result://{tool}/{name}` MCP Resource instead
439
+ - `adb_result_drop` — Delete a stored result handle, or clear all handles in the current namespace. Pass both `tool` and `name` to drop one specific handle, or `all: true` to drop everything. Useful before changing DA_AUTH_TOKEN (which would otherwise leave orphans under the old token-hash directory)
440
+
441
+ ## MCP Resources (5)
434
442
 
435
443
  Read-only device state surfaces accessible by MCP clients:
436
444
 
@@ -438,6 +446,7 @@ Read-only device state surfaces accessible by MCP clients:
438
446
  - `device://info/{serial}` — Device properties (model, OS, build, ABI)
439
447
  - `device://battery/{serial}` — Parsed battery status (level, charging, temperature, voltage)
440
448
  - `device://telephony/{serial}` — Telephony registry state for cellular analysis
449
+ - `result://{tool}/{name}` — Stored tool result handle. Resolve by URI; created by tools that opt into result-handle storage via the `result_handle` parameter. Listed by adb_result_list
441
450
 
442
451
  ## MCP Prompts (4)
443
452
 
@@ -469,7 +478,7 @@ Full view tree capture via `uiautomator dump` with parsed XML extraction. Return
469
478
  Multi-layered security activated via `DA_SECURITY=true`. Provides command blocklist/allowlist filtering, rate limiting (commands per minute), and audit logging with automatic credential redaction. Security checks are integrated into `adb_shell`, `adb_root_shell`, `adb_multi_shell`, `adb_multi_compare`, `adb_input`, `adb_batch_actions`, and `adb_start_activity`. Configurable via environment variables for different deployment scenarios.
470
479
 
471
480
  ### Input Sanitization
472
- All tools that interpolate user-supplied parameters into shell command strings validate inputs against shell metacharacters before execution. Package names, property keys, service names, setting keys, test identifiers, network interface names, and tcpdump filters are all validated through a centralized `validateShellArg()` function that rejects `;`, `|`, `&`, `$`, backticks, parentheses, and other injection vectors. File paths use single-quoted shell escaping to prevent `$()` command substitution. The `adb_input` tool applies type-specific validation: `tap`/`swipe` accept only numeric coordinates, `keyevent` accepts only alphanumeric keycodes, and `text` is shell-escaped for literal delivery. The `adb_batch_actions` tool enforces the same per-action-type validation (digits-only for coordinates, alphanumeric for keycodes, shell-escape for text) and routes every assembled command through the security middleware. Deserialized JSON from snapshot files is validated before shell interpolation. Every `z.number()` parameter across all 198 tools has explicit `.min()/.max()` Zod bounds to prevent resource exhaustion from extreme values. The LocalBridge has explicit handlers for every ADB subcommand used by tool modules, preventing unquoted fallthrough to the default shell handler. In on-device mode, privilege escalation uses a frozen 16-command allowlist and restricted-path regex — the elevation set is `ReadonlySet` + `Object.freeze`, not configurable at runtime. The HTTP/SSE transport denies cross-origin requests by default (configurable via `DA_HTTP_CORS_ORIGIN`), the plugin registry verifies SHA-256 integrity hashes and prevents path traversal via directory containment checks, and the workflow engine enforces step count (200), sleep duration (5 min), and repeat iteration (100) limits. Fetch helpers enforce a 5 MB response body limit. Getprop output parsing handles Windows `\r\n` line endings via `.trim()` before regex matching, and dual SIM slot counts are capped at 4 to prevent resource exhaustion from corrupted device properties.
481
+ All tools that interpolate user-supplied parameters into shell command strings validate inputs against shell metacharacters before execution. Package names, property keys, service names, setting keys, test identifiers, network interface names, and tcpdump filters are all validated through a centralized `validateShellArg()` function that rejects `;`, `|`, `&`, `$`, backticks, parentheses, and other injection vectors. File paths use single-quoted shell escaping to prevent `$()` command substitution. The `adb_input` tool applies type-specific validation: `tap`/`swipe` accept only numeric coordinates, `keyevent` accepts only alphanumeric keycodes, and `text` is shell-escaped for literal delivery. The `adb_batch_actions` tool enforces the same per-action-type validation (digits-only for coordinates, alphanumeric for keycodes, shell-escape for text) and routes every assembled command through the security middleware. Deserialized JSON from snapshot files is validated before shell interpolation. Every `z.number()` parameter across all 204 tools has explicit `.min()/.max()` Zod bounds to prevent resource exhaustion from extreme values. The LocalBridge has explicit handlers for every ADB subcommand used by tool modules, preventing unquoted fallthrough to the default shell handler. In on-device mode, privilege escalation uses a frozen 16-command allowlist and restricted-path regex — the elevation set is `ReadonlySet` + `Object.freeze`, not configurable at runtime. The HTTP/SSE transport denies cross-origin requests by default (configurable via `DA_HTTP_CORS_ORIGIN`), the plugin registry verifies SHA-256 integrity hashes and prevents path traversal via directory containment checks, and the workflow engine enforces step count (200), sleep duration (5 min), and repeat iteration (100) limits. Fetch helpers enforce a 5 MB response body limit. Getprop output parsing handles Windows `\r\n` line endings via `.trim()` before regex matching, and dual SIM slot counts are capped at 4 to prevent resource exhaustion from corrupted device properties.
473
482
 
474
483
  ### Multi-Device Orchestration
475
484
  Run commands, install APKs, and compare outputs across multiple connected devices in parallel. Essential for comparative testing across Android versions and device models.
@@ -559,7 +568,7 @@ Scans the local network for ADB-enabled devices via ARP table queries and option
559
568
  On-device virtual machine management using QEMU with KVM hardware acceleration. Enables running guest Android VMs directly on the physical device — a capability unique to DeepADB. Dynamic resource allocation auto-detects host CPU cores and physical RAM, reserving 1 core and 35% of memory for the host OS to prevent starvation. Multi-VM support tracks resource consumption across concurrent VMs, refusing new VMs when the pool is exhausted rather than degrading host performance. Disk image management with qcow2 (sparse, snapshot-capable) and raw formats. ADB port forwarding to guest VMs enables DeepADB's full tool suite to target both host and guest devices simultaneously. Process lifecycle tracked via the centralized cleanup registry with SIGTERM/SIGKILL shutdown. Path containment verification on all image operations prevents directory traversal.
560
569
 
561
570
  ### ToolContext Architecture
562
- All 44 tool modules receive a unified `ToolContext` dependency bundle containing server, bridge, deviceManager, logger, security, and config. Adding new cross-cutting dependencies requires no module signature changes.
571
+ All 45 tool modules receive a unified `ToolContext` dependency bundle containing server, bridge, deviceManager, logger, security, and config. Adding new cross-cutting dependencies requires no module signature changes.
563
572
 
564
573
  ## Environment Variables
565
574
 
@@ -576,10 +585,18 @@ All 44 tool modules receive a unified `ToolContext` dependency bundle containing
576
585
  | `DA_RETRY_COUNT` | `1` | Number of retries for transient ADB failures |
577
586
  | `DA_RETRY_DELAY` | `500` | Base retry delay in ms (doubles each attempt) |
578
587
  | `DA_LOG_LEVEL` | `info` | Log level: debug, info, warn, error |
588
+ | `DA_ASCII_ONLY` | (auto-detect) | Set to `1` to force ASCII-only output in the startup warning banner. Default auto-detects via `WT_SESSION`/`TERM_PROGRAM`/`TERM` for Unicode-capable terminals; falls back to ASCII on legacy `cmd.exe`. |
589
+ | `DA_RESOURCE_CACHE_TTL_MS` | `0` (disabled) | MCP Resource cache TTL in ms. Set to a positive value to cache resource reads (device://info, device://battery, etc.) for that duration. |
590
+ | `DA_RESULT_HANDLE_DIR` | `{tempDir}/result-handles` | Storage root for tempdir-backed tool result handles. Override to relocate the store off the default temp directory. |
591
+ | `DA_RESULT_HANDLE_TTL` | `43200` (12h) | Per-handle TTL in seconds. Handles older than this are evicted on startup sweep and during periodic eviction. Bounded to [60, 7 days]. |
592
+ | `DA_RESULT_HANDLE_MAX_BYTES` | `5242880` (5 MB) | Per-handle size cap. Tools attempting to store a content block larger than this fail with an error. |
593
+ | `DA_RESULT_HANDLE_TOTAL_BYTES` | `104857600` (100 MB) | Total result-handle store size cap across all handles. Triggers LRU eviction when exceeded. |
594
+ | `DA_RESULT_HANDLE_MAX_COUNT` | `100` | Maximum number of active handles. Triggers LRU eviction when exceeded. |
579
595
  | `DA_SECURITY` | `false` | Enable security middleware (command filtering, rate limiting) |
580
596
  | `DA_BLOCKED_COMMANDS` | (none) | Comma-separated list of blocked shell command substrings |
581
597
  | `DA_ALLOWED_COMMANDS` | (none) | Comma-separated allowlist (if set, only matching commands run) |
582
- | `DA_RATE_LIMIT` | `0` | Max commands per minute (0 = unlimited) |
598
+ | `DA_RATE_LIMIT` | `0` | Max commands per minute (0 = unlimited) |
599
+ | `DA_CI_PING_TARGET` | `1.1.1.1` | Network reachability target used by `adb_ci_device_ready` (network reachability is one of the readiness checks alongside boot completion, ADB authorization, and package manager availability). Override to point at an internal target if `1.1.1.1` is firewalled. |
583
600
  | `DA_AUDIT_LOG` | `true` | Log all executed commands for audit trail (set to `false` to disable) |
584
601
  | `DA_PLUGIN_DIR` | `{tempDir}/plugins` | Directory to scan for plugin .js modules at startup |
585
602
  | `DA_REGISTRY_URL` | GitHub default | URL of the community plugin registry JSON manifest |
@@ -591,7 +608,8 @@ All 44 tool modules receive a unified `ToolContext` dependency bundle containing
591
608
  | `DA_WS_CORS_ORIGIN` | (none — deny) | Allowed CORS origin for WebSocket health endpoint |
592
609
  | `DA_GRAPHQL_PORT` | (disabled) | Set to a port number to enable the GraphQL API endpoint (requires `npm install graphql`) |
593
610
  | `DA_GRAPHQL_CORS_ORIGIN` | (none — deny) | Allowed CORS origin for GraphQL API |
594
- | `DA_WORKFLOW_REGISTRY_URL` | (derived from DA_REGISTRY_URL) | URL of the workflow marketplace JSON manifest |
611
+ | `DA_WORKFLOW_REGISTRY_URL` | (derived from DA_REGISTRY_URL) | URL of the workflow marketplace JSON manifest |
612
+ | `DA_TEST_PIN` | (none) | Numeric PIN used by `tests/test-ui-control.mjs` to exercise screen-lock/unlock tests. Without it, the 4 lock-state tests skip. Format: `DA_TEST_PIN=0000 npm test`. |
595
613
 
596
614
  ## Project Structure
597
615
 
@@ -622,7 +640,7 @@ DeepADB/
622
640
  │ │ ├── screen-record.ts # Screen video recording start/stop (2 tools)
623
641
  │ │ ├── control.ts # Airplane, WiFi, data, location, screen, settings, reboot (9 tools)
624
642
  │ │ ├── wireless.ts # WiFi pairing, connect, disconnect, TCP/IP (4 tools)
625
- │ │ ├── forwarding.ts # Port forwarding — forward, reverse, list, remove (5 tools)
643
+ │ │ ├── forwarding.ts # Port forwarding — forward, reverse, list, remove, managed tunnels with auto-port-pick (8 tools)
626
644
  │ │ ├── emulator.ts # AVD list, start, stop with on-device KVM/QEMU detection (3 tools)
627
645
  │ │ ├── qemu.ts # QEMU/KVM VM management — setup, images, start, stop, status, guest ADB connect/disconnect/shell (8 tools)
628
646
  │ │ ├── testing.ts # Structured test sessions with numbered steps (3 tools)
@@ -650,10 +668,11 @@ DeepADB/
650
668
  │ │ ├── selinux-audit.ts # SELinux status, AVC denials, permission auditing (3 tools)
651
669
  │ │ ├── thermal-power.ts # Thermal zones, CPU frequency, battery drain (3 tools)
652
670
  │ │ ├── network-discovery.ts # ADB-over-network scanning and auto-connect (3 tools)
653
- │ │ ├── sensors.ts # Hardware sensor enumeration, IIO power monitor reading (2 tools)
671
+ │ │ ├── sensors.ts # Hardware sensor enumeration, IIO power monitor reading (2 tools)
672
+ │ │ ├── result-handles.ts # Tempdir-backed result handle store — list, drop, drop-all (3 tools) + the result://{tool}/{name} resource
654
673
  │ │ ├── wireless-firmware.ts # WiFi, Bluetooth, NFC, GPS firmware identification (4 tools)
655
674
  │ │ ├── build.ts # Gradle build and install (2 tools)
656
- │ │ ├── resources.ts # MCP Resources — device state surfaces (4 resources)
675
+ │ │ ├── resources.ts # MCP Resources — 4 device-state surfaces: device://info|battery|telephony|list (5th, result://, lives in result-handles.ts)
657
676
  │ │ └── prompts.ts # MCP Prompts — workflow templates (4 prompts)
658
677
  │ ├── middleware/
659
678
  │ │ ├── auth.ts # Bearer token authentication for network transports (DA_AUTH_TOKEN)
@@ -665,7 +684,10 @@ DeepADB/
665
684
  │ │ ├── png-utils.ts # Zero-dependency PNG decode/encode/draw primitives for screenshot annotation and diffing
666
685
  │ │ ├── ui-dump.ts # Shared uiautomator XML capture with concurrent-safe paths, on-device /data/local/tmp routing, and cleanup
667
686
  │ │ ├── cleanup.ts # Centralized process cleanup registry for SIGINT/SIGTERM/exit
668
- │ │ └── logger.ts # stderr-safe logging (MCP-compliant)
687
+ │ │ ├── logger.ts # stderr-safe logging (MCP-compliant)
688
+ │ │ ├── fs-utils.ts # Filename sanitization, atomic write, private-dir helpers, within-dir containment check
689
+ │ │ ├── parse-utils.ts # Shared parseIntSafe for env-var numeric parsing (single source of truth)
690
+ │ │ └── result-handle.ts # Tempdir-backed tool result content cache with TTL, LRU, and token-hash isolation
669
691
  │ └── config/
670
692
  │ └── config.ts # Configuration, env vars, startup validation
671
693
  ├── package.json
@@ -675,21 +697,25 @@ DeepADB/
675
697
  ├── README.md
676
698
  ├── SECURITY.md # Threat model, security architecture, deployment hardening, vulnerability reporting
677
699
  ├── CHANGELOG.md # Version history from v0.1.0 to current
678
- ├── LICENSE # MIT license
700
+ ├── LICENSE # Apache 2.0 license
679
701
  └── tests/
680
702
  ├── run-all.mjs # Run all test suites sequentially with summary (tracks skipped counts)
681
703
  ├── test-hw.mjs # Hardware core: health, identity, baseband, thermal, profiles, wireless firmware, crash analysis (34 tests)
682
704
  ├── test-shell-files.mjs # Shell, filesystem, packages, diagnostics (24 tests)
683
705
  ├── test-ui-control.mjs # UI hierarchy, screenshots, settings, input gestures, UI automation, device awareness, accessibility, screen lock/unlock, multi-touch (46 tests)
684
- ├── test-monitoring.mjs # Logcat watchers, snapshots, OTA, regression, workflows (25 tests)
685
- ├── test-security.mjs # Input sanitization, shell injection, AT command safety, QEMU shell escaping, heap-dump validation (46 tests)
706
+ ├── test-monitoring.mjs # Logcat watchers, snapshots, OTA, regression, workflows (43 tests)
707
+ ├── test-security.mjs # Input sanitization, shell injection, AT command safety, QEMU shell escaping, heap-dump validation (116 on-device, 105 host)
686
708
  ├── test-lifecycle.mjs # App lifecycle, file push/pull, input, port forwarding, screen recording, test sessions (24 tests)
687
709
  ├── test-analysis.mjs # Thermal/snapshot/regression comparison, firmware diff, screenshot diff, test gen, RIL intercept, AT cross-validation, permission management (23 tests)
688
- ├── test-boundaries.mjs # Zod bounds enforcement, input injection, error paths, sensitive data protection, wireless ADB coverage, multi-device basics (46 tests)
710
+ ├── test-boundaries.mjs # Zod bounds enforcement, input injection, error paths, sensitive data protection, wireless ADB coverage, multi-device basics, tunnel automation, device-free coverage boundaries (78 tests)
689
711
  ├── test-sensors.mjs # HAL sensors, IIO power monitors, category filters, formatting, wake-up, rate display (30 tests)
690
- ├── test-files-extended.mjs # File tool coverage — write, find, stat, checksum, mkdir, rm, move, copy, chmod, touch, fsinfo, chown, grep, replace; push safety; sed-escape regression (95 tests)
712
+ ├── test-files-extended.mjs # File tool coverage — write, find, stat, checksum, mkdir, rm, move, copy, chmod, touch, fsinfo, chown, grep, replace; push safety; sed-escape regression (95 tests)
713
+ ├── test-result-handles.mjs # Result handle store — listing, retrieval, drop, isolation, eviction (19 tests)
691
714
  ├── test-qemu.mjs # QEMU/KVM setup, image management, VM status, guest connectivity errors (13 on-device tests)
692
- ├── test-qemu-boot.mjs # QEMU Alpine VM boot with auto-fetch of kernel/initrd, KVM acceleration, topology detection, guest ADB connectivity (17 on-device tests)
715
+ ├── test-qemu-boot.mjs # QEMU Alpine VM boot with auto-fetch of kernel/initrd, KVM acceleration, topology detection, guest ADB connectivity (17 on-device tests)
716
+ ├── test-supply-chain.mjs # Supply-chain hardening checks for fetch and network paths (24 tests)
717
+ ├── test-sanitize-fuzz.mjs # Property-based fuzzing of shell sanitizers — shellQuote/shellEscape round-trip, validateShellArg rejection (19 tests)
718
+ ├── test-transports.mjs # Transport smoke — HTTP/SSE + WebSocket MCP round-trip, GraphQL health query (8 tests)
693
719
  └── lib/
694
720
  └── harness.mjs # Shared test harness (stdio JSON-RPC transport, assertion primitives)
695
721
  ```
@@ -699,9 +725,9 @@ DeepADB/
699
725
  - **Runtime**: Node.js ≥22 (ES2024, ESM)
700
726
  - **Language**: TypeScript 6.0 (strict mode, NodeNext module resolution)
701
727
  - **MCP SDK**: `@modelcontextprotocol/sdk` ^1.24.0 (currently resolves to 1.29.0)
702
- - **Validation**: Zod ^3.25.0
728
+ - **Validation**: Zod ^4.4.3
703
729
  - **Transport**: stdio (JSON-RPC), HTTP/SSE, WebSocket (optional `ws`), GraphQL API (optional `graphql`)
704
730
 
705
731
  ## License
706
732
 
707
- MIT
733
+ Apache License 2.0 — see [LICENSE](LICENSE) and [NOTICE](NOTICE). The v1.1.2 release migrated from MIT to Apache 2.0 for the explicit patent grant and contributor attribution requirements; existing forks/installs remain valid under the prior MIT terms.
@@ -54,6 +54,20 @@ export declare class AdbBridge {
54
54
  *
55
55
  * In ADB mode: spawns `adb -s <serial> <args...>`
56
56
  * LocalBridge overrides this to spawn commands directly.
57
+ *
58
+ * N6 CALLER CONTRACT: there is NO built-in size budget on accumulated
59
+ * stdout/stderr from the returned ChildProcess. A caller that forgets
60
+ * to drain stdout (no `.on("data", ...)` handler) will accumulate
61
+ * indefinitely in the OS pipe buffer until the child blocks on write.
62
+ * Current callers (logcat-watch.ts, ril-intercept.ts) implement their
63
+ * own ring-buffering with bounded size. Any new caller MUST either:
64
+ * (1) drain stdout via a handler that bounds in-memory accumulation,
65
+ * OR
66
+ * (2) discard stdout via `stdio: ["ignore", "ignore", "ignore"]`
67
+ * (override the default below) if output isn't needed,
68
+ * OR
69
+ * (3) pipe stdout to a file via Node's `pipe()` with rotation.
70
+ * Forgetting to drain is the most common spawn-based memory leak.
57
71
  */
58
72
  spawnStreaming(args: string[], device?: string): ChildProcess;
59
73
  }
@@ -1 +1 @@
1
- {"version":3,"file":"adb-bridge.d.ts","sourceRoot":"","sources":["../../src/bridge/adb-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAoC,YAAY,EAAE,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGjD,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,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AKhC,oDAAoD;IAC9C,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAS9B;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY;CAe9D;AAED,8CAA8C;AAC9C,qBAAa,QAAS,SAAQ,KAAK;IACjC,SAAgB,MAAM,EAAE,SAAS,CAAC;gBAEtB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS;CAK/C"}
@@ -1,3 +1,5 @@
1
+ // Copyright 2026 Jason <fullread@github>
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /**
2
4
  * ADB Bridge — Core subprocess wrapper for all ADB interactions.
3
5
  *
@@ -7,16 +9,29 @@
7
9
  */
8
10
  import { execFile, spawn } from "child_process";
9
11
  import { config } from "../config/config.js";
10
- import { shellEscape } from "../middleware/sanitize.js";
11
- /** Patterns in stderr/message that indicate a transient, retryable failure. */
12
+ import { shellQuote } from "../middleware/sanitize.js";
13
+ /**
14
+ * Patterns in stderr/message that indicate a transient, retryable failure.
15
+ *
16
+ * D2: each pattern is specific enough to avoid false positives from a tool's
17
+ * USER output. "closed" alone would have triggered retries on any tool whose
18
+ * output contained the word "closed" (e.g., `dumpsys activity | grep closed`);
19
+ * the anchored variants below only fire on adb's own transport-level errors.
20
+ */
12
21
  const TRANSIENT_PATTERNS = [
13
22
  "device not found",
14
23
  "device offline",
15
24
  "no devices/emulators found",
16
25
  "protocol fault",
17
- "closed",
18
- "Connection reset",
26
+ "error: closed", // adb transport-closed (was bare "closed")
27
+ "connection reset by peer", // network-level reset (was bare "Connection reset")
19
28
  "ECONNRESET",
29
+ // N1 fix: removed "device unauthorized" — ADB authorization is a one-time
30
+ // user action (accept prompt on device screen), not a transient transport
31
+ // hiccup. Retrying it wastes the retry budget; let the operator see the
32
+ // unauthorized error immediately so they know to look at the device.
33
+ "daemon not running",
34
+ "cannot connect to daemon",
20
35
  ];
21
36
  function isTransientError(error) {
22
37
  const msg = error instanceof Error ? error.message : String(error);
@@ -113,7 +128,7 @@ export class AdbBridge {
113
128
  }
114
129
  /** Execute a root shell command (via su). */
115
130
  async rootShell(command, options = {}) {
116
- return this.exec(["shell", `su -c '${shellEscape(command)}'`], options);
131
+ return this.exec(["shell", `su -c ${shellQuote(command)}`], options);
117
132
  }
118
133
  /** Verify ADB is accessible and return version info. */
119
134
  async version() {
@@ -137,6 +152,20 @@ export class AdbBridge {
137
152
  *
138
153
  * In ADB mode: spawns `adb -s <serial> <args...>`
139
154
  * LocalBridge overrides this to spawn commands directly.
155
+ *
156
+ * N6 CALLER CONTRACT: there is NO built-in size budget on accumulated
157
+ * stdout/stderr from the returned ChildProcess. A caller that forgets
158
+ * to drain stdout (no `.on("data", ...)` handler) will accumulate
159
+ * indefinitely in the OS pipe buffer until the child blocks on write.
160
+ * Current callers (logcat-watch.ts, ril-intercept.ts) implement their
161
+ * own ring-buffering with bounded size. Any new caller MUST either:
162
+ * (1) drain stdout via a handler that bounds in-memory accumulation,
163
+ * OR
164
+ * (2) discard stdout via `stdio: ["ignore", "ignore", "ignore"]`
165
+ * (override the default below) if output isn't needed,
166
+ * OR
167
+ * (3) pipe stdout to a file via Node's `pipe()` with rotation.
168
+ * Forgetting to drain is the most common spawn-based memory leak.
140
169
  */
141
170
  spawnStreaming(args, device) {
142
171
  const serial = device || config.defaultDevice;
@@ -1 +1 @@
1
- {"version":3,"file":"adb-bridge.js","sourceRoot":"","sources":["../../src/bridge/adb-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAmB,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAsBxD,+EAA+E;AAC/E,MAAM,kBAAkB,GAAG;IACzB,kBAAkB;IAClB,gBAAgB;IAChB,4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