I’m adding support to serial port on our tablet device and this is the way I create a jar file to let external application to recognize the Android Serial API:
$ mkdir -p android/serialport $ cp target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes/android/serialport/SerialPortFinder.class android/serialport/ $ cp target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes/android/serialport/SerialPort.class android/serialport/ $ jar cvf serial.jar android/serialport/SerialPort.class android/serialport/SerialPortFinder.class