@@ -38,13 +38,11 @@ export namespace root {
38
38
if ( success ) {
39
39
send ( c . blackBright ( `[${ ident } ] ` ) + `Marking "test-keys" check as ` + c . green ( `successful` ) + `.` ) ;
40
40
return true ;
41
- } else {
42
- send ( c . blackBright ( `[${ ident } ] ` ) + `Marking "test-keys" check as ` + c . green ( `failed` ) + `.` ) ;
43
- return false ;
44
41
}
45
- } ;
46
42
47
- return JavaString ;
43
+ send ( c . blackBright ( `[${ ident } ] ` ) + `Marking "test-keys" check as ` + c . green ( `failed` ) + `.` ) ;
44
+ return false ;
45
+ } ;
48
46
} ) ;
49
47
} ;
50
48
@@ -58,17 +56,15 @@ export namespace root {
58
56
if ( success ) {
59
57
send ( c . blackBright ( `[${ ident } ] ` ) + `Check for 'su' using command exec detected, allowing.` ) ;
60
58
return this . apply ( this , arguments ) ;
61
- } else {
62
- send ( c . blackBright ( `[${ ident } ] ` ) + `Check for 'su' using command exec detected, throwing IOException.` ) ;
63
- throw iOException . $new ( "objection anti-root" ) ;
64
59
}
60
+
61
+ send ( c . blackBright ( `[${ ident } ] ` ) + `Check for 'su' using command exec detected, throwing IOException.` ) ;
62
+ throw iOException . $new ( "objection anti-root" ) ;
65
63
}
66
64
67
65
// call the original method
68
66
return this . exec . overload ( "java.lang.String" ) . call ( this , command ) ;
69
67
} ;
70
-
71
- return JavaRuntime ;
72
68
} ) ;
73
69
} ;
74
70
@@ -84,20 +80,18 @@ export namespace root {
84
80
`File existence check for ${ filename } detected, marking as ${ c . green ( "true" ) } .` ,
85
81
) ;
86
82
return true ;
87
- } else {
88
- send (
89
- c . blackBright ( `[${ ident } ] ` ) +
90
- `File existence check for ${ filename } detected, marking as ${ c . green ( "false" ) } .` ,
91
- ) ;
92
- return false ;
93
83
}
84
+
85
+ send (
86
+ c . blackBright ( `[${ ident } ] ` ) +
87
+ `File existence check for ${ filename } detected, marking as ${ c . green ( "false" ) } .` ,
88
+ ) ;
89
+ return false ;
94
90
}
95
91
96
92
// call the original method
97
93
return this . exists . call ( this ) ;
98
94
} ;
99
-
100
- return JavaFile ;
101
95
} ) ;
102
96
} ;
103
97
@@ -113,13 +107,13 @@ export namespace root {
113
107
`RootBeer->isRooted() check detected, marking as ${ c . green ( "true" ) } .` ,
114
108
) ;
115
109
return true ;
116
- } else {
117
- send (
118
- c . blackBright ( `[${ ident } ] ` ) +
119
- `RootBeer->isRooted() check detected, marking as ${ c . green ( "false" ) } .` ,
120
- ) ;
121
- return false ;
122
110
}
111
+
112
+ send (
113
+ c . blackBright ( `[${ ident } ] ` ) +
114
+ `RootBeer->isRooted() check detected, marking as ${ c . green ( "false" ) } .` ,
115
+ ) ;
116
+ return false ;
123
117
} ;
124
118
} ) ;
125
119
} ;
@@ -134,16 +128,14 @@ export namespace root {
134
128
`RootBeer->checkForBinary() check detected, marking as ${ c . green ( "true" ) } .` ,
135
129
) ;
136
130
return true ;
137
- } else {
138
- send (
139
- c . blackBright ( `[${ ident } ] ` ) +
140
- `RootBeer->checkForBinary() check detected, marking as ${ c . green ( "false" ) } .` ,
141
- ) ;
142
- return false ;
143
131
}
144
- } ;
145
132
146
- return RootBeer ;
133
+ send (
134
+ c . blackBright ( `[${ ident } ] ` ) +
135
+ `RootBeer->checkForBinary() check detected, marking as ${ c . green ( "false" ) } .` ,
136
+ ) ;
137
+ return false ;
138
+ } ;
147
139
} ) ;
148
140
} ;
149
141
@@ -157,16 +149,14 @@ export namespace root {
157
149
`RootBeer->checkForDangerousProps() check detected, marking as ${ c . green ( "true" ) } .` ,
158
150
) ;
159
151
return true ;
160
- } else {
161
- send (
162
- c . blackBright ( `[${ ident } ] ` ) +
163
- `RootBeer->checkForDangerousProps() check detected, marking as ${ c . green ( "false" ) } .` ,
164
- ) ;
165
- return false ;
166
152
}
167
- } ;
168
153
169
- return RootBeer ;
154
+ send (
155
+ c . blackBright ( `[${ ident } ] ` ) +
156
+ `RootBeer->checkForDangerousProps() check detected, marking as ${ c . green ( "false" ) } .` ,
157
+ ) ;
158
+ return false ;
159
+ } ;
170
160
} ) ;
171
161
} ;
172
162
@@ -180,16 +170,14 @@ export namespace root {
180
170
`RootBeer->detectRootCloakingApps() check detected, marking as ${ c . green ( "true" ) } .` ,
181
171
) ;
182
172
return true ;
183
- } else {
184
- send (
185
- c . blackBright ( `[${ ident } ] ` ) +
186
- `RootBeer->detectRootCloakingApps() check detected, marking as ${ c . green ( "false" ) } .` ,
187
- ) ;
188
- return false ;
189
173
}
190
- } ;
191
174
192
- return RootBeer ;
175
+ send (
176
+ c . blackBright ( `[${ ident } ] ` ) +
177
+ `RootBeer->detectRootCloakingApps() check detected, marking as ${ c . green ( "false" ) } .` ,
178
+ ) ;
179
+ return false ;
180
+ } ;
193
181
} ) ;
194
182
} ;
195
183
@@ -203,17 +191,14 @@ export namespace root {
203
191
`RootBeer->checkSuExists() check detected, marking as ${ c . green ( "true" ) } .` ,
204
192
) ;
205
193
return true ;
206
- } else {
207
- send (
208
- c . blackBright ( `[${ ident } ] ` ) +
209
- `RootBeer->checkSuExists() check detected, marking as ${ c . green ( "false" ) } .` ,
210
- ) ;
211
- return false ;
212
194
}
213
- // call the original method
214
- return this . checkSuExists . call ( this ) ;
195
+
196
+ send (
197
+ c . blackBright ( `[${ ident } ] ` ) +
198
+ `RootBeer->checkSuExists() check detected, marking as ${ c . green ( "false" ) } .` ,
199
+ ) ;
200
+ return false ;
215
201
} ;
216
- return RootBeer ;
217
202
} ) ;
218
203
} ;
219
204
@@ -227,16 +212,14 @@ export namespace root {
227
212
`RootBeer->detectTestKeys() check detected, marking as ${ c . green ( "true" ) } .` ,
228
213
) ;
229
214
return true ;
230
- } else {
231
- send (
232
- c . blackBright ( `[${ ident } ] ` ) +
233
- `RootBeer->detectTestKeys() check detected, marking as ${ c . green ( "false" ) } .` ,
234
- ) ;
235
- return false ;
236
215
}
237
- } ;
238
216
239
- return RootBeer ;
217
+ send (
218
+ c . blackBright ( `[${ ident } ] ` ) +
219
+ `RootBeer->detectTestKeys() check detected, marking as ${ c . green ( "false" ) } .` ,
220
+ ) ;
221
+ return false ;
222
+ } ;
240
223
} ) ;
241
224
} ;
242
225
@@ -271,16 +254,14 @@ export namespace root {
271
254
`RootBeerNative->checkForRoot() check detected, marking as ${ c . green ( "1" ) } .` ,
272
255
) ;
273
256
return 1 ;
274
- } else {
275
- send (
276
- c . blackBright ( `[${ ident } ] ` ) +
277
- `RootBeerNative->checkForRoot() check detected, marking as ${ c . green ( "0" ) } .` ,
278
- ) ;
279
- return 0 ;
280
257
}
281
- } ;
282
258
283
- return RootBeerNative ;
259
+ send (
260
+ c . blackBright ( `[${ ident } ] ` ) +
261
+ `RootBeerNative->checkForRoot() check detected, marking as ${ c . green ( "0" ) } .` ,
262
+ ) ;
263
+ return 0 ;
264
+ } ;
284
265
} ) ;
285
266
} ;
286
267
0 commit comments