thanks for sharing ur info.. Here i am working on a high end mobile,so i cant change any things related to init.rc file.My API's are exposed to JNI layer only.The API's send ioctls to wifi driver.But in this way i am getting OPERATION_NOT_PERMITTED error..Is there any way to give access permissions to application to execute that API's?? On Wed, May 16, 2012 at 10:46 PM, Devaraj Rangasamy <[email protected]>wrote:
> +Dianne's reply., apt solution to overcome privilege issues > > ---------- Forwarded message ---------- > From: Dianne Hackborn <[email protected]> > Date: Wed, May 16, 2012 at 9:47 PM > Subject: Re: [android-porting] Why the android applications doesn't have > permissions to send ioctls to network drivers directly?Is there any way to > solve this problem? > To: [email protected] > > > On Wed, May 16, 2012 at 6:39 AM, Devaraj Rangasamy <[email protected]> > wrote: > >> access previleges is missing for application (user mode), while its >> available for c appliation (which would've launched from console, which is >> running as root) > > > Note this is unrelated to C, but just the uid that the code is running > under. If your code is running as root, it of course gets access to > everything; but very very little in Android runs as root, and you want to > think a hard second and third time about anything you add that runs as > root. Generally the correct design is to associate a group id with the > device that can be handled only to the specific uids that need to access to > it. > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. > > > On Wed, May 16, 2012 at 7:09 PM, Devaraj Rangasamy <[email protected]>wrote: > >> >> >>The issue now is we were able to send ioctls to driver and execute >> them with a c test application.But when the same API's being used by >> android application it gives an error as "OPERATION NOT PERMITTED". >> access previleges is missing for application (user mode), while its >> available for c appliation (which would've launched from console, which is >> running as root) >> >> i'm not sure what you meant by "same api's being used by android >> application"., ideally ioctl's would be invoked from native code, & api's >> will be exposed to android apps via JNI., >> if thats the case, make sure your device permissions are set right in >> init.rc, so you will have right access previlege from application too., >> "chmod 777 /dev/mychardev" >> >> >> On Mon, May 7, 2012 at 9:32 PM, reddy <[email protected]> wrote: >> >>> hi,i am a system programmer i am not aware of android application >>> development and their permissions.Recently we have developed a sniffer and >>> packet injector.The issue now is we were able to send ioctls to driver and >>> execute them with a c test application.But when the same API's being used >>> by android application it gives an error as "OPERATION NOT PERMITTED".I am >>> confused as i was able to send ioctls to Chardriver and why not to wifi >>> driver.i can call the test application through android application but it >>> is bit complex and passing parameters and buffers to it is diffult and >>> cumbersome.Is thereany way to resolve this or it is a restriction for >>> android apps.if that is true how does the default wifi application is able >>> to send commands to driver? If any one faced this issue please post the >>> clues to resolve it.. >>> >>> -- >>> unsubscribe: [email protected] >>> website: http://groups.google.com/group/android-porting >>> >> >> >> >> -- >> Regards, >> Deva >> www.bittoggler.com >> >> > > > -- > Regards, > Deva > www.bittoggler.com > > -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
