Skip to main content

Shake

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Shake the device — what shake-to-undo, shake-to-report and a debug menu listen for. These call app_shake.

Shake​

func (d *Device) Shake(ctx context.Context) error

Shake shakes an emulator or simulator — what shake-to-undo and shake-to-report listen for. Whether the app reacts is up to its own detector, so check the screen after. A real phone returns an error.

Examples​

Shake the device​

if err := dev.Shake(ctx); err != nil {
return err
}

The same call from the command line, mobium shake, printed on an Android 15 emulator:

sent a shake on the emulator's accelerometer, ±20 m/s² side to side for about 1.5s, then back at rest; whether the app reacts is up to its own shake detector