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(
                arrayOf(
                    "com.tippingcanoe.hukd",
                    "com.google.android.gm", "bbc.mobile.weather"
                )
            )
        ),
        RootItemResult(
            "Potentially Dangerous Apps", rootBeer.detectPotentiallyDangerousApps(
                arrayOf(
                    "com.tippingcanoe.hukd",
                    "com.google.android.gm", "bbc.mobile.weather"
                )
            )
        ),
        RootItemResult(
            "Root Cloaking Apps", rootBeer.detectRootCloakingApps(
                arrayOf(
                    "com.google.android.apps.photos",
                    "com.alltrails.alltrails"
                )
            )
        ),
        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())
    )
}


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("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())
    )
}


Remove debugging info accidentally committed to smaple app
Remove debugging info accidentally committed to smaple app

scottyab/rootbeer,scottyab/rootbeer,scottyab/rootbeer