The back camera watches a fixed surface and measures how much your hand moves, then how fast it shakes.
Point the camera at something with texture, hold still, and wait four seconds.
idle
Motion is measured by matching patches between frames, then a real FFT finds the dominant rate. Holding the phone in two hands should halve the number.