Once you manage to have a binary owned by root, with the setuid bit on
it set, it will work just fine (and likely be a gaping security hole).

The problem is that this state of affairs can only be brought about by
something that is already running as root.

So you have to have an escalation mechanism to accomplish this part of
the installation.  There is no such mechanism in an official android
build running in secured mode.  Your rooted phone is obviously
customized, and you will have to research the non-standard-android
escalation mechanism it provides (such as some form of su command)

On Mar 2, 2:36 pm, vertlook <[email protected]> wrote:
> Hi all,
> I have an app, which will work on rooted phones. The app consist of a
> java ui and native binary, which requires a root privilege.
> I was planning to chown this binary to root and set a setid bit on it.
> But it does not seem to take any effect, when I run this binary as an
> app user, getuid() gives me a user id of this app, not of the root.
> Also tried to do setuid(0) from the binary but getting "permission
> denied".
> Same binary works just fine on linux. Any ideas?
> Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Android Security Discussions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/android-security-discuss?hl=en.

Reply via email to