I am trying to create a test automation for my mobile app and I need to be able to simulate various accelerometer readings which would happen while the user is using the app.
I originally thought using ADB with and android emulator would work. However the command that is documented to work does not.
$ ./adb shell sensor set acceleration 1:1:1
/system/bin/sh: sensor: inaccessible or not found
Is there a specific software version or emulator or hardware which i need to use to enable the above command?
Can I do similar type tests with an iphone?
you are using the wrong command, sensor set accelerometer is an emulator console command for which you have to use
./adb emu sensor set acceleration 1:1:1command.This will help you understand, https://helpmanual.io/help/adb/