I don't understand why it was necessary. on some devices, the binary is in a different location. if this is still needed for something, we need to search for chmod binary dynamiclymaster
| if (entry.isDirectory()) { | if (entry.isDirectory()) { | ||||
| progress.file.mkdirs(); | progress.file.mkdirs(); | ||||
| FileUtils.chmod(progress.file); | |||||
| continue; | continue; | ||||
| } | } | ||||
| outputStream.close(); | outputStream.close(); | ||||
| } | } | ||||
| zipStream.closeEntry(); | zipStream.closeEntry(); | ||||
| // Make sure the output file is readable. | |||||
| FileUtils.chmod(progress.file); | |||||
| } | } | ||||
| final String version = FileUtils.read(mContext.getResources().openRawResource(R.raw.espeakdata_version)); | final String version = FileUtils.read(mContext.getResources().openRawResource(R.raw.espeakdata_version)); |
| } finally { | } finally { | ||||
| outputStream.close(); | outputStream.close(); | ||||
| } | } | ||||
| chmod(outputFile); | |||||
| } | |||||
| public static void chmod(File file) { | |||||
| try { | |||||
| Runtime.getRuntime().exec("/system/bin/chmod 755 " + file.getAbsolutePath()); | |||||
| } catch (IOException e) { | |||||
| e.printStackTrace(); | |||||
| } | |||||
| } | } | ||||
| public static void rmdir(File directory) { | public static void rmdir(File directory) { |