Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

New Forums: Nexus Player | Nexus 9
test: Reply
LinkBack Thread Tools
Old September 22nd, 2011, 10:44 AM   #1 (permalink)
New Member
Thread Author (OP)
Join Date: Aug 2011
Posts: 6
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

t.elimpus is offline  
Reply With Quote
sponsored links
chmod, ndk, usb, usb_claim_interface

Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -5. The time now is 04:50 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.