aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/AndroidManifest.xml20
-rw-r--r--app/src/main/c/0001-tincctl-restrict-umask-argument-for-FORTIFY.patch31
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/configure/ToolsFragment.kt4
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/configure/tools/GenerateConfigToolDialogFragment.kt7
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/configure/tools/JoinNetworkToolDialogFragment.kt5
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/start/ErrorNotificationFragment.kt60
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/start/NetworkListFragment.kt10
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/start/StartActivity.kt9
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/status/nodes/NodeInfo.kt12
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/status/subnets/SubnetInfo.kt4
-rw-r--r--app/src/main/java/org/pacien/tincapp/context/App.kt9
-rw-r--r--app/src/main/java/org/pacien/tincapp/context/AppNotificationManager.kt80
-rw-r--r--app/src/main/java/org/pacien/tincapp/context/AppPaths.kt29
-rw-r--r--app/src/main/java/org/pacien/tincapp/context/StorageMigrator.kt71
-rw-r--r--app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt8
-rw-r--r--app/src/main/java/org/pacien/tincapp/utils/Files.kt47
-rw-r--r--app/src/main/java/org/pacien/tincapp/utils/PendingIntentUtils.kt35
-rw-r--r--app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt10
-rw-r--r--app/src/main/play/listings/en-US/full-description.txt2
-rw-r--r--app/src/main/res/drawable/ic_baseline_folder_open_primary_24dp.xml29
-rw-r--r--app/src/main/res/layout/configure_activity.xml16
-rw-r--r--app/src/main/res/layout/configure_tools_path_info_fragment.xml2
-rw-r--r--app/src/main/res/layout/start_activity.xml29
-rw-r--r--app/src/main/res/layout/start_error_notification.xml69
-rw-r--r--app/src/main/res/layout/start_network_list.xml2
-rw-r--r--app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml1
-rw-r--r--app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml1
-rw-r--r--app/src/main/res/values-nb-rNO/strings.xml6
-rw-r--r--app/src/main/res/values-ru-rRU/strings.xml142
-rw-r--r--app/src/main/res/values-zh-rCN/strings.xml6
-rw-r--r--app/src/main/res/values-zh-rHK/strings.xml6
-rw-r--r--app/src/main/res/values-zh-rTW/strings.xml6
-rw-r--r--app/src/main/res/values/colors.xml3
-rw-r--r--app/src/main/res/values/strings.xml8
-rw-r--r--app/src/main/res/values/styles.xml6
-rw-r--r--app/src/main/res/xml/backup_rules.xml39
-rw-r--r--app/src/main/res/xml/data_extraction_rules.xml41
37 files changed, 694 insertions, 171 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index c86ec8f..a1183d5 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -2,7 +2,7 @@
2 2
3<!-- 3<!--
4 * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon 4 * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon
5 * Copyright (C) 2017-2020 Pacien TRAN-GIRARD 5 * Copyright (C) 2017-2023 Pacien TRAN-GIRARD
6 * 6 *
7 * This program is free software: you can redistribute it and/or modify 7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,8 +19,7 @@
19--> 19-->
20 20
21<manifest xmlns:android="http://schemas.android.com/apk/res/android" 21<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22 xmlns:tools="http://schemas.android.com/tools" 22 xmlns:tools="http://schemas.android.com/tools">
23 package="org.pacien.tincapp">
24 23
25 <uses-permission android:name="android.permission.INTERNET" /> 24 <uses-permission android:name="android.permission.INTERNET" />
26 25
@@ -29,12 +28,15 @@
29 28
30 <application 29 <application
31 android:name="org.pacien.tincapp.context.App" 30 android:name="org.pacien.tincapp.context.App"
32 android:allowBackup="false" 31 android:allowBackup="true"
32 android:dataExtractionRules="@xml/data_extraction_rules"
33 android:fullBackupContent="@xml/backup_rules"
33 android:icon="@mipmap/ic_launcher" 34 android:icon="@mipmap/ic_launcher"
34 android:label="@string/app_name" 35 android:label="@string/app_name"
35 android:supportsRtl="true" 36 android:supportsRtl="true"
36 android:theme="@style/AppTheme" 37 android:theme="@style/AppTheme"
37 tools:ignore="GoogleAppIndexingWarning"> 38 tools:ignore="GoogleAppIndexingWarning"
39 tools:targetApi="s">
38 40
39 <uses-library 41 <uses-library
40 android:name="org.apache.http.legacy" 42 android:name="org.apache.http.legacy"
@@ -43,7 +45,7 @@
43 <activity 45 <activity
44 android:name=".activities.start.StartActivity" 46 android:name=".activities.start.StartActivity"
45 android:configChanges="orientation|screenSize" 47 android:configChanges="orientation|screenSize"
46 android:label="@string/app_name"> 48 android:exported="true">
47 <intent-filter> 49 <intent-filter>
48 <action android:name="android.intent.action.MAIN" /> 50 <action android:name="android.intent.action.MAIN" />
49 <category android:name="android.intent.category.LAUNCHER" /> 51 <category android:name="android.intent.category.LAUNCHER" />
@@ -62,7 +64,8 @@
62 64
63 <activity 65 <activity
64 android:name=".activities.status.StatusActivity" 66 android:name=".activities.status.StatusActivity"
65 android:configChanges="orientation|screenSize"> 67 android:configChanges="orientation|screenSize"
68 android:exported="true">
66 <intent-filter> 69 <intent-filter>
67 <action android:name="org.pacien.tincapp.intent.action.DISCONNECT" /> 70 <action android:name="org.pacien.tincapp.intent.action.DISCONNECT" />
68 <category android:name="android.intent.category.DEFAULT" /> 71 <category android:name="android.intent.category.DEFAULT" />
@@ -75,7 +78,8 @@
75 78
76 <service 79 <service
77 android:name="org.pacien.tincapp.service.TincVpnService" 80 android:name="org.pacien.tincapp.service.TincVpnService"
78 android:permission="android.permission.BIND_VPN_SERVICE"> 81 android:permission="android.permission.BIND_VPN_SERVICE"
82 android:exported="true">
79 <intent-filter> 83 <intent-filter>
80 <action android:name="android.net.VpnService" /> 84 <action android:name="android.net.VpnService" />
81 </intent-filter> 85 </intent-filter>
diff --git a/app/src/main/c/0001-tincctl-restrict-umask-argument-for-FORTIFY.patch b/app/src/main/c/0001-tincctl-restrict-umask-argument-for-FORTIFY.patch
deleted file mode 100644
index 85ab949..0000000
--- a/app/src/main/c/0001-tincctl-restrict-umask-argument-for-FORTIFY.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From b6498e6402d9681743b697c1c9f0760448b3be54 Mon Sep 17 00:00:00 2001
2From: pacien <pacien.trangirard@pacien.net>
3Date: Wed, 9 Sep 2020 01:24:28 +0200
4Subject: [PATCH] tincctl: restrict umask argument for FORTIFY
5
6`umask(mode)` calls that do not verify `(mode & 0777) == mode` are
7rejected when the libc FORTIFY checks are enabled [1].
8
9The unrestricted `~perms` was indeed making this assertion fail.
10
11[1]: https://android.googlesource.com/platform/bionic/+/refs/tags/android-11.0.0_r3/libc/bionic/fortify.cpp#404
12---
13 src/tincctl.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/tincctl.c b/src/tincctl.c
17index 08f30189..11c1a96c 100644
18--- a/src/tincctl.c
19+++ b/src/tincctl.c
20@@ -237,7 +237,7 @@ static bool parse_options(int argc, char **argv) {
21 FILE *fopenmask(const char *filename, const char *mode, mode_t perms) {
22 mode_t mask = umask(0);
23 perms &= ~mask;
24- umask(~perms);
25+ umask(~perms & 0777);
26 FILE *f = fopen(filename, mode);
27
28 if(!f) {
29--
302.25.4
31
diff --git a/app/src/main/java/org/pacien/tincapp/activities/configure/ToolsFragment.kt b/app/src/main/java/org/pacien/tincapp/activities/configure/ToolsFragment.kt
index 9d30bee..5850a1c 100644
--- a/app/src/main/java/org/pacien/tincapp/activities/configure/ToolsFragment.kt
+++ b/app/src/main/java/org/pacien/tincapp/activities/configure/ToolsFragment.kt
@@ -1,6 +1,6 @@
1/* 1/*
2 * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon 2 * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon
3 * Copyright (C) 2017-2020 Pacien TRAN-GIRARD 3 * Copyright (C) 2017-2023 Pacien TRAN-GIRARD
4 * 4 *
5 * This program is free software: you can redistribute it and/or modify 5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
@@ -46,5 +46,5 @@ class ToolsFragment : BaseFragment() {
46 } 46 }
47 47
48 private fun openDialog(tool: ConfigurationToolDialogFragment): () -> Unit = 48 private fun openDialog(tool: ConfigurationToolDialogFragment): () -> Unit =
49 { tool.show(fragmentManager, tool.javaClass.simpleName) } 49 { if (!tool.isAdded) tool.show(fragmentManager!!, tool.javaClass.simpleName) }
50} 50}
diff --git a/app/src/main/java/org/pacien/tincapp/activities/configure/tools/GenerateConfigToolDialogFragment.kt b/app/src/main/java/org/pacien/tincapp/activities/configure/tools/GenerateConfigToolDialogFragment.kt
index 96e39ba..c152d54 100644
--- a/app/src/main/java/org/pacien/tincapp/activities/configure/tools/GenerateConfigToolDialogFragment.kt
+++ b/app/src/main/java/org/pacien/tincapp/activities/configure/tools/GenerateConfigToolDialogFragment.kt
@@ -1,6 +1,6 @@
1/* 1/*
2 * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon 2 * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon
3 * Copyright (C) 2017-2018 Pacien TRAN-GIRARD 3 * Copyright (C) 2017-2024 Pacien TRAN-GIRARD
4 * 4 *
5 * This program is free software: you can redistribute it and/or modify 5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
@@ -23,6 +23,8 @@ import kotlinx.android.synthetic.main.configure_tools_dialog_network_generate.vi
23import org.pacien.tincapp.R 23import org.pacien.tincapp.R
24import org.pacien.tincapp.commands.Tinc 24import org.pacien.tincapp.commands.Tinc
25import org.pacien.tincapp.commands.TincApp 25import org.pacien.tincapp.commands.TincApp