-1

Is it possible to disable or remove the root access programmatically on Android? Thank you

Daryn
  • 770
  • 9
  • 19

1 Answers1

0

A "user" (vs "userdebug" or "eng") build of official Android sources does not feature any sort of root access as a designed feature.

This is what you normally get on a production end-user device from a name brand vendor. In contrast, it is not uncommon for cheap devices of uncertain origin to ship with one of the other build varieties (though that is not necessarily a bad thing, as such half-finished builds often have flaws you need this capability to fix).

Of course nearly any software project has the potentially to be intentionally exploited, and someone's modified customization of Android could include anything under the sun, but those are different topics and far too broad for Stack Overflow where questions must be specific.

In terms of removing exploits or escalation toolkits installed as part of a custom ROM - to remove them, you would have to ask a question that was specific about what they were and how they worked. It is likely however that you would need to have the capability to make lasting changes to the system partition, something that can be as much about hardware locking and bootloader/recovery capabilities as it is about having root access after a complete boot (root can't make a lasting change if the flash is locked; conversely, if you can write to the flash without booting the normal system, root matters less).

Chris Stratton
  • 39,853
  • 6
  • 84
  • 117