在开发时,手机先要ROOT,然后在通过代码改变权限。
public synchronized static boolean getRoot(String paramString)
{
Process process = null;
DataOutputStream os = null;
try
{
process = Runtime.getRuntime().exec("su");
os = new DataOutputStream(process.getOutputStream());
os.writeBytes(paramString + "n");
os.writeBytes("exitn");
os.flush();
process.waitFor();
} catch (Exception localException)
{
System.out.println("@@@@root cmd error:"+localException);
//localException.printStackTrace();
return false;
}finally {
try {
if (os != null) {
os.close();
}
process.destroy();
} catch (Exception e) {
System.out.println("###root cmd error:"+e);
}
}
return true;
}
引用时需要注意加入权限:
getRoot("chmod -R 777 /data/data/com.xxxxx/databases/wa.db");
服装店经营模拟游戏 汉化版v0.1
服装店经营模拟游戏是一款玩法简单有趣的3D类型模拟经营游戏,
从细胞到奇点 最新版本v32.42
从细胞到奇点官方正版是一款科学放置游戏,在游戏中玩家需要点击
MY LITTLE PONY魔法公主 安卓版v10.0.0
MY LITTLE PONY魔法公主是一款卡通风格的模拟养成
星露谷物语sve 安卓版v1.5.6.52
星露谷物语sve手机版是游戏的超大拓展Mod内容,全称Sta
动物园大亨 手机版v2.0
动物园大亨是一款模拟动物园经营的休闲放置游戏,采用了卡通画风