80,337
社区成员
发帖
与我相关
我的任务
分享
String sourcePath = "/data/anr/traces.txt";
String targetPath = Configuration.getLogDirectoryPath() + Constants.LOG_ANR_PRESTR + "traces.txt";
boolean result = FileUtil.copyFile(sourcePath, targetPath, false);
if (!result) { // 某些手机traces.txt文件的命名有区别,例如中兴
FileUtil.copyFile("/data/anr/traces_xxx.txt", targetPath, false);
}
上面的代码我试了下vivo x6的手机,可以拷出来,但是vivo x9就不行了