Skip to content

Root detection evasion

Daniel Riissanen edited this page Aug 15, 2016 · 1 revision

Note: If you have not setup your environment, please do so. You can use the setup guide as a reference.

Edit configuration file


Open the file conf/root-detection-evasion.conf in your favourite text editor.

sdk_dir = The Android SDK installation directory

avd_name = The name of the AVD you want to start

apks = APKs that the script will install; No need to modify!

packages = The package names of the APKs named above; No need to modify!

extension_apks = Substrate extension APKs; No need to modify!

extension_apks = Substrate extension APKs; No need to modify!

Execute script


# ROOT_DIR is this project's root directory
$ cd <ROOT_DIR>
$ bin/setup-env.sh --root conf/root-detection-evasion.conf

What's next?


From here you can switch over to your emulator and try out the APKs you just installed. With RootDetector you can see how well the Substrate extension was able to hide the root footprint. hidesubinary is used to hide the su binary by renaming it. Some applications checks for the su binary file to determine if you have rooted your phone. The Substrate extension actually already hides the su binary file by hooking into Java's java.io.File.exists(), but if the application checks for the binary another way that cannot be hooked you can use hidesubinary to hide it.

Once you have checked that everything works you are all set and you can install your own root checking apps and use hidesubinary to hide the su binary, start the app, and after startup just reveal it again so that it can be used.