java.lang.SecurityException: Neither user 10027 nor current process has android.permission.MODIFY_PHONE_STATE

 1、root手机,奇兔刷机助手

2、将app拷贝至/system/priv-app目录下

3、重启手机

 

 

 

附:

/**
* 应用程序运行命令获取 Root权限,设备必须已破解(获得ROOT权限)
*
* @return 应用程序是/否获取Root权限
*/
public static boolean upgradeRootPermission(String pkgCodePath) {
Process process = null;
DataOutputStream os = null;
try {
String cmd = "chmod 777 " + pkgCodePath;
process = Runtime.getRuntime().exec("su"); //切换到root帐号
os = new DataOutputStream(process.getOutputStream());
os.writeBytes(cmd + "\n");
os.writeBytes("exit\n");
os.flush();
process.waitFor();
} catch (Exception e) {
return false;
} finally {
try {
if (os != null) {
os.close();
}
process.destroy();
} catch (Exception e) {
}
}
return true;
}

 

相关文章:

  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
  • 2022-12-23
  • 2022-02-22
  • 2022-02-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-19
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2021-05-21
  • 2021-11-26
相关资源
相似解决方案