Commit 09a2f49
committed
Add a timeout to ADB root detection commands
It turns out that on some devices "su root whoami" does not
fail or run whoami - it just successfully starts a shell.
In these cases, we have a problem, as that blocks the rest
of the root detection. To fix this, we now time out in any
such cases. It would be a bit better to properly get root
using the interactive shell, but the practicality is a bit
complicated, so let's ignore that for now until a real
device that needs that comes up.1 parent 79a8637 commit 09a2f49
1 file changed
+23
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
92 | 110 | | |
93 | 111 | | |
94 | 112 | | |
| |||
115 | 133 | | |
116 | 134 | | |
117 | 135 | | |
118 | | - | |
| 136 | + | |
119 | 137 | | |
120 | 138 | | |
121 | 139 | | |
| |||
0 commit comments