is Root Permission - Android Android OS

Android examples for Android OS:Root

Description

is Root Permission

Demo Code


//package com.java2s;

import java.io.File;

public class Main {
    public static boolean isRoot() {
        boolean flag = false;

        try {//from ww w .j a  va  2s.co m
            if ((!new File("/system/bin/su").exists())
                    && (!new File("/system/xbin/su").exists())) {
                flag = false;
            } else {
                flag = true;
            }
        } catch (Exception e) {

        }
        return flag;
    }
}

Related Tutorials