I have implemented a custom system call sys_mycall for ARM architecture. After building and downloading on the phone the log is showing that sys_mycall is running.
My doubt is:
- how do I call this system call from a C file.
- can I somehow call this system call from java (using JNI or something). Just some hint on how to implement this on Android is required.
1) look at
man 2 syscallforint syscall(int number, ...)with it you should be able call your sys call and pass the parameters you need/want.2) Yes, use JNI for this. Create a JNI function to call your C code and from there just make the syscall.