Accelerometer

MOTIVATION Readings from the Accelerometer, LinearAccelerationSensor, and GravitySensor of the Generic Sensor API should be secured as they provide a potentially valuable data for creating fingerprints. There are multiple options. A unique fingerprint can be obtained by describing the device's vibrations (See https://link.springer.com/chapter/10.1007/978-3-319-30806-7_7). Using trajectory inference and matching of the model to map data, one may use the readings from the Accelerometer to determing the device's position (See https://www.researchgate.net/publication/220990763_ACComplice_Location_ inference_using_accelerometers_on_smartphones).

WRAPPING The wrapper replaces the "XYZ" getters of the Accelerometer sensor, LinearAccelerationSensor, and GravitySensor. The wrapping's goal is to simulate a stationary device that is lying bottom down on a flat surface, e.g., a cell phone on the table. In such a case, only the z axis is affected by gravity. The x and y axes values should be set to zero. Yet, there could be vibrations that may change values a little bit, e.g., to spin around -0.1 to +0.1. This usually does not happed with every reading but only in intervals of seconds. And thus, after a few seconds we pseudo-randomly change these values. For the LinearAccelerationSensor, the returned values should represent the acceleration without the conribution of gravity. For stationary devices, the x and y are zeroes, while the 'z' portion fluctuates between 0 and 0.1 on the examined devices. The wrapper simulates the same behavior. Lastly, the GravitySensor's readings are calculated as the difference between the previous two.

POSSIBLE IMPROVEMENTS Currently, we assume te device is lying on a flat surface bottom down, and thus only the z is affected by gravity. As improvement, we can also assume the device is in an oblique position. In this case, the gravitational acceleration would affect two or three axes. Those will have to be updated properly to create a realistic behavior.