title: Getevent and pointer location
body: <p>I am trying to get the (x, y) coordinate of the touch through the pointer location option in Developer Options and I use these coordinates to tap on the screen using sendevent. Here is my script that does the sendevent.</p>
  
  <p>tap.sh
  <code>
  sendevent /dev/input/event0 3 57 2421
  sendevent /dev/input/event0 3 58 232
  sendevent /dev/input/event0 3 53 $1
  sendevent /dev/input/event0 3 54 $2
  sendevent /dev/input/event0 0 0 0
  sendevent /dev/input/event0 3 57 4294967295
  sendevent /dev/input/event0 0 0 0
  </code></p>
  
  <p>I call the script from adb shell <code>sh tap.sh &lt;x&gt; &lt;y&gt;</code> but it is not tapping on the right coordinate. Instead it is tapping at a different location. </p>
  
  <p>Also when I tap on the screen and check the result in getevent <code>adb shell getevent</code>. I find that the coordinates that is shown on the pointer location and the getevent are different.</p>
  
  <p>Why are they different and how do I solve this issue?</p>
  
  <p>PS: The devices I tried are Nexus 7, Nexus 10.</p>