A cranked generator and a linearly moving magnet both work on the same Faraday principle.

The wire in the shaker lights doesn't store the energy. (Yes inductors do store energy but not enough to run an LED for minutes.) There must be a small rechargeable battery or capacitor in there.

When (not if) my kids break these I'll do thorough analysis.
_________________________
- Tom S.

"Never trust and engineer who doesn't carry a pocketknife."