MCPcopy Index your code
hub / github.com/callstack/agent-device / probeAndroidFeature

Function probeAndroidFeature

src/platforms/android/devices.ts:165–178  ·  view source on GitHub ↗
(serial: string, feature: string)

Source from the content-addressed store, hash-verified

163}
164
165async function probeAndroidFeature(serial: string, feature: string): Promise<boolean | null> {
166 const result = await runCmd(
167 'adb',
168 adbArgs(serial, ['shell', 'cmd', 'package', 'has-feature', feature]),
169 {
170 allowFailure: true,
171 timeoutMs: ANDROID_BOOT_PROP_TIMEOUT_MS,
172 },
173 );
174 const output = commandOutput(result).toLowerCase();
175 if (output.includes('true')) return true;
176 if (output.includes('false')) return false;
177 return null;
178}
179
180async function hasAnyAndroidTvFeature(serial: string): Promise<boolean> {
181 const featureChecks = await mapWithConcurrency(

Callers 1

hasAnyAndroidTvFeatureFunction · 0.85

Calls 3

runCmdFunction · 0.90
adbArgsFunction · 0.85
commandOutputFunction · 0.85

Tested by

no test coverage detected