Open miracle2k opened 9 years ago
Shell Context would be set to the normal context, which would still be the same context that the su binary in CM11 would run in.
If the su binary doesn't support the --context switch then it should simply ignore it. Are you seeing something else?
The su binary in CM11 does not ignore the --context switch, it raises an error that you passed an unknown arguments (the behaviour I would expect).
In my case, I need to run using a different context in the case that SELinux is enabled. Chainfire's latest su binary supports the --context switch because of this. For some reason, CM11 claims that SELinux is enabled, but the su binary shipped does not support --context, and in fact the commands I want to run work fine on CM11.
FWIW I extracted the version checking code from libsuperuser and I'm using it manually now:
Thanks,
I was unaware of this issue, I will address this and have the code checked in soon.
I've checked in the code and the issue should be resolved.
Can you review the code changes made in Shell.java?
Amazing, thanks! The code looks perfectly good to me.
It seems that the su on CM11 does not support the --context switch.
libsuperuser tests the shell version before using the --context flag. This seems like a sensible thing to do.