Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First, Android is actually just Linux, so if you are talking about "writing a USB driver for my Android application" you should rather say "writing a linux USB driver for your specific device".</p> <p>Next, you will have to access your device in some way. What you will get when you have written the USB driver for linux is probably some file node in /dev/. I'm guessing you want to create a driver for a non-standard USB device (like a mouse/joystick/mass storage) for which Android does not provide a nice JAVA api? In that case you will have to write a native library (probably based on the c code you already have) and compile it with the NDK. The .so file you will get out of it can be packaged in you Android application, which can then use it to talk to your USB device.</p> <p>So to sum it up:</p> <p>usb device driver -> create a kernel module or embed a driver into your linux kernel: this is linux usb driver programming stuff, for which you should be able to find enough guides on the web. You should be able to reuse parts of your c code if you really created a windows usb driver.</p> <p>native wrapper library to access your device (.so file, or .dll if you are used to windows terminology) -> create an NDK project that opens the right device node and correctly reads from/writes to your device.</p> <p>android app -> include the .so file and access its native (c) methods through jni. You may be able to use tools like javah or swig to generate the jni code from your library's header files.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload