September 22nd, 2011, 10:44 AM
Thread Author (OP)
Join Date: Aug 2011
Carrier: Not Provided
Thanked 0 Times in 0 Posts
Chmod within SU [NDK]
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:
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.