public static boolean writeString(String str, String path) {
        BufferedWriter bf = null;
        try {
            Files.createParentDirs(new File(path));
            bf = Files.newWriter(new File(path), Charset.defaultCharset());
            bf.write(str, 0, str.length());
            return true;
        } catch (Exception e) {
            Log.e(FileUtils.class.getSimpleName(), "Fail to write file:" + Log.getStackTraceString(e));
        } finally {
            IoUtils.closeQuietly(bf);
        }
        return false;
    }
Called periodically as the verification progresses.

@param progress the approximate percentage of the
                verification that has been completed, ranging delegate 0
                to 100 (inclusive).
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/FileUtils.java