[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] updates for Android L and PIE binary support



commit 5917e63693141dc08a99f8670ff3e274306a8c05
Author: Nathan Freitas <nathan@xxxxxxxxxxx>
Date:   Thu Nov 13 13:42:14 2014 -0500

    updates for Android L and PIE binary support
---
 AndroidManifest.xml                                          |    6 +++---
 external/Makefile                                            |    3 ++-
 external/tor                                                 |    2 +-
 project.properties                                           |    2 +-
 res/menu/main.xml                                            |    4 ++--
 res/raw/geoip6.mp3                                           |  Bin 81420 -> 93365 bytes
 res/raw/torrc                                                |    7 -------
 src/org/torproject/android/Orbot.java                        |    9 ++++++++-
 src/org/torproject/android/OrbotDiagnosticsActivity.java     |    2 --
 src/org/torproject/android/service/TorResourceInstaller.java |    5 ++++-
 src/org/torproject/android/service/TorService.java           |    8 +++-----
 src/org/torproject/android/service/TorServiceConstants.java  |    2 +-
 12 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index f1d0d62..f8cd7ba 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android";
       package="org.torproject.android" 
-      android:versionName="15.0.0-ALPHA-1" 
-      android:versionCode="125"
+      android:versionName="14.1.0-PIE" 
+      android:versionCode="126"
         android:installLocation="auto"      
       >
  	    
-    <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19"/>
+    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="19"/>
  <permission android:name="org.torproject.android.MANAGE_TOR" android:label="@string/permission_manage_tor_label" android:description="@string/permission_manage_tor_description" android:protectionLevel="signature"></permission>
     
  <uses-permission android:name="android.permission.INTERNET" />
diff --git a/external/Makefile b/external/Makefile
index dae5c33..4af1016 100644
--- a/external/Makefile
+++ b/external/Makefile
@@ -51,7 +51,8 @@ RANLIB := $(NDK_TOOLCHAIN_BASE)/bin/$(HOST)-ranlib
 STRIP := $(NDK_TOOLCHAIN_BASE)/bin/$(HOST)-strip \
 	--strip-unneeded -R .note -R .comment
 
-PIEFLAGS? = -fPIE -pie
+# PIEFLAGS for SDK 16/Android L must be set to -fPIE -pie
+PIEFLAGS? = 
 CFLAGS = -DANDROID $(TARGET_CFLAGS) $(PIEFLAGS)
 LDFLAGS = -llog $(TARGET_LDFLAGS) $(PIEFLAGS)
 
diff --git a/external/tor b/external/tor
index a64f3ab..42b4260 160000
--- a/external/tor
+++ b/external/tor
@@ -1 +1 @@
-Subproject commit a64f3ab3ee5c433cc1f046a7e26df7a49e308e4c
+Subproject commit 42b42605f8d8eac25361be229354f6393967df4f
diff --git a/project.properties b/project.properties
index 27f6863..2abb592 100644
--- a/project.properties
+++ b/project.properties
@@ -9,6 +9,6 @@
 proguard.config=${sdk.dir}/tools/proguard/proguard-android-optimize.txt:proguard-project.txt
 
 # Project target.
-target=android-19
+target=android-21
 android.library.reference.1=external/appcompat
 android.library.reference.2=external/superuser-commands/RootCommands-Library
diff --git a/res/menu/main.xml b/res/menu/main.xml
index 831897b..d453252 100644
--- a/res/menu/main.xml
+++ b/res/menu/main.xml
@@ -65,11 +65,11 @@
                   yourapp:showAsAction="ifRoom"
          
          />
- 
+ <!-- 
   <item android:id="@+id/menu_vpn"
       android:title="@string/menu_vpn"
       yourapp:showAsAction="never"/>
-  
+   -->
   
   <item android:id="@+id/menu_exit"
         android:title="@string/menu_exit"
diff --git a/res/raw/geoip6.mp3 b/res/raw/geoip6.mp3
index e5e5910..0e439b9 100644
Binary files a/res/raw/geoip6.mp3 and b/res/raw/geoip6.mp3 differ
diff --git a/res/raw/torrc b/res/raw/torrc
deleted file mode 100644
index e5a4c49..0000000
--- a/res/raw/torrc
+++ /dev/null
@@ -1,7 +0,0 @@
-RunAsDaemon 1
-AvoidDiskWrites 1
-ControlPort auto
-SOCKSPort 0
-DNSPort 0
-TransPort 0
-CookieAuthentication 1
\ No newline at end of file
diff --git a/src/org/torproject/android/Orbot.java b/src/org/torproject/android/Orbot.java
index e812fbe..d8e1f6b 100644
--- a/src/org/torproject/android/Orbot.java
+++ b/src/org/torproject/android/Orbot.java
@@ -448,10 +448,12 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
                         
                         
                 }
