Hi Developers, I have an application which consists of the native part and higher layer.
Therefore, it needs to be granted the root privilege to run some native functions. As the article I post before, I added a piece of code taken from Bluez Utils(hidd.c). <code> if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) { close(sk); return -1; } </code> The code has been built to be a .so by NDK. Unfortunately, It keeps returning -1 and errno is 13 which means Permission Denied. Some experienced developers(Thank you here) mentioned about that the error happens because this application doesnt have enough permission. It "SHOULD NOT" be something like Process process = Runtime.getRuntime().exec("su"); I think this means you possess a system permission but your application doesnt. (Let me know if i am wrong) Is there any way to grant the app for having the root privilege? Any reply/clue/hint will be highly appreciated. Regards- Sam -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en