You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use a real root 'whoami' test script when detecting root via ADB
The old old test command was just 'whoami', which works for the basics,
but doesn't confirm whether quotes around multi-part commands are
required or required-missing, which matters in some niche cases.
The fix for that was 'sh -c whoami' but it turns out that seems to
fails in some cases equivalent to 'su root sh -c whoami' because the -c
is consumed by the 'su' rather than 'sh', and then subsequent commands
don't seem to behave as expected.
The new fix is to push and run a script with 'sh $script' which should
be much more effective, primarily because that's exactly what most of
the subsequent root-powered commands need to be able to do anyway.
0 commit comments