+                /**
+                 * remove for now... VPN is not ready yet
                 else if (item.getItemId() == R.id.menu_vpn)
                 {
                 	this.startVpnService();
-                }
+                }*/
                 
         return true;
         }
@@ -867,6 +869,11 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
 	        if (intent != null) {
 	            startActivityForResult(intent,REQUEST_VPN);
 	        } 
+	        else
+	        {
+				startService("vpn");
+
+	        }
     }
 
     private boolean flushTransProxy ()
diff --git a/src/org/torproject/android/OrbotDiagnosticsActivity.java b/src/org/torproject/android/OrbotDiagnosticsActivity.java
index 4cc8c6b..b639d82 100644
--- a/src/org/torproject/android/OrbotDiagnosticsActivity.java
+++ b/src/org/torproject/android/OrbotDiagnosticsActivity.java
@@ -8,11 +8,9 @@ import java.io.InputStreamReader;
 import java.util.ArrayList;
 
 import org.sufficientlysecure.rootcommands.Shell;
-import org.sufficientlysecure.rootcommands.Toolbox;
 import org.sufficientlysecure.rootcommands.command.SimpleCommand;
 import org.torproject.android.service.TorResourceInstaller;
 import org.torproject.android.service.TorServiceConstants;
-import org.torproject.android.service.TorServiceUtils;
 
 import android.app.Activity;
 import android.content.Context;
diff --git a/src/org/torproject/android/service/TorResourceInstaller.java b/src/org/torproject/android/service/TorResourceInstaller.java
index 3c0563b..e4b0ba4 100644
--- a/src/org/torproject/android/service/TorResourceInstaller.java
+++ b/src/org/torproject/android/service/TorResourceInstaller.java
@@ -23,6 +23,7 @@ import org.torproject.android.R;
 import org.torproject.android.TorConstants;
 
 import android.content.Context;
+import android.os.Build;
 import android.util.Log;
 
 public class TorResourceInstaller implements TorServiceConstants {
@@ -83,7 +84,8 @@ public class TorResourceInstaller implements TorServiceConstants {
 		shell.add(new SimpleCommand(COMMAND_RM_FORCE + outFile.getAbsolutePath())).waitForFinish();
 		streamToFile(is,outFile, false, false);
 	
-		is = context.getResources().openRawResource(R.raw.tor);
+	    
+    	is = context.getResources().openRawResource(R.raw.tor);
 		outFile = new File(installFolder, TOR_ASSET_KEY);
 		shell.add(new SimpleCommand(COMMAND_RM_FORCE + outFile.getAbsolutePath())).waitForFinish();
 		streamToFile(is,outFile, false, true);
@@ -102,6 +104,7 @@ public class TorResourceInstaller implements TorServiceConstants {
 		outFile = new File(installFolder, IPTABLES_ASSET_KEY);
 		shell.add(new SimpleCommand(COMMAND_RM_FORCE + outFile.getAbsolutePath())).waitForFinish();
 		streamToFile(is,outFile, false, true);
+    
 	
 		return true;
 	}
diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java
index c7c8cf0..aeca556 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -342,20 +342,18 @@ public class TorService extends Service implements TorServiceConstants, TorConst
 
 		try
 		{
-			
-			//android.os.Debug.waitForDebugger();
 				
 			new Thread (new TorStarter(intent)).start();
 			
-		    return Service.START_STICKY;
-		    
 		}
 		catch (Exception e)
 		{
 			logException ("Error starting service",e);
-			return Service.START_REDELIVER_INTENT;
+			return Service.START_NOT_STICKY;
 		}
 
+	    return Service.START_REDELIVER_INTENT;
+
 	}
 	
 	private class TorStarter implements Runnable
diff --git a/src/org/torproject/android/service/TorServiceConstants.java b/src/org/torproject/android/service/TorServiceConstants.java
index 51cae41..c6c7031 100644
--- a/src/org/torproject/android/service/TorServiceConstants.java
+++ b/src/org/torproject/android/service/TorServiceConstants.java
@@ -76,7 +76,7 @@ public interface TorServiceConstants {
     public static final int DISABLE_TOR_MSG = 3;
     public static final int LOG_MSG = 4;
     
-    public static final String BINARY_TOR_VERSION = "0.2.5.8-openssl1.0.1i";
+    public static final String BINARY_TOR_VERSION = "0.2.5.10-openssl1.0.1i";
     public static final String PREF_BINARY_TOR_VERSION_INSTALLED = "BINARY_TOR_VERSION_INSTALLED";
     
     //obfsproxy 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits