-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from one-signal/class_name_conflict_fix_and_ta…
…rget_manifest_entry Fixed class name conflict with RootTools and target manifest entry.
- Loading branch information
Showing
4 changed files
with
23 additions
and
28 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 21 additions & 23 deletions
44
...ls/internal/RootToolsInternalMethods.java → ...m/onesignal/RootToolsInternalMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,40 @@ | ||
/** | ||
* This file is part of the RootTools Project: http://code.google.com/p/roottools/ | ||
* | ||
* | ||
* Copyright (c) 2012 Stephen Erickson, Chris Ravenscroft, Dominik Schuermann, Adam Shanks | ||
* | ||
* | ||
* This code is dual-licensed under the terms of the Apache License Version 2.0 and | ||
* the terms of the General Public License (GPL) Version 2. | ||
* You may use this code according to either of these licenses as is most appropriate | ||
* for your project on a case-by-case basis. | ||
* | ||
* | ||
* The terms of each license can be found at: | ||
* | ||
* | ||
* * http://www.apache.org/licenses/LICENSE-2.0 | ||
* * http://www.gnu.org/licenses/gpl-2.0.txt | ||
* | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under these Licenses is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See each License for the specific language governing permissions and | ||
* limitations under that License. | ||
*/ | ||
|
||
package com.stericson.RootTools.internal; | ||
// Namespaced in com.onesignal to prevent class name conflicts if app developer includes the full RootTools library. | ||
package com.onesignal; | ||
|
||
public class RootToolsInternalMethods { | ||
public static boolean isRooted() { | ||
boolean found = false; | ||
if (!found) { | ||
String[] places = { "/sbin/", "/system/bin/", "/system/xbin/", | ||
"/data/local/xbin/", "/data/local/bin/", | ||
"/system/sd/xbin/", "/system/bin/failsafe/", "/data/local/" }; | ||
for (String where : places) { | ||
if (new java.io.File(where + "su").exists()) { | ||
found = true; | ||
break; | ||
} | ||
} | ||
} | ||
|
||
return found; | ||
} | ||
class RootToolsInternalMethods { | ||
static boolean isRooted() { | ||
String[] places = {"/sbin/", "/system/bin/", "/system/xbin/", | ||
"/data/local/xbin/", "/data/local/bin/", | ||
"/system/sd/xbin/", "/system/bin/failsafe/", | ||
"/data/local/"}; | ||
|
||
for (String where : places) { | ||
if (new java.io.File(where + "su").exists()) | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
} |