Default [Q] Capturing touch pressure

I am required to capture touch data like touch pressure while the user is using the phone. For example, the Pointer Location under the Developer Options. I tried using an overlay but I was unable to use the phone as the overlay intercept the touch events. As of now, is it possible to capture touch events on the background ? If yes, how can I accomplish this ? I am using Android 4.0. Please note that I am not trying to write malware.