AnsweredAssumed Answered

How to Acees device driver API's from Android app

Question asked by Maneesh Singh on Jun 26, 2019
Latest reply on Jul 1, 2019 by Aldo Gutierrez

Hi Sir,
For one of my project i am using NXP iMX8M Mini EVK Board with pre-built Android 9.0 Running on it.
I am writing some device driver to access some external device which i will interface with board.

NOTE - The hardware and its interfacing are irrelevant here.

Now as per the Android platform Architecture
developer.android.com/.../platform
   
Now if i have some device driver code ( Kernel level + user space level ) which i am running at Linux layer
My Linux layer user space code talk to my device driver and my device driver talk to my hardware..
it can be any hardware..

 

NOTE : The functionality of the Application and device driver, is irrelevant.

Now what i want is that -
I want to call some API’s of my user space code from my android application ??
so what is the best way, in detail to access my user space and device drivers code via Java in Android?

I know one way to do this is using Android NDK ...

but in android ndk we need to create new projects and then add all the source files and then compile the code using android ndk software..
But since i have device driver and user layer code which uses various linux layer api’s so cannot add all the source code in ndk and compile it so I think i cannot use android ndk approach.. please confirm..

Also I’m just accessing device drivers and linux user space code & not actually writing any native code?

So now my question is what is the other possible way through which i can access api’s of device drivers and linux user space code from my android app...

 

 

Thanks,

Maneesh

Outcomes