简体   繁体   中英

Getting hardware sensor data from the apk of an android app

I am new to Java and android. I am doing a study project on android apps, where in I have to know how these apps are using the motion sensor data. For that I need to decompile and get the source code. I decompiled using two or three of the tools available. But in every app I decompiled, the hardware sensor data is obfuscated. I tried using deobfuscating option in jadx decompiling tool and it did'nt work. The sensor data is still obfuscated. I need to get that code to know how many event listeners the app is registered to and the sampling frequency that is set for that app. Please suggest me on what to do.

Depending on the kind of Sensor Data that is required,

  • The gravity, linear acceleration, rotation vector, significant motion, step counter, and step detector sensors are either hardware-based or software-based.
  • The accelerometer and gyroscope sensors are always hardware-based.

Refer the Official Documentation here

Use

public void onSensorChanged(SensorEvent event){}

to get the kind of data that you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM