forked from scottyab/rootbeer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert sample to kotlin (scottyab#133)
Co-authored-by: Scott Alexander-Bown <scottyab@users.noreply.github.com>
- Loading branch information
Showing
58 changed files
with
628 additions
and
818 deletions.
There are no files selected for viewing
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
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,24 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest package="com.scottyab.rootbeer.sample" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
package="com.scottyab.rootbeer.sample"> | ||
|
||
<application | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme.NoActionBar" | ||
tools:ignore="AllowBackup,GoogleAppIndexingWarning"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:label="@string/app_name" | ||
android:screenOrientation="unspecified" | ||
> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<application | ||
android:name=".RootSampleApp" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme.NoActionBar" | ||
tools:ignore="AllowBackup,GoogleAppIndexingWarning"> | ||
|
||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
<activity | ||
android:name=".MainActivity" | ||
android:label="@string/app_name" | ||
android:screenOrientation="unspecified"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
28 changes: 28 additions & 0 deletions
28
app/src/main/java/com/scottyab/rootbeer/sample/CheckForRootWorker.kt
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.scottyab.rootbeer.sample | ||
|
||
import android.content.Context | ||
import com.scottyab.rootbeer.RootBeer | ||
import com.scottyab.rootbeer.util.Utils | ||
|
||
class CheckForRootWorker(context: Context) { | ||
|
||
private val rootBeer = RootBeer(context) | ||
|
||
suspend operator fun invoke(): List<RootItemResult> = getRootResults() | ||
|
||
private fun getRootResults() = listOf( | ||
RootItemResult("Root Management Apps", rootBeer.detectRootManagementApps()), | ||
RootItemResult("Potentially Dangerous Apps", rootBeer.detectPotentiallyDangerousApps()), | ||
RootItemResult("Root Cloaking Apps", rootBeer.detectRootCloakingApps()), | ||
RootItemResult("TestKeys", rootBeer.detectTestKeys()), | ||
RootItemResult("BusyBoxBinary", rootBeer.checkForBusyBoxBinary()), | ||
RootItemResult("SU Binary", rootBeer.checkForSuBinary()), | ||
RootItemResult("2nd SU Binary check", rootBeer.checkSuExists()), | ||
RootItemResult("For RW Paths", rootBeer.checkForRWPaths()), | ||
RootItemResult("Dangerous Props", rootBeer.checkForDangerousProps()), | ||
RootItemResult("Root via native check", rootBeer.checkForRootNative()), | ||
RootItemResult("SE linux Flag Is Enabled", Utils.isSelinuxFlagInEnabled()), | ||
RootItemResult("Magisk specific checks", rootBeer.checkForMagiskBinary()) | ||
) | ||
} | ||
|
141 changes: 0 additions & 141 deletions
141
app/src/main/java/com/scottyab/rootbeer/sample/CheckRootTask.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.