Search code examples
javaadb

Writing a wrapper program in Java for adb


I need to write a java application that detects a USB device, and can be used to pass commands, similar to adb (Android Debug Bridge).

Since, java does not provide usb support. I intend to use some kind of java wrapper program for utilizing adb functions. Am I thinking rightly ? If yes, how do I proceed ? How do I create wrapper programs in Java? Could someone point me to some useful resources.

Thank you. Carl


Solution

  • i'm not familiar with adb, but a general way to utilize USB and other system resources is JNI. That way u can write a really simple utility class, that just holds some native methods which are implemented in a system library.

    Hope this helps a bit.