@Test public void testIsRootedWithBusyBoxCheck() { RootBeer rootBeer = Mockito.mock(RootBeer.class); when(rootBeer.isRooted()).thenCallRealMethod(); when(rootBeer.detectRootManagementApps()).thenReturn(false); when(rootBeer.detectPotentiallyDangerousApps()).thenReturn(false); when(rootBeer.checkForBinary(Const.BINARY_BUSYBOX)).thenReturn(true); when(rootBeer.checkForBinary(Const.BINARY_SU)).thenReturn(false); when(rootBeer.checkForDangerousProps()).thenReturn(false); when(rootBeer.checkForRWPaths()).thenReturn(false); when(rootBeer.detectTestKeys()).thenReturn(false); when(rootBeer.checkSuExists()).thenReturn(false); when(rootBeer.checkForRootNative()).thenReturn(false); assertFalse(rootBeer.isRooted()); assertTrue(rootBeer.checkForBinary(Const.BINARY_BUSYBOX)); }
public boolean isRootedWithBusyBoxCheck() { return detectRootManagementApps() || detectPotentiallyDangerousApps() || checkForBinary(BINARY_SU) || checkForBinary(BINARY_BUSYBOX) || checkForDangerousProps() || checkForRWPaths() || detectTestKeys() || checkSuExists() || checkForRootNative() || checkForMagiskBinary(); }
RootBeer { public boolean isRootedWithBusyBoxCheck() { return detectRootManagementApps() || detectPotentiallyDangerousApps() || checkForBinary(BINARY_SU) || checkForBinary(BINARY_BUSYBOX) || checkForDangerousProps() || checkForRWPaths() || detectTestKeys() || checkSuExists() || checkForRootNative() || checkForMagiskBinary(); } }
RootBeer { public boolean isRootedWithBusyBoxCheck() { return detectRootManagementApps() || detectPotentiallyDangerousApps() || checkForBinary(BINARY_SU) || checkForBinary(BINARY_BUSYBOX) || checkForDangerousProps() || checkForRWPaths() || detectTestKeys() || checkSuExists() || checkForRootNative() || checkForMagiskBinary(); } RootBeer(Context context); }
RootBeer { public boolean isRootedWithBusyBoxCheck() { return detectRootManagementApps() || detectPotentiallyDangerousApps() || checkForBinary(BINARY_SU) || checkForBinary(BINARY_BUSYBOX) || checkForDangerousProps() || checkForRWPaths() || detectTestKeys() || checkSuExists() || checkForRootNative() || checkForMagiskBinary(); } RootBeer(Context context); boolean isRooted(); @Deprecated boolean isRootedWithoutBusyBoxCheck(); boolean isRootedWithBusyBoxCheck(); boolean detectTestKeys(); boolean detectRootManagementApps(); boolean detectRootManagementApps(String[] additionalRootManagementApps); boolean detectPotentiallyDangerousApps(); boolean detectPotentiallyDangerousApps(String[] additionalDangerousApps); boolean detectRootCloakingApps(); boolean detectRootCloakingApps(String[] additionalRootCloakingApps); boolean checkForSuBinary(); boolean checkForMagiskBinary(); boolean checkForBusyBoxBinary(); boolean checkForBinary(String filename); void setLogging(boolean logging); boolean checkForDangerousProps(); boolean checkForRWPaths(); boolean checkSuExists(); boolean checkForNativeLibraryReadAccess(); boolean canLoadNativeLibrary(); boolean checkForRootNative(); }
RootBeer { public boolean isRootedWithBusyBoxCheck() { return detectRootManagementApps() || detectPotentiallyDangerousApps() || checkForBinary(BINARY_SU) || checkForBinary(BINARY_BUSYBOX) || checkForDangerousProps() || checkForRWPaths() || detectTestKeys() || checkSuExists() || checkForRootNative() || checkForMagiskBinary(); } RootBeer(Context context); boolean isRooted(); @Deprecated boolean isRootedWithoutBusyBoxCheck(); boolean isRootedWithBusyBoxCheck(); boolean detectTestKeys(); boolean detectRootManagementApps(); boolean detectRootManagementApps(String[] additionalRootManagementApps); boolean detectPotentiallyDangerousApps(); boolean detectPotentiallyDangerousApps(String[] additionalDangerousApps); boolean detectRootCloakingApps(); boolean detectRootCloakingApps(String[] additionalRootCloakingApps); boolean checkForSuBinary(); boolean checkForMagiskBinary(); boolean checkForBusyBoxBinary(); boolean checkForBinary(String filename); void setLogging(boolean logging); boolean checkForDangerousProps(); boolean checkForRWPaths(); boolean checkSuExists(); boolean checkForNativeLibraryReadAccess(); boolean canLoadNativeLibrary(); boolean checkForRootNative();  }