开发者

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