Jolle
Jolle

Reputation: 1426

How to check if custom android is rooted?

We've bought some custom android tablets, that we're going to use as kiosk tablets. For our kiosk app to work properly the app needs root access.

How can I check if the device is rooted properly? And how can I root it if it isn't?

Things that point to that the device IS rooted:

  1. When I ADB shell into the tablet the line starts with "#" (I read somewhere that this means that the tablet is rooted).
  2. When I run "su" in the shell nothing happens (no errors).
  3. This file exist /system/xbin/su"

Things that point to that the device IS NOT rooted:

  1. I have installed Root Checker, it says "Sorry! This device does not have root access"
  2. When I run the following code in our app, which I know for a fact is working on other rooted devices:

    Process process = Runtime.getRuntime().exec("su");
    os = new DataOutputStream(process.getOutputStream());
    os.writeBytes(cmd + "\n");
    

    I get an error: "java.io.IOException: write failed: EPIPE (Broken pipe)".

Upvotes: 2

Views: 1204

Answers (2)

souravlahoti
souravlahoti

Reputation: 736

There is this nice guide which you can follow to check if the phone is rooted or not.

Link to website

Upvotes: 0

Jolle
Jolle

Reputation: 1426

Had to try a number of different root tools. Turns out KingRoot (https://kingroot.net/) did the job. Afterwards Root Checker says that it is rooted correctly and my app works again.

Upvotes: 0

Related Questions