Commit 595eefc
committed
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.1 parent 57d024f commit 595eefc
1 file changed
+20
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
168 | 185 | | |
169 | 186 | | |
170 | | - | |
| 187 | + | |
171 | 188 | | |
172 | 189 | | |
173 | 190 | | |
| |||
192 | 209 | | |
193 | 210 | | |
194 | 211 | | |
195 | | - | |
| 212 | + | |
196 | 213 | | |
197 | 214 | | |
198 | 215 | | |
| |||
0 commit comments