avnkailash
avnkailash

Reputation: 51

Can I use Linux system calls in android?

I want to create a service which can capture the touch coordinates of all the user interactions. This is part of my R & D Project. My goal is to build an authentication system. Can I use linux system calls from my app/service?

Please provide me with some good resources related to linux system calls in Android and how to use them?

Upvotes: 1

Views: 2654

Answers (2)

Larry Schiefer
Larry Schiefer

Reputation: 15775

You can use a limited number of calls, as exposed by the libc implementation for Android. But, what you indicate you would like to do (capture touch coordinates) will not be possible from a general app, only from within the Android framework. The input devices are managed by the framework's system_server process, which has the appropriate permissions to access kernel exposed driver interfaces (i.e. /dev/input/*). Apps developed with the NDK and SDK do not get access to these things as they are sandboxed by UID and process.

Upvotes: 1

Dipika
Dipika

Reputation: 584

Yes you use system calls. One way is you can write your code in C/C++(where you can use ioctl calls) and Use Android NDK for calling C functions or you can Write Wrapper over C functions.

Upvotes: 2

Related Questions