Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to record all touch and acclerometer on an Android device in ALL apps

I am currently working on a research project which involves people playing games on an Android device. I am hoping to be able to write an android app that records the accelerometer and touch events. I would like my users to be able to play games such as angry birds, whilst I record their touching data.

I understand that this type of data collection is possible from inside the app, but is it possible from outside the app? (perhaps via an app running in the background?)

If this is not possible, are there alternatives? (I believe I could theoretically go into the android OS source code and make this happen?)

like image 229
James Thomson Avatar asked Dec 19 '12 20:12

James Thomson


1 Answers

I understand that this type of data collection is possible from inside the app, but is it possible from outside the app? (perhaps via an app running in the background?)

For touch events, no, for obvious privacy and security reasons. It used to be possible (research the term "tapjacking"), but current versions of Android finally blocked this behavior.

For accelerometer events, you can record those, because they are the same for all apps simultaneously. Bear in mind that your sampling rate may not exactly match that of the app being used.

I believe I could theoretically go into the android OS source code and make this happen?

Yes, though you would then need to turn that modified Android into a ROM mod and install it on devices.

like image 68
CommonsWare Avatar answered Oct 12 '22 09:10

CommonsWare