Chmod within SU [NDK]

Last Updated:

  1. t.elimpus

    t.elimpus Member

    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 (Text):
    2. system("su -c \"chmod 777 /proc/bus/usb....\"");
    3. 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.


Share This Page