Skip to content
Permalink
Browse files

Change the location of modules binaries to the application libs folder

  • Loading branch information
Gedsh committed Jan 29, 2020
1 parent 095df8b commit 612d77cdec98924ef12e1549d95578d3f720f91d
Showing with 527 additions and 519 deletions.
  1. +1 −0 gradle.properties
  2. BIN tordnscrypt/libs/arm64-v8a/libdnscrypt-proxy.so
  3. BIN tordnscrypt/libs/arm64-v8a/libi2pd.so
  4. BIN tordnscrypt/libs/armeabi-v7a/libdnscrypt-proxy.so
  5. BIN tordnscrypt/libs/armeabi-v7a/libi2pd.so
  6. BIN tordnscrypt/src/arm64/assets/dnscrypt.mp3
  7. BIN tordnscrypt/src/arm64/assets/itpd.mp3
  8. BIN tordnscrypt/src/arm64/assets/tor.mp3
  9. BIN tordnscrypt/src/armv7a/assets/dnscrypt.mp3
  10. BIN tordnscrypt/src/armv7a/assets/itpd.mp3
  11. BIN tordnscrypt/src/armv7a/assets/tor.mp3
  12. +2 −0 tordnscrypt/src/main/AndroidManifest.xml
  13. +1 −1 tordnscrypt/src/main/java/pan/alexander/tordnscrypt/dnscrypt_fragment/DNSCryptFragmentReceiver.java
  14. +6 −6 tordnscrypt/src/main/java/pan/alexander/tordnscrypt/help/HelpActivity.java
  15. +8 −9 tordnscrypt/src/main/java/pan/alexander/tordnscrypt/installer/Installer.java
  16. +4 −4 tordnscrypt/src/main/java/pan/alexander/tordnscrypt/iptables/IptablesRulesSender.java
  17. +147 −146 tordnscrypt/src/main/java/pan/alexander/tordnscrypt/iptables/ModulesIptablesRules.java
  18. +303 −302 tordnscrypt/src/main/java/pan/alexander/tordnscrypt/iptables/Tethering.java
  19. +1 −1 tordnscrypt/src/main/java/pan/alexander/tordnscrypt/itpd_fragment/ITPDFragmentReceiver.java
  20. +17 −17 tordnscrypt/src/main/java/pan/alexander/tordnscrypt/modules/ModulesKiller.java
  21. +3 −3 tordnscrypt/src/main/java/pan/alexander/tordnscrypt/modules/ModulesStarterHelper.java
  22. +33 −29 tordnscrypt/src/main/java/pan/alexander/tordnscrypt/settings/PathVars.java
  23. +1 −1 tordnscrypt/src/main/java/pan/alexander/tordnscrypt/tor_fragment/TorFragmentReceiver.java
@@ -10,6 +10,7 @@ org.gradle.jvmargs=-Xmx1536m
android.enableR8 = true
android.useAndroidX=true
android.enableJetifier=true
android.bundle.enableUncompressedNativeLibs=false
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,6 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="pan.alexander.tordnscrypt"
android:installLocation="internalOnly"
android:targetSandboxVersion="1"
tools:targetApi="o">

@@ -38,6 +39,7 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:banner="@drawable/banner_tv"
android:extractNativeLibs="true"
tools:ignore="AllowBackup">

