let cmd = "cd /data/data/org.autojs.autojspro/shared_prefs && pwd && ls -al "; var result = shell(cmd); if (result.code == 0) { toastLog("执行成功"); } else { toastLog("执行失败!请到控制台查看错误信息"); } var dir = "/data/data/org.autojs.autojspro/shared_prefs/"; var jsFiles = files.listDir(dir, function (name) { return name.endsWith(".xml") && files.isFile(files.join(dir, name)); }); files.create("/sdcard/autojsProStorage/"); jsFiles.map((item) => { let fromPath = dir + item; let toPath = "/sdcard/autojsProStorage/" + item; log("fromPath = " + fromPath); log("toPath = " + toPath); files.copy(fromPath, toPath); });
声明
部分内容来自网络
本教程仅用于学习, 禁止用于其他用途