RootManager is a library which enable developers access the root utilities on Android devices. RootManager provides functions including checking if the device is rooted, trying to obtain superuser privileges, installing/uninstalling applications silently, capturing screen shot, recording screen (4.4. and upper), etc..
The project is based on ROOTTOOLS. RootManager slims ROOTTOOLS and extends various functions for common cases.
### Features- check if the device is rooted.
- obtain the root privileges, run command as the superuser.
- install packages silently [*].
- uninstall packages silently.
- uninstall system applications silently.
[*]: silently means operation will be done at the background without any popups or prompts.
- run commands.
- install binary executable files.
- remove binary executable files.
- remount file system in RW.
- copy files.
- capture screenshots.
- screen record on 4.4 and upper.
- check if a process is running.
- kill a process by its PID or package name.
- restart the device.
- Install RootManager by gradle:
dependencies {
compile 'com.chrisplus.rootmanager:library:2.0.5@aar'
}
- All functions you can access via (
RootManager
)RootManager.getInstance()
.
- A suggestion to call RootManager:
- check if this device is rooted (
RootManager.getInstance().hasRooted
). If yes, this device might be rooted so that we can obtain superuser permission, otherwise we cannot. - try to get root permission via (
RootManager.getInstance.obtainPermission()
). Then, for most cases, a dialog will be shown to users, GRAND or DENY the full access to the device. This dialog is controlled by SU app such as SuperSU and KingUser, etc. - RootManager will return the result according to the user choice.
- once obtaining the root access, developers can run commands or call functions.
- check if this device is rooted (
- Access some sample code, check the sample app please.
RootManager is released under GPL v2 license