How can i simulate accelerometer in android emulator? [closed]

The Android emulator doesn’t support it itself but OpenIntents’ SensorSimulator fills the void. Download and unpack the zip file, then start the standalone jar file:

$ java -jar bin/sensorsimulator.jar

Next, install SensorSimulatorSettings on the emulator using the adb tool which comes with the SDK:

$ adb -s <emulator device> install bin/SensorSimulatorSettings.apk

(run adb devices to find the emulator device name). Finally, run the installed SensorSimulatorSettings app in the emulator and enter the IP address 10.0.2.2 (despite what the SensorSimulator application might suggest. This is an alias to the loopback device of the development host so should always be valid.

Leave a Comment