android-agent-bridge 0.1.3 → 0.1.4
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.
- package/README.md +6 -0
- package/package.json +1 -1
- package/server/cli.mjs +11 -1
package/README.md
CHANGED
|
@@ -20,6 +20,12 @@ One `npx` command on the computer, one QR scan on the phone.
|
|
|
20
20
|
|
|
21
21
|
<br/>
|
|
22
22
|
|
|
23
|
+
<a href="https://rudrasamadhiya.github.io/android-agent-bridge/video/"><img src="https://raw.githubusercontent.com/Rudrasamadhiya/android-agent-bridge/main/docs/video/preview.gif" width="720" alt="Agent Bridge in 6 seconds: an agent taps, types and scrolls a real phone. Click to watch the full film." /></a>
|
|
24
|
+
|
|
25
|
+
**[▶ Watch the film (1:30)](https://rudrasamadhiya.github.io/android-agent-bridge/video/)**
|
|
26
|
+
|
|
27
|
+
<br/>
|
|
28
|
+
|
|
23
29
|
<img src="https://raw.githubusercontent.com/Rudrasamadhiya/android-agent-bridge/main/docs/screens/app-connect.webp" width="230" alt="Connect tab" />
|
|
24
30
|
<img src="https://raw.githubusercontent.com/Rudrasamadhiya/android-agent-bridge/main/docs/screens/uber-choose-trip.webp" width="230" alt="An agent choosing a ride in Uber" />
|
|
25
31
|
<img src="https://raw.githubusercontent.com/Rudrasamadhiya/android-agent-bridge/main/docs/screens/app-transfer.webp" width="230" alt="Transfer tab" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "android-agent-bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Give AI agents (Claude Code, Cursor, Antigravity) your whole Android phone: screenshots with numbered elements and a tap grid, tap, type, scroll, open apps. Pair once by QR over Wi-Fi or plug in USB. Android 5.0+.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"android",
|
package/server/cli.mjs
CHANGED
|
@@ -260,7 +260,17 @@ function findApk() {
|
|
|
260
260
|
|
|
261
261
|
async function usb() {
|
|
262
262
|
await ensureAdb().catch((e) => die(e.message));
|
|
263
|
-
|
|
263
|
+
// a freshly started adb takes a moment to see a phone, so look a few times before giving up
|
|
264
|
+
let list = [];
|
|
265
|
+
for (let i = 0; i < 8 && !list.length; i++) {
|
|
266
|
+
list = await devices().catch((e) => die(e.message));
|
|
267
|
+
if (list.length) break;
|
|
268
|
+
const raw = await adb(['devices'], { serial: null }).catch(() => '');
|
|
269
|
+
if (/\tunauthorized/.test(raw)) {
|
|
270
|
+
if (i === 0) console.log('Phone found. On the phone, tap "Allow" on the "Allow USB debugging?" prompt (tick "Always allow").');
|
|
271
|
+
} else if (i >= 3) break;
|
|
272
|
+
await wait(1500);
|
|
273
|
+
}
|
|
264
274
|
if (!list.length) {
|
|
265
275
|
die('No phone found over USB.\n1. Settings → About phone → tap "Build number" 7 times (developer mode).\n2. Settings → Developer options → turn on USB debugging.\n3. Plug the phone in and accept the "Allow USB debugging?" prompt.\n\nNo cable? Android 11+ can do this over Wi-Fi: npx android-agent-bridge wifi');
|
|
266
276
|
}
|