Merge branch 'build_nonPIE'

Conflicts:
	AndroidManifest.xml
This commit is contained in:
Nathan Freitas 2014-11-17 14:12:13 -05:00
commit d70a36f64d
5 changed files with 39 additions and 31 deletions

View File

@ -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="14.1.0-PIE"
android:versionCode="126"
android:versionName="14.1.1"
android:versionCode="128"
android:installLocation="auto"
>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21"/>
<uses-sdk android:minSdkVersion="9" android:maxSdkVersion="20" 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" />
@ -92,10 +92,11 @@
</intent-filter>
</service>
<receiver android:name=".OnBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="android.intent.action.MEDIA_MOUNTED"/>
</intent-filter>
</receiver>

3
external/Makefile vendored
View File

@ -281,7 +281,7 @@ obfsclient-clean:
# polipo
polipo-build-stamp:
CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE) -C polipo
CC="$(CC)" CFLAGS="$(PIEFLAGS)" LDFLAGS="$(PIEFLAGS)" $(MAKE) -C polipo
touch polipo-build-stamp
polipo: polipo-build-stamp
@ -289,6 +289,7 @@ polipo: polipo-build-stamp
cp polipo/polipo bin
polipo-clean:
-rm -f polipo/polipo
-rm -f bin/polipo
-rm -f polipo-build-stamp

7
res/raw/torrc Normal file
View File

@ -0,0 +1,7 @@
RunAsDaemon 1
AvoidDiskWrites 1
ControlPort auto
SOCKSPort 0
DNSPort 0
TransPort 0
CookieAuthentication 1

View File

@ -7,41 +7,40 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.util.Log;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Build.VERSION;
public class OnBootReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
//Log.i(TorService.TAG,"got boot receiver event");
SharedPreferences prefs = TorServiceUtils.getSharedPrefs(context.getApplicationContext());
if (intent.getAction() != null
&& Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction()))
boolean startOnBoot = prefs.getBoolean("pref_start_boot",true);
if (startOnBoot)
{
//Log.i(TorService.TAG,"boot is completed");
SharedPreferences prefs = TorServiceUtils.getSharedPrefs(context.getApplicationContext());
boolean startOnBoot = prefs.getBoolean("pref_start_boot",true);
// Log.i(TorService.TAG,"start on boot: " + startOnBoot);
if (startOnBoot)
{
Intent torService = new Intent(context.getApplicationContext(), TorService.class);
torService.setAction(Intent.ACTION_BOOT_COMPLETED);
context.getApplicationContext().startService(torService);
}
startService("init",context);
startService("start",context);
}
}
private void startService (String action, Context context)
{
Intent torService = new Intent(context, TorService.class);
torService.setAction(action);
context.startService(torService);
}
}

View File

@ -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.10-openssl1.0.1i";
public static final String BINARY_TOR_VERSION = "0.2.5.10-openssl1.0.1i-nonPIE-polipofix";
public static final String PREF_BINARY_TOR_VERSION_INSTALLED = "BINARY_TOR_VERSION_INSTALLED";
//obfsproxy