commit 022436515d73f773d38149dc38c2aea0f07ab1d9 Author: Nathan Freitas nathan@freitas.net Date: Mon Jun 9 18:34:40 2014 -0400
ensure torrc values are overwritten --- .../android/service/TorResourceInstaller.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/src/org/torproject/android/service/TorResourceInstaller.java b/src/org/torproject/android/service/TorResourceInstaller.java index 2744a55..438e68d 100644 --- a/src/org/torproject/android/service/TorResourceInstaller.java +++ b/src/org/torproject/android/service/TorResourceInstaller.java @@ -115,6 +115,22 @@ public class TorResourceInstaller implements TorServiceConstants { return true; } + public boolean installTorrc () throws IOException, FileNotFoundException, TimeoutException + { + + InputStream is; + File outFile; + + Shell shell = Shell.startShell(new ArrayList<String>(),installFolder.getAbsolutePath()); + + is = context.getResources().openRawResource(R.raw.torrc); + outFile = new File(installFolder, TORRC_ASSET_KEY); + shell.add(new SimpleCommand(COMMAND_RM_FORCE + outFile.getAbsolutePath())).waitForFinish(); + streamToFile(is,outFile, false, false); + + return true; + } + /* * Extract the Tor binary from the APK file using ZIP */
tor-commits@lists.torproject.org