client ID is deactivated rootbeer

public class MainActivity extends AppCompatActivity {
    private static final String BINARY_SU = "su";
    private RootBeer rootBeer;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        rootBeer = new RootBeer(this);

//        rootBeer.setLogging(true); // Enable logging

//        if (isRooted()) {
//            Log.d("RootCheck", "Device is rooted");
//        } else {
//            Log.d("RootCheck", "This device is not rooted");
//        }
        detectRootManagementApps();
        detectPotentiallyDangerousApps();
        checkForBinary(BINARY_SU);
        checkForDangerousProps();
        checkForRWPaths();
        detectTestKeys();
        checkSuExists();
        checkForRootNative();
        checkForMagiskBinary();
    }


    public boolean isRooted() {
        return detectRootManagementApps() || detectPotentiallyDangerousApps() || checkForBinary(BINARY_SU)
                || checkForDangerousProps() || checkForRWPaths()
                || detectTestKeys() || checkSuExists() || checkForRootNative() || checkForMagiskBinary();
    }

    private boolean detectRootManagementApps() {
        boolean result = rootBeer.detectRootManagementApps();
        Log.d(getClass().getName(), "detectRootManagementApps: " + result);
        return result;
    }

    private boolean detectPotentiallyDangerousApps() {
        boolean result = rootBeer.detectPotentiallyDangerousApps();
        Log.d(getClass().getName(), "detectPotentiallyDangerousApps: " + result);
        return result;
    }

    private boolean checkForBinary(String binaryName) {
        boolean result = rootBeer.checkForBinary(binaryName);
        Log.d(getClass().getName(), "checkForBinary (" + binaryName + "): " + result);
        return result;
    }

    private boolean checkForDangerousProps() {
        boolean result = rootBeer.checkForDangerousProps();
        Log.d(getClass().getName(), "checkForDangerousProps: " + result);
        return result;
    }

    private boolean checkForRWPaths() {
        boolean result = rootBeer.checkForRWPaths();
        Log.d(getClass().getName(), "checkForRWPaths: " + result);
        return result;
    }

    private boolean detectTestKeys() {
        boolean result = rootBeer.detectTestKeys();
        Log.d(getClass().getName(), "detectTestKeys: " + result);
        return result;
    }

    private boolean checkSuExists() {
        boolean result = rootBeer.checkSuExists();
        Log.d(getClass().getName(), "checkSuExists: " + result);
        return result;
    }

    private boolean checkForRootNative() {
        boolean result = rootBeer.checkForRootNative();
        Log.d(getClass().getName(), "checkForRootNative: " + result);
        return result;
    }

    private boolean checkForMagiskBinary() {
        boolean result = rootBeer.checkForMagiskBinary();
        Log.d(getClass().getName(), "checkForMagiskBinary: " + result);
        return result;
    }

dependencies {
    implementation 'com.scottyab:rootbeer-lib:0.1.0'

D/com.pos.rootbeer.MainActivity: detectRootManagementApps: false

D/com.pos.rootbeer.MainActivity: detectPotentiallyDangerousApps: false

D/com.pos.rootbeer.MainActivity: checkForBinary (su): false

D/com.pos.rootbeer.MainActivity: checkForDangerousProps: false

D/com.pos.rootbeer.MainActivity: checkForRWPaths: false

D/com.pos.rootbeer.MainActivity: detectTestKeys: false

D/com.pos.rootbeer.MainActivity: checkSuExists: false

D/com.pos.rootbeer.MainActivity: checkForRootNative: false

D/com.pos.rootbeer.MainActivity: checkForMagiskBinary: false

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值