11/**
22 * This file is part of the RootTools Project: http://code.google.com/p/roottools/
3- *
3+ *
44 * Copyright (c) 2012 Stephen Erickson, Chris Ravenscroft, Dominik Schuermann, Adam Shanks
5- *
5+ *
66 * This code is dual-licensed under the terms of the Apache License Version 2.0 and
77 * the terms of the General Public License (GPL) Version 2.
88 * You may use this code according to either of these licenses as is most appropriate
99 * for your project on a case-by-case basis.
10- *
10+ *
1111 * The terms of each license can be found at:
12- *
12+ *
1313 * * http://www.apache.org/licenses/LICENSE-2.0
1414 * * http://www.gnu.org/licenses/gpl-2.0.txt
15- *
15+ *
1616 * Unless required by applicable law or agreed to in writing, software
1717 * distributed under these Licenses is distributed on an "AS IS" BASIS,
1818 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1919 * See each License for the specific language governing permissions and
2020 * limitations under that License.
2121 */
2222
23- package com .stericson .RootTools .internal ;
23+ // Namespaced in com.onesignal to prevent class name conflicts if app developer includes the full RootTools library.
24+ package com .onesignal ;
2425
25- public class RootToolsInternalMethods {
26- public static boolean isRooted () {
27- boolean found = false ;
28- if (!found ) {
29- String [] places = { "/sbin/" , "/system/bin/" , "/system/xbin/" ,
30- "/data/local/xbin/" , "/data/local/bin/" ,
31- "/system/sd/xbin/" , "/system/bin/failsafe/" , "/data/local/" };
32- for (String where : places ) {
33- if (new java .io .File (where + "su" ).exists ()) {
34- found = true ;
35- break ;
36- }
37- }
38- }
39-
40- return found ;
41- }
26+ class RootToolsInternalMethods {
27+ static boolean isRooted () {
28+ String [] places = {"/sbin/" , "/system/bin/" , "/system/xbin/" ,
29+ "/data/local/xbin/" , "/data/local/bin/" ,
30+ "/system/sd/xbin/" , "/system/bin/failsafe/" ,
31+ "/data/local/" };
32+
33+ for (String where : places ) {
34+ if (new java .io .File (where + "su" ).exists ())
35+ return true ;
36+ }
37+
38+ return false ;
39+ }
4240}
0 commit comments