The best way to control Claude Code, Codex and more from any computer or phone
fix(server): Macs without Android no longer show avdmanager discovery warnings (#25815)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Theo Browne committed
Oct 27, 2026 at 00:41 UTC
6bbb2d85080d1c824e8c39a883f0f96122304b9a
2 files changed
+21
-2
apps/server/src/device/DeviceHubOperations.ts
+4
-1
@@ -97,8 +97,11 @@ export const makeDeviceHubOperations = (options: {
97
"list",
98
);
99
const devices: Array<HostDevice> = [...hubList.simulators, ...hubList.emulators];
100
+ const androidAvailable = yield* options.androidAvailable;
101
const warnings = hubList.errors?.filter(
102
(error) =>
103
+ // The host summary already explains a missing Android SDK; the hub's failed probes are noise.
104
+ !(!androidAvailable && error.message.startsWith("[android-utils] ")) &&
105
// CoreSimulator can retain deleted devices; their optional usage timestamps are absent.
106
!(
107
error.message.startsWith("[apple-utils] Failed to read CoreSimulator plist at ") &&
@@ -108,7 +111,7 @@ export const makeDeviceHubOperations = (options: {
111
);
112
const details = warnings?.map((error) => error.message) ?? [];
113
let androidDiscoveryIncomplete = false;
111
- if (yield* options.androidAvailable) {
114
+ if (androidAvailable) {
115
const avds = yield* run("emulator", ["-list-avds"]);
116
// Discovered devices stay listed; the AVDs that could not be listed are a warning.
117
if (avds.code !== 0) {
apps/server/src/device/DeviceService.test.ts
+17
-1
@@ -58,6 +58,7 @@ const fixture = Effect.fn("fixture")(function* (
58
const requests: string[] = [];
59
const devices: Array<Omit<DeviceSummary, "hostId">> = [];
60
const discoveryErrors = yield* Ref.make<Array<{ message: string; error?: string }>>([]);
61
+ const androidAvailable = yield* Ref.make(true);
62
const encoderResult = yield* Ref.make({ code: 0, stdout: " V....D libx264", stderr: "" });
63
let booted = false;
64
let shutDown = false;
@@ -127,7 +128,7 @@ const fixture = Effect.fn("fixture")(function* (
128
origin: "http://device.test",
129
http,
130
run,
130
- androidAvailable: Effect.succeed(true),
131
+ androidAvailable: Ref.get(androidAvailable),
132
}),
133
...(options.endsDevices ? { endsDevices: true } : {}),
134
},
@@ -230,6 +231,7 @@ const fixture = Effect.fn("fixture")(function* (
231
devices,
232
encoderResult,
233
discoveryErrors,
234
+ androidAvailable,
235
endDevice,
236
};
237
});
@@ -506,6 +508,20 @@ it.effect("keeps other discovery warnings and clears them when only a deleted pl
508
}).pipe(Effect.scoped),
509
);
510
511
+it.effect("hides Android discovery failures when the host has no Android SDK", () =>
512
+ Effect.gen(function* () {
513
+ const { service, discoveryErrors, androidAvailable } = yield* fixture();
514
+ const avdmanagerFailure = { message: "[android-utils] Failed to run `avdmanager list avd`:" };
515
+ yield* Ref.set(discoveryErrors, [avdmanagerFailure, { message: "iOS discovery failed." }]);
516
+ yield* Ref.set(androidAvailable, false);
517
+ const withoutSdk = yield* service.configure({ enabled: true });
518
+ expect(withoutSdk.hostStatusDetail).toBe("iOS discovery failed.");
519
+ yield* Ref.set(androidAvailable, true);
520
+ const withSdk = yield* service.list;
521
+ expect(withSdk.hostStatusDetail).toBe(`${avdmanagerFailure.message}\niOS discovery failed.`);
522
+ }).pipe(Effect.scoped),
523
+);
524
+
525
it.effect.each([
526
{
527
diagnostic: "Insufficient disk space at /private/user/path",