My app has a certain piece of functionality that will only work on a device where root is available. Rather than having this feature fail when it is used (and then show an a
The RootTools library offers simple methods to check for root:
RootTools.isRootAvailable()
Reference