views:

441

answers:

2

I was wondering if there is a way to observe the system calls in Android using a service... Is something like this remotely possible using Java or do I have to get down into native code...?

Thanks

+1  A: 

By system calls do you mean when the phone rings, wifi connects and etc? Those things are handled by Broadcast intents.

Faisal Abid
Hmm... actually I meant at an even lower level like say when a file read system call is made etc... There is an equivalent on linux distributions called strace...
Legend
Well I think for functionality like that, you'll have to recompile android to give you that functionality. I dont think the NDK will even do this, its mostly hidden away from the developers. But i can be wrong, as I've never dwelled in the world of linux development much :)
Faisal Abid
+1  A: 

If you root the phone and install Debian, you should be able to install strace from the repositories. Debian install guide for Android here.

Joseph Garvin
Thanks... That seems reasonable...
Legend