1 /**
 2      * 判断当前手机是否有ROOT权限
 3      * @return
 4      */
 5     public boolean isRoot(){
 6         boolean bool = false;
 7 
 8         try{
 9             if ((!new File("/system/bin/su").exists()) && (!new File("/system/xbin/su").exists())){
10                 bool = false;
11             } else {
12                 bool = true;
13             }
14             Log.d(TAG, "bool = " + bool);
15         } catch (Exception e) {
16 
17         }
18         return bool;
19     }

 

相关文章:

  • 2021-09-17
  • 2021-10-05
  • 2021-11-22
  • 2021-08-02
  • 2021-12-31
  • 2021-12-31
  • 2021-08-09
猜你喜欢
  • 2021-10-05
  • 2021-10-05
  • 2021-10-05
  • 2021-10-05
  • 2021-12-04
  • 2021-11-30
  • 2021-10-05
  • 2021-11-20
相关资源
相似解决方案