2 May 2020 - Magnetometer Testing

Software

Code - GitHub - PrivateKit/private-kit at magnetometer

ย Commit 334cd86

Environment

  • Device A - Samsung Galaxy S8 running Android 9

  • Device B - Google Pixel 3a running Android 10

  • Linux system acting as server endpoint (phones connected via USB)

Limitations

  • Human error in distance measurement +/- 2cm

  • Only Android and two types of device used

  • The phones remained flat, although it is known that tilting the phone changes the outputs

ย Method

  1. Built and installed APK via USB to both phones

  2. Over 45 minutes (with a tape measure) moving the two devices running the app around at distances between 0 and 320cm (changing distance every two minutes)

  3. Extracted the readings from the phone databases manually (method)

  4. For some hours, measurements continued to be collected indoors, although distances were not measured.

Observations & Analysis

It is notable that no new permissions were requested by the phone.

In terms of the results, this requires data science support. The x,y,z points need to be transformed to a value that should correlate with distance. See work to prepare the data here: privkittools/Magnetometer.ipynb at master ยท AdamLeonSmith/privkittools

Detailed Results

See attached files for the measurement data.