Raw accelerometer and gyroscope
Reads raw motion sensor streams with no prompt.
In one line
Can see how your phone moves and tilts, with no prompt
Reads raw motion sensor streams with no prompt.
Accelerometer and gyro readings can infer taps, typing, gait and a device-specific calibration fingerprint. Both OSes cap or restrict background use.
What it can and can't do
What the user does: Nothing. It happens when a game, map or app uses motion
It can
- Get accelerometer and gyroscope readings (tilt and shake)
- Use motion for games, steps and compass features
- Sample about 100 times a second on iPhone
- Sample above 200 times a second on Android if the app declares it
It cannot
- Sample above 200 Hz on Android 12 and newer without declaring it
- Keep going in the background on iPhone; updates stop when the app is suspended
- See your location from motion alone
- Use motion in Safari on iPhone without a permission since iOS 12.2
How it differs between platforms: Android 12 caps rate at 200 Hz unless declared. iPhone caps near 100 Hz and stops in the background.
On Android and iPhone
| Android | iPhone | |
|---|---|---|
| Status | Supported | Supported |
| First version | Android 1.0 (API 1) | iOS 4 |
| Permission or entitlement | HIGH_SAMPLING_RATE_SENSORS (normal, API 31) above 200 Hz | prompt |
| Protection level | normal | none |
| How access is granted | install | none |
| What the user sees | None | None; NSMotionUsageDescription only for activity and pedometer APIs |
| How long it lasts | Until app stops or goes to background (API 28 blocks background sensor events) | While the app runs |
| How to take it back | n/a | n/a |
| Store policy | None listed | None listed |
| API | SensorManager, SENSOR_DELAY_FASTEST | CMMotionManager, accelerometerUpdateInterval |
| Notes | Without the permission Android 12 caps accelerometer, gyro and magnetometer at 200 Hz | Typical device cap about 100 Hz; background updates stop when suspended |
Data you get
What comes back: 3 axis acceleration and rotation rate
Shape: stream
How often: continuous
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
rate | float | Hz | up to about 200 Hz Android, about 100 Hz iOS | Not listed |
calibration | float | m/s2 | per device bias | enables fingerprinting |
Technical limits
- Background delivery blocked on both
- Browsers gate these behind a prompt on iOS Safari
- Background access blocked on Android 9 and later
- iOS motion activity needs a prompt
The story
What it is
An app reads the raw accelerometer and gyroscope, which measure how your phone tilts and shakes.
For you
You never see a prompt. When you tilt your phone to steer a car, or shake to undo, apps are reading these sensors. The same stream can quietly reveal how you walk, tap or hold the phone.
For makers
Makers use it for steering in games, AR, step counting and shake gestures. The signal can also be used to guess taps, gait and typing, and each chip has a tiny unique error that can mark one phone.
Where you see it
| Type | Example | Apps |
|---|---|---|
| games | A racing game lets you steer by tilting the phone. | Asphalt 9, Real Racing 3 |
| ar-vr | An AR app keeps its virtual objects fixed in your room by tracking how the phone moves. | IKEA Place, Pokemon GO |
| creative | A photo app straightens your image using the tilt of the phone. | None named |
| fitness | A step counter finds your steps from the bounce of your walk. | None named |
| security | A bank app checks natural hand movement to tell a person from a bot. | None named |
| ads | A hidden script reads the sensors to build a device fingerprint or guess your taps. | None named |
Risks
- Device fingerprint
- Taps and typing inferred
Android and iPhone in short
- Android: Android 12 limits the speed of these sensors without a special permission, which blunts some attacks.
- iPhone: iPhone gives no prompt for raw motion on a normal app, and Safari asks for motion access on websites.
What the platform says
- Google: Motion sensors. Android lets apps read motion sensors to detect tilt, shake and rotation.
- Apple: Core Motion. Apple's framework for accelerometer, gyroscope and device motion in apps.
Good uses and abuse
Legitimate uses
- Games
- Step counters
Known abuse
- Sensor fingerprinting, keylogging via motion
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 3 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 10 | Rough identifying entropy, when known |
History
- 2018-08, Android 9 (API 28): Sensor events stop for background apps
- 2018-12, Android 9 (API 28): Background apps stop getting sensor events
- 2021-10, Android 12 (API 31): 200 Hz cap unless HIGH_SAMPLING_RATE_SENSORS declared
- 2021-10, Android 12 (API 31): Rate capped at 200 Hz unless HIGH_SAMPLING_RATE_SENSORS declared
Related capabilities
Related
- Motion and fitness activity. Can see your steps and whether you walk, run, drive or cycle, after you allow
- Sensor calibration fingerprint (SensorID). Can maybe recognize your phone from tiny sensor flaws, with no ID or prompt
- Motion sensors as a side channel. Can maybe pick up nearby speech or typing taps from motion sensors, in research
Same idea on the web
- Accelerometer, LinearAccelerationSensor, GravitySensor. Can feel how your device moves and rests while the page is open
- Gyroscope. Can feel how fast your device turns while the page is open
Sources
- Android: Sensors overview and rate limit
- Apple: CMMotionManager
- Apple: Core Motion
- Android 12 behavior changes
How well checked: Based on official documentation.