Try using UsbDeviceConnection to make sure you can perform requests with the permission. You may have to keep the read/writes in this process (like a proxy) and open a separate communication channel for avrdude to communicate to your process.
I could be wrong though. Would help to understand what exactly you mean by this > I have granted access to UsbDevice David On Jun 4, 2013, at 2:02, Anton Smirnov <[email protected]> wrote: > I have granted access to UsbDevice, got his device name > (/dev/bus/usb/002/002) and passed it to executed process to work with USB > device (avrdude to be more detailed) > > Process process = Runtime.getRuntime().exec(commandArray); > > and get "permission denied" error: > > W/System.err( 9368): avrdude: ser_open(): can't open device > "/dev/bus/usb/002/002": Permission denied > W/System.err( 9368): ioctl("TIOCMGET"): Invalid argument > > Avrdude is in the app sandbox (/data/data/%package%) so it does not require > rooting just to execute avrdude (sure). > I believe if i grant access to UsbDevice android app process and all child > processes (avrdude) gets access to according USB device file. > > Any thoughts? Rooting is undesired. > -- > You received this message because you are subscribed to the Google Groups > "Android Security Discussions" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to > [email protected]. > Visit this group at > http://groups.google.com/group/android-security-discuss?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Android Security Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/android-security-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
