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
Yes, you can write a wrapper program that will call the adb
command line tool. You can also use this pure java library.
https://github.com/vidstige/jadb
Note: I'm the author of this library, just to state my affiliations.
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.