RabbitHoleEscapeR1 / r1_escape

303 stars 23 forks source link

API/Service to controll camera servo #56

Open duncte123 opened 2 weeks ago

duncte123 commented 2 weeks ago

I'm currently working on an app to run specifically on the R1. Nothing serious but I do want to control the camera (move it to the back when the app is opened and move it to privacy when the app is closed).

Since my app is not a system app android will not allow me to write to /sys/devices/platform/step_motor_ms35774/orientation. Please add some sort of API or service to the system image so that I am able to control the camera when the app is running on the R1

Erickn69 commented 2 weeks ago

This'll be interesting, cant wait to see your progress

AgentFabulous commented 2 weeks ago

There is already a quick settings tile in this system image to do this. If you'd like to do this from userland, we would either need a new system service or HIDL, or change permissions and relax selinux. The latter would require changes to vendor, which is not covered by this project unless Rabbit opensources at least the kernel.

duncte123 commented 2 weeks ago

I'm aware of the tile and have been using it in the meantime

I think adding the functionality as a system service would be the way to go, as checking for the existence of this service would allow an app to detect if it's running on an r1. HIDL also seems to have been replaced by AIDL since android 10

I've looked into the other repos in this org but have not seen where this would need to be added as this goes outside my current knowledge of Android