I have read all over the internet and get the single info whose summary is Runtime.getRuntime().exec()
. But it didn't work.
How does the applications like King Root etc works? Are these apps written in C/C++ with NDK
or no java
is also used to create such apps. Any resuorce of information would be appreciated. Thanks!!!
Typically to root an Android device, the user needs to flash a custom recovery such a TWRP ((https://twrp.me/about/). Once that recovery is installed and booted into, the user can flash modifications such as root. This also requires an unlocked bootloader to flash that recovery.
Can you create an app that roots a device? Not unless there is a security flaw for that specific device and OS version.