I am trying to port the gphoto2 (http://gphoto.sourceforge.net/) suite to Android on the Neo Freerunner. GPhoto talks to digital cameras via a number of protocols, most notably PTP, and can control the camera, e.g. setting speed, capturing images etc.
The problem I have is to control the permissions on the USB device that gets created when my phone connects to the camera. The creation of the USB device happens ok in /proc/bus/usb and if I run gphoto as a compiled executable with setuid root from the Developer Console it can talk to the camera, release the shutter and transfer images. However, this requires the application to be run as root, which does not work for Android apps. I already have a JNI interface for the gphoto code that works ok up to the point where it tries to acquire the USB device at which point it fails because it is not the owner of the device node. Reading the documentation from gphoto (http://gphoto.sourceforge.net/ doc/manual/permissions-usb.html), there are on a general Linux platform several ways of hooking scripts into the USB device creation process, eg. udev or hotplug. I have to admit to complete ignorance on how these things work in detail, but is there a way to have a script triggered on the Android platform for this? Ludwig --~--~---------~--~----~------------~-------~--~----~ unsubscribe: [email protected] website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---