<service
@@ -186,7 +186,7 @@ private void checkDNSVersionWithRoot(Context context) {
if (presenter.isDNSCryptInstalled(context)) {

String[] commandsCheck = {
busyboxPath + "pgrep -l /dnscrypt-proxy",
busyboxPath + "pgrep -l /libdnscrypt-proxy.so",
busyboxPath + "echo 'checkDNSRunning'",
busyboxPath + "echo 'DNSCrypt_version'",
dnscryptPath + " --version"
@@ -71,7 +71,7 @@
private String appDataDir;
private String busyboxPath;
private String pathToSaveLogs;
private String iptablesPath;
private String iptables;
private String appUID;
private static DialogFragment dialogFragment;
private ModulesStatus modulesStatus;
@@ -98,7 +98,7 @@ protected void onCreate(Bundle savedInstanceState) {
appDataDir = pathVars.appDataDir;
busyboxPath = pathVars.busyboxPath;
pathToSaveLogs = pathVars.pathBackup;
iptablesPath = pathVars.iptablesPath;
iptables = pathVars.iptablesPath;
appUID = new PrefManager(this).getStrPref("appUID");

br = new HelpActivityReceiver(mHandler, appDataDir, pathToSaveLogs);
@@ -189,10 +189,10 @@ private void collectLogsMethodOne (String info) {
busyboxPath + "mkdir -m 655 -p logs_dir",
busyboxPath + "cp -R logs logs_dir",
"logcat -d | grep " + pid + " > logs_dir/logcat.log",
iptablesPath + "iptables -L -v > logs_dir/filter.log",
iptablesPath + "iptables -t nat -L -v > logs_dir/nat.log",
iptablesPath + "iptables -t mangle -L -v > logs_dir/mangle.log",
iptablesPath + "iptables -t raw -L -v > logs_dir/raw.log",
iptables + "-L -v > logs_dir/filter.log",
iptables + "-t nat -L -v > logs_dir/nat.log",
iptables + "-t mangle -L -v > logs_dir/mangle.log",
iptables + "-t raw -L -v > logs_dir/raw.log",
busyboxPath + "cp -R shared_prefs logs_dir",
busyboxPath + "sleep 1",
busyboxPath + "echo \"" + info + "\" > logs_dir/device_info.log",
@@ -203,7 +203,6 @@ private void savePreferencesModulesInstalled(boolean installed) {

}

@SuppressWarnings("all")
protected boolean waitUntilAllModulesStopped() {
countDownLatch = new CountDownLatch(1);
Log.i(LOG_TAG, "Installer: waitUntilAllModulesStopped");
@@ -255,7 +254,7 @@ protected void removeInstallationDirsIfExists() {
Log.i(LOG_TAG, "Installer: removeInstallationDirsIfExists OK");
}

protected void chmodExtractedDirs() throws Exception {
protected void chmodExtractedDirs() {
ChmodCommand.dirChmod(appDataDir + "/app_bin", true);
ChmodCommand.dirChmod(appDataDir + "/app_data", false);

@@ -313,13 +312,13 @@ protected void stopAllRunningModulesWithRootCommand() {
"iptables -F tordnscrypt_forward",
"iptables -t nat -D PREROUTING -j tordnscrypt_prerouting || true",
"iptables -D FORWARD -j tordnscrypt_forward || true",
busyboxNative + "pkill -SIGTERM /dnscrypt-proxy",
busyboxNative + "pkill -SIGTERM /tor",
busyboxNative + "pkill -SIGTERM /i2pd",
busyboxNative + "pkill -SIGTERM /libdnscrypt-proxy.so",
busyboxNative + "pkill -SIGTERM /libtor.so",
busyboxNative + "pkill -SIGTERM /libi2pd.so",
busyboxNative + "sleep 7",
busyboxNative + "pgrep -l /dnscrypt-proxy",
busyboxNative + "pgrep -l /tor",
busyboxNative + "pgrep -l /i2pd",
busyboxNative + "pgrep -l /libdnscrypt-proxy.so",
busyboxNative + "pgrep -l /libtor.so",
busyboxNative + "pgrep -l /libi2pd.so",
busyboxNative + "echo 'checkModulesRunning'"
};

@@ -339,7 +338,7 @@ protected void stopAllRunningModulesWithNoRootCommand() {
ModulesAux.stopModulesIfRunning(activity);
}

protected void createLogsDir() throws Exception {
protected void createLogsDir() {
File logDir = new File(appDataDir + "/logs");
if (!logDir.isDirectory()) {
if (logDir.mkdir()) {
@@ -39,8 +39,8 @@
String dnsCryptFallbackRes;
String torDNSPort;
String torVirtAdrNet;
String busyboxPath;
String iptablesPath;
String busybox;
String iptables;
String rejectAddress;

boolean runModulesWithRoot;
@@ -62,8 +62,8 @@
dnsCryptFallbackRes = pathVars.dnsCryptFallbackRes;
torDNSPort = pathVars.torDNSPort;
torVirtAdrNet = pathVars.torVirtAdrNet;
busyboxPath = pathVars.busyboxPath;
iptablesPath = pathVars.iptablesPath;
busybox = pathVars.busyboxPath;
iptables = pathVars.iptablesPath;
rejectAddress = pathVars.rejectAddress;

tethering = new Tethering(context);

0 comments on commit 612d77c

Please sign in to comment.
You can’t perform that action at this time.