Replying back to list.
On Wed, Jul 24, 2013 at 4:19 PM, <
matt...@live.com> wrote:
> Ok, very interesting.
> I can't use full SuperUser.apk or similar because i don't have a fully UI
> access on my board.
> But i can still use the modified su command from SuperUser and manually
> enter my app in whitelist using a boot script.
It's typically in the app directory. You can use a OSS superuser app like
this one and modify it accordingly and or pre-populate the DB at
install time.
https://github.com/koush/Superuser
However, if you don't have a UI, it might be easier to take the su.c from
AOSP (system/extras/su/su.c) and modify it to fit your needs. Check
for a specific UID or group (wheel or whaterver). Cf the current
implementation:
myuid = getuid();
if (myuid != AID_ROOT && myuid != AID_SHELL) {
fprintf(stderr,"su: uid %d not allowed to su\n", myuid);
return 1;
}