Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I have to install an application that has discovered my device to be rooted.

So this is a two part question.

  1. How did it discover in the first place that my phone has been rooted

  2. How to prevent the application from discovering my phone as being rooted

share|improve this question

5 Answers 5

Rooting is reversible. So if you unroot your phone, the applcation will not see anything.

share|improve this answer
6  
Not a helpful solution. The questioner and many others rooted their phones for good reasons, and probably need the root privileges for something. –  Izzy Sep 16 '12 at 12:53

This question has already been asked and answered:

To summarize, look for the application called "SuperUser" (as one suggestion).

-edit- Per suggestion should the link go down:

How can I disable root on a modded device?

If you install SuperUser you can control which apps are allowed root access. By default it blocks all requests and asks you what you want to do. You can give an app access indefinitely and revoke it at any time, or allow only specific requests with a timeout. Most rooted ROMs come with it pre-installed, including CyanogenMOD, and many rooting methods will install it for you as well.

As an alternative, you could remove the su binary and Busybox from your device to effectively un-root it.

share|improve this answer
3  
Disabling and hiding roots are two different things. Also answer with only a link is not considered helpful. If the link dies the answer is less than useful. –  roxan Sep 19 '12 at 8:12
    
@Cookster I wanted to prevent applications from detecting my phone as rooted. I do not want to disable root on my customRom phone –  satts Sep 20 '12 at 6:49
    
"If you install SuperUser you can control which apps are allowed root access." Am I missing something here? Block all applications from accessing root and keep the phone rooted. –  Cookster Sep 20 '12 at 16:04
    
Yes, you miss something. The question was not "how to prevent apps from gaining root privs", but "how to prevent apps from detecting root privs might be available. –  Izzy Apr 12 '13 at 22:33

To detect rooting status of device, an app issues su command. If exit status is 0, it means device is rooted.. otherwise, not.

To prevent this, you can simply Deny the root access using SuperUser's pop-up (Provided its allowed from SuperUser settings, a pop-up appears when an app issues su command). After this, the app will get non-zero exit status & it can't determine rooting status.

Update:
Some apps can use other ways to check root status (like checking the su binary file existence). I'd like to admit that none are perfect methods without false-positive result, but sometimes they are successful with luck.

The best universal method to prevent detection: Restrict the permission of app's daemon. I can't suggest exact permission limitations because I don't know functions of the app. It can mess up with app's functionalities.

In the last, I'd like to say: Technically, there's no way to prevent detection by 100% success rate. In case of permission limitations, the app can still suspect that something is wrong.

share|improve this answer
1  
Not to be pedantic or nitpicky, another way is to check on the binary /system/xbin/su if it exists - that is actually a bit "quieter" then attempting to execute su, sneaky I know :) –  t0mm13b Sep 19 '12 at 20:09
2  
@t0mm13b Its not a real test because if someone has put su text file at that location by temporary root, the app will tell false result. –  Sachin Shekhar Sep 20 '12 at 5:19
    
@SachinShekhar The application has not requested su previliges as my SuperUser app wuld throw a notification. is there something I need to do by logging into term on phone and changing something –  satts Sep 20 '12 at 6:54
    
@user1654218 Make sure Always Allow option of SuperUser isn't active. You can prevent detection by Always Deny or Deny All too (option texts may vary depending on version). –  Sachin Shekhar Sep 20 '12 at 11:58
    
@user1654218 What's the app in the question? Its possible that the app is using wrong method with good luck. –  Sachin Shekhar Sep 20 '12 at 12:00

I use OTA Rootkeeper, which includes a feature to backup su and temporarily unroot the phone. Once temporarily unrooted, it can re-root by restoring the su backup.

(In addition it also attempts to preserve root when you apply an OTA update from your wireless carrier, which is a really nice feature.)

share|improve this answer

Here is what worked for me:

1- You need to have Xposed framework installed, you can install it from here: http://repo.xposed.info/module/de.robv.android.xposed.installer, Xposed is a framework for modules that can change the behavior of the system and apps without touching any APKs.

2- Download the Root Cloak xposed module from here http://repo.xposed.info/module/com.devadvance.rootcloak and enable it.

3- Add the app your trying to hide the root from.

Reboot will be required a couple of times within the process.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.