### Check for Rooted Device Source: https://github.com/kimchangyoun/rootbeerfresh/blob/master/README.md Instantiate the RootBeer class and call isRooted() to check if the device is rooted. Be aware of potential false positives due to BusyBox. ```java RootBeer rootBeer = new RootBeer(context); if (rootBeer.isRooted()) { //we found indication of root } else { //we didn't find indication of root } ``` -------------------------------- ### Link Libraries for 'toolChecker' Source: https://github.com/kimchangyoun/rootbeerfresh/blob/master/LibRootbeerFresh/src/main/jni/CMakeLists.txt Links the 'toolChecker' library with the 'android' and 'log' libraries. These are essential for Android NDK development and logging. ```cmake target_link_libraries(toolChecker android log) ``` -------------------------------- ### Define Shared Library 'toolChecker' Source: https://github.com/kimchangyoun/rootbeerfresh/blob/master/LibRootbeerFresh/src/main/jni/CMakeLists.txt Defines a shared library named 'toolChecker' and specifies its source file. This library is intended for runtime use. ```cmake add_library(toolChecker SHARED toolChecker.cpp) ``` -------------------------------- ### Set Compiler Flags for Security Source: https://github.com/kimchangyoun/rootbeerfresh/blob/master/LibRootbeerFresh/src/main/jni/CMakeLists.txt Adds the '-fstack-protector-all' flag to C and C++ compiler options. This enhances security by enabling stack overflow protection. ```cmake set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-all") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-all") ``` -------------------------------- ### Check for Rooted Device Without BusyBox Source: https://github.com/kimchangyoun/rootbeerfresh/blob/master/README.md Use isRootedWithoutBusyBoxCheck() to perform a root check that specifically excludes detection of BusyBox, which can sometimes cause false positives. ```java rootBeer.isRootedWithoutBusyBoxCheck() ``` -------------------------------- ### Set Minimum CMake Version Source: https://github.com/kimchangyoun/rootbeerfresh/blob/master/LibRootbeerFresh/src/main/jni/CMakeLists.txt Specifies the minimum required version of CMake for the project. Ensures compatibility with required features. ```cmake cmake_minimum_required(VERSION 3.4.1) ``` -------------------------------- ### Add RootBeerFresh Library Dependency Source: https://github.com/kimchangyoun/rootbeerfresh/blob/master/README.md Include the RootBeerFresh library in your Android project by adding the specified dependency to your Gradle build file. ```gradle dependencies { implementation 'kimchangyoun:rootbeerFresh-lib:0.0.11' } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.