0

My smartphone has sensors those:

Step Detector                                   | Qualcomm                         | 0x0000001e | on-demand         | no batching support | last=<0.000000>
Step Counter                                    | Qualcomm                         | 0x0000001f | on-demand         | no batching support | last=<0>

I think , when I shake phone (or when walk), Step Detector is running and send a data to applications. If I'm right, I can send a fake event with ADB connection. But I can't find anything about this.

For example:

adb shell sendevent StepDetector

0

1 Answer 1

-1

I had a quick look on Stack and i found this . it might be helpful in the situation....

If you are using ADB, you will need to command into the shell with

adb shell        - for opening shell

su        - to gain root via superuser - Optional

sensor set acceleration 0:0:0 

sensor set acceleration 99:99:99

here is the references i found StackOverflow Comment

8
  • 1
    Yeah, I found it too but it's for emulator. I'm working on real phone. So we can't use "sensor" command. ADB give error: "tmp-mksh: sensor: not found"
    – SamedDeger
    Commented Jul 17, 2016 at 9:43
  • Also I tried the "SensorSimulator". The application (on phone) is connecting to the program (on pc). I'm changing accelerometer values (with random), the SensorSimilator app (on phone) see changes. But it's not real change. Just SensorSimilator can see changes. Other apps about accelerometer can't use fake values.
    – SamedDeger
    Commented Jul 17, 2016 at 10:19
  • If you are trying to edit a specific app... Usually the last logged information is saved to data, And then opened.... If you can edit the exact shared prefs file or database ... You could just write the values to it with echo blahblah /data/data/app-name/shared_prefs.xml ... You will have to find the exact location, It's probably in Temp Commented Jul 17, 2016 at 12:00
  • using sed is better for textual replacement ! Commented Jul 17, 2016 at 12:02
  • The specific app is using Server. So the app is not save datas. Just catching steps via sensors and sending to server. But the way between server and app is not HTTP. So I can't monitor datas. But if I can send sensorevent to app, app will send to server.
    – SamedDeger
    Commented Jul 17, 2016 at 14:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .