Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Camera Permission #2617

Closed
indigohedgehog opened this issue Oct 26, 2018 · 2 comments
Closed

Android Camera Permission #2617

indigohedgehog opened this issue Oct 26, 2018 · 2 comments
Assignees

Comments

@indigohedgehog
Copy link

What is the specific issue that causes to need a rooted device?

@dorodnic
Copy link
Contributor

This part:

su
setenforce 0
lsusb
chmod 0777 /dev/bus/usb/<Bus number>/<Dev Number>

from AndroidJavaApp.md.

There are several alternatives, including building a custom image as proposed in some pull-requests (#2489). We are still evaluating this method, but from my personal experience, building Android image from source is not something I as a developer would do at home.

Some people work-around this issue by requesting permissions at Java level and passing the resulting file-descriptor to libusb (see UVCCamera). We evaluated this method and chose not to endorse it, for two reasons -

  1. There is no guaranty Google wont shut-down this method at some point.
  2. This is not a built-in capability of libusb, thus requires maintaining a custom version of libusb.

Since librealsense is permissively licensed and open-source, you are free to pursue this approach, including commercially, but we can't offer support.

We are also looking into other methods.

Intel also has a dedicated implementation of the camera HAL it shares with its partners, but this is also not really suitable for dev-kits.

@indigohedgehog
Copy link
Author

I think the approach for handling communication for android, is with UsbManager class, instead of libusb, besides it should stop using libuvc at all.

To properly support android, this means replacing libuvc, and by doing that, you can't use stream class directly, therefor all the content of libuvc folder has to be reimplemented in android. Then in the native lib, orchestrate an input/out flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants