1. Are you ready for the Galaxy S20? Here is everything we know so far!

Chmod within SU [NDK]

Discussion in 'Android Development' started by t.elimpus, Sep 22, 2011.

  1. t.elimpus

    t.elimpus Lurker
    Thread Starter

    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):
    1.  
    2. system("su -c \"chmod 777 /proc/bus/usb....\"");
    3. claim_int_res = usb_claim_interface(device_handle,interface);
    4.  
    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.
     

    Advertisement

Loading...
Similar Threads - Chmod within NDK
  1. MEng madje
    Replies:
    5
    Views:
    262
  2. Greum
    Replies:
    3
    Views:
    378
  3. KBU2
    Replies:
    1
    Views:
    426
  4. dexter00023
    Replies:
    1
    Views:
    1,009
  5. 2lSAB
    Replies:
    2
    Views:
    898
  6. James_Watson
    Replies:
    0
    Views:
    305
  7. ekor
    Replies:
    2
    Views:
    688
  8. Christopher V
    Replies:
    0
    Views:
    1,917
  9. Android News
    Replies:
    0
    Views:
    1,075
  10. Android News
    Replies:
    0
    Views:
    2,111

Share This Page

Loading...