> ## Documentation Index
> Fetch the complete documentation index at: https://qawolf-mintlify-79e74a8b.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Mock hardware sensors (Android)

> Simulate accelerometer, gyroscope, light, and pressure sensor input on the Android emulator.

Use `device.adb(...)` to send `adb emu sensor set` commands during a flow. This lets you simulate hardware sensor input and test how your app responds.

```typescript theme={null}
import { device } from "@qawolf/flows/android";
```

See the [Android emulator sensor documentation](https://developer.android.com/studio/run/emulator-console#sensor-set) for available sensor names and value formats.

<Note>
  Sensor commands affect the emulator's sensor state directly. They work on emulators only — not physical devices.
</Note>

## Examples

**Accelerometer**

```typescript theme={null}
await device.adb("emu sensor set acceleration 19:9.81:0");
```

**Gyroscope**

```typescript theme={null}
await device.adb("emu sensor set gyroscope 0.00:0.00:1.00");
```

**Light**

```typescript theme={null}
await device.adb("emu sensor set light 100");
```

**Pressure**

```typescript theme={null}
await device.adb("emu sensor set pressure 10");
```

## When to use

* Your app responds to device tilt or motion and you need to test that behavior.
* Your app adjusts UI based on ambient light levels.
* Your app reads barometric pressure for altitude or weather features.
* Your app uses gyroscope data for orientation or gesture detection.
