I've a rooted phone and created a root:root owned binary with suid bit set. It's supposed to be a wrapper for a shell script that needs root to work. Calling system("/system/bin/sh ./script") doesn't have the desired effect -- script still doesn't get root privilages. I tried calling setuid(0); setgid(0) in my wrapper, but that doesn't work. How do I run suid scripts on Android?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.