updates for Android L and PIE binary support
This commit is contained in:
parent
ff8677496e
commit
5917e63693
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.torproject.android"
|
package="org.torproject.android"
|
||||||
android:versionName="15.0.0-ALPHA-1"
|
android:versionName="14.1.0-PIE"
|
||||||
android:versionCode="125"
|
android:versionCode="126"
|
||||||
android:installLocation="auto"
|
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>
|
<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" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
|
@ -51,7 +51,8 @@ RANLIB := $(NDK_TOOLCHAIN_BASE)/bin/$(HOST)-ranlib
|
||||||
STRIP := $(NDK_TOOLCHAIN_BASE)/bin/$(HOST)-strip \
|
STRIP := $(NDK_TOOLCHAIN_BASE)/bin/$(HOST)-strip \
|
||||||
--strip-unneeded -R .note -R .comment
|
--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)
|
CFLAGS = -DANDROID $(TARGET_CFLAGS) $(PIEFLAGS)
|
||||||
LDFLAGS = -llog $(TARGET_LDFLAGS) $(PIEFLAGS)
|
LDFLAGS = -llog $(TARGET_LDFLAGS) $(PIEFLAGS)
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit a64f3ab3ee5c433cc1f046a7e26df7a49e308e4c
|
Subproject commit 42b42605f8d8eac25361be229354f6393967df4f
|
|
@ -9,6 +9,6 @@
|
||||||
proguard.config=${sdk.dir}/tools/proguard/proguard-android-optimize.txt:proguard-project.txt
|
proguard.config=${sdk.dir}/tools/proguard/proguard-android-optimize.txt:proguard-project.txt
|
||||||
|
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-19
|
target=android-21
|
||||||
android.library.reference.1=external/appcompat
|
android.library.reference.1=external/appcompat
|
||||||
android.library.reference.2=external/superuser-commands/RootCommands-Library
|
android.library.reference.2=external/superuser-commands/RootCommands-Library
|
||||||
|
|
|
@ -65,11 +65,11 @@
|
||||||
yourapp:showAsAction="ifRoom"
|
yourapp:showAsAction="ifRoom"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
<!--
|
||||||
<item android:id="@+id/menu_vpn"
|
<item android:id="@+id/menu_vpn"
|
||||||
android:title="@string/menu_vpn"
|
android:title="@string/menu_vpn"
|
||||||
yourapp:showAsAction="never"/>
|
yourapp:showAsAction="never"/>
|
||||||
|
-->
|
||||||
|
|
||||||
<item android:id="@+id/menu_exit"
|
<item android:id="@+id/menu_exit"
|
||||||
android:title="@string/menu_exit"
|
android:title="@string/menu_exit"
|
||||||
|
|
Binary file not shown.
|
@ -1,7 +0,0 @@
|
||||||
RunAsDaemon 1
|
|
||||||
AvoidDiskWrites 1
|
|
||||||
ControlPort auto
|
|
||||||
SOCKSPort 0
|
|
||||||
DNSPort 0
|
|
||||||
TransPort 0
|
|
||||||
CookieAuthentication 1
|
|
|
@ -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)
|
else if (item.getItemId() == R.id.menu_vpn)
|
||||||
{
|
{
|
||||||
this.startVpnService();
|
this.startVpnService();
|
||||||
}
|
}*/
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -867,6 +869,11 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
|
||||||
if (intent != null) {
|
if (intent != null) {
|
||||||
startActivityForResult(intent,REQUEST_VPN);
|
startActivityForResult(intent,REQUEST_VPN);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
startService("vpn");
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean flushTransProxy ()
|
private boolean flushTransProxy ()
|
||||||
|
|
|
@ -8,11 +8,9 @@ import java.io.InputStreamReader;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.sufficientlysecure.rootcommands.Shell;
|
import org.sufficientlysecure.rootcommands.Shell;
|
||||||
import org.sufficientlysecure.rootcommands.Toolbox;
|
|
||||||
import org.sufficientlysecure.rootcommands.command.SimpleCommand;
|
import org.sufficientlysecure.rootcommands.command.SimpleCommand;
|
||||||
import org.torproject.android.service.TorResourceInstaller;
|
import org.torproject.android.service.TorResourceInstaller;
|
||||||
import org.torproject.android.service.TorServiceConstants;
|
import org.torproject.android.service.TorServiceConstants;
|
||||||
import org.torproject.android.service.TorServiceUtils;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
|
@ -23,6 +23,7 @@ import org.torproject.android.R;
|
||||||
import org.torproject.android.TorConstants;
|
import org.torproject.android.TorConstants;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
public class TorResourceInstaller implements TorServiceConstants {
|
public class TorResourceInstaller implements TorServiceConstants {
|
||||||
|
@ -83,6 +84,7 @@ public class TorResourceInstaller implements TorServiceConstants {
|
||||||
shell.add(new SimpleCommand(COMMAND_RM_FORCE + outFile.getAbsolutePath())).waitForFinish();
|
shell.add(new SimpleCommand(COMMAND_RM_FORCE + outFile.getAbsolutePath())).waitForFinish();
|
||||||
streamToFile(is,outFile, false, false);
|
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);
|
outFile = new File(installFolder, TOR_ASSET_KEY);
|
||||||
shell.add(new SimpleCommand(COMMAND_RM_FORCE + outFile.getAbsolutePath())).waitForFinish();
|
shell.add(new SimpleCommand(COMMAND_RM_FORCE + outFile.getAbsolutePath())).waitForFinish();
|
||||||
|
@ -103,6 +105,7 @@ public class TorResourceInstaller implements TorServiceConstants {
|
||||||
shell.add(new SimpleCommand(COMMAND_RM_FORCE + outFile.getAbsolutePath())).waitForFinish();
|
shell.add(new SimpleCommand(COMMAND_RM_FORCE + outFile.getAbsolutePath())).waitForFinish();
|
||||||
streamToFile(is,outFile, false, true);
|
streamToFile(is,outFile, false, true);
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -343,19 +343,17 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
//android.os.Debug.waitForDebugger();
|
|
||||||
|
|
||||||
new Thread (new TorStarter(intent)).start();
|
new Thread (new TorStarter(intent)).start();
|
||||||
|
|
||||||
return Service.START_STICKY;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
logException ("Error starting service",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
|
private class TorStarter implements Runnable
|
||||||
|
|
|
@ -76,7 +76,7 @@ public interface TorServiceConstants {
|
||||||
public static final int DISABLE_TOR_MSG = 3;
|
public static final int DISABLE_TOR_MSG = 3;
|
||||||
public static final int LOG_MSG = 4;
|
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";
|
public static final String PREF_BINARY_TOR_VERSION_INSTALLED = "BINARY_TOR_VERSION_INSTALLED";
|
||||||
|
|
||||||
//obfsproxy
|
//obfsproxy
|
||||||
|
|
Loading…
Reference in New Issue