• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Chmod within SU [NDK]

t.elimpus

Lurker
Hey guys, i am using the NDK to make a custom usb library. I am trying to claim the interface of a device, and it needs special permissions to do so - chmod. However, it still fails. The way i am trying this is as follows:

Code:
system("su -c \"chmod 777 /proc/bus/usb....\"");
claim_int_res = usb_claim_interface(device_handle,interface);
My question is, do the chmod'ed permissions get retracted as soon as the SU shell ends - and leave usb_claim_interface without the necessary permissions to successfully execute? If so, any ideas on how to get around it?

Cheers for any input, Tony.
 
Back
Top Bottom