I have a custom build of AOSP (based on kitkat 4.4). I am controlling an arduino board via Android's USB Host API. I also am running a kernel that supports the CDC-ACM module.
I want to be able to flash new hex files onto the board. I have seen ArduinoDroid do this in his app. I have been able to flash using avrdude and the /dev/ttyACM* file that is created using the CDC-ACM driver.
However, when I grant permission for my app to communicate with the arduino board, the /dev/ttyACM* file disappears. Which makes sense because I am now controlling it via Android's USB host api. I am looking for either a way to restore the /dev/ttyACM* file or allow avrdude to use the /dev/bus/usb/#/# file in order to flash a new hex file onto the board. It doesn't appear that there is a revokePermission method in the USBManager.
The /dev/ttyACM* device file does not appear even after closing the device. I am running the following code to close the device.
connection.releaseInterface(device.getInterface(1));
connection.close();
I guess my real question is that there a way to get the kernel driver back after releasing the USB connection.
Because I am using a custom build of AOSP, I do not have google play and I cannot install ArduinoDroid on the tablet. However, I can run my app as a system level app if needed.