-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e7a78cd
Showing
351 changed files
with
39,355 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
# **/doc/api/ | ||
**/ios/Flutter/.last_build_id | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
/build/ | ||
|
||
# Web related | ||
lib/generated_plugin_registrant.dart | ||
|
||
# Symbolication related | ||
app.*.symbols | ||
|
||
# Obfuscation related | ||
app.*.map.json | ||
|
||
# Android Studio will place build artifacts here | ||
/android/app/debug | ||
/android/app/profile | ||
/android/app/release | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file tracks properties of this Flutter project. | ||
# Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
# | ||
# This file should be version controlled and should not be manually edited. | ||
|
||
version: | ||
revision: f4abaa0735eba4dfd8f33f73363911d63931fe03 | ||
channel: stable | ||
|
||
project_type: app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Copyright 2023 Technische Universität Berlin | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this software except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
|
||
This product bundles the TRAPEZE Identity Kit, which is available under an | ||
"MIT" license. For details, see assets/LICENSE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
TRAPEZE-MOBILE | ||
Copyright 2023 Technische Universität Berlin | ||
|
||
This product includes software developed at | ||
Technische Universtität Berlin (https://tu.berlin/). | ||
|
||
The visual assets of the TRAPEZE Identity Kit | ||
in assets/ic_launcher and assets/images were created by Tenforce. (https://www.tenforce.com/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
# TRAPEZE Mobile Application | ||
Contributors: K. Pelz, P.Pathak, I.Lehrer, N.Shawarba, T.Eichinger, P.Raschke | ||
|
||
![Screenshots](https://github.com/trapeze-project/trapeze-mobile.git/blob/main/screenshots/put-all-screenshots-together.png?raw=true) | ||
|
||
This is the code repository for the TRAPEZE Mobile Application for Android phones. | ||
The TRAPEZE Mobile Application is built on the basis of the [Flutter UI Framework](https://flutter.dev) developed by Google. | ||
It provides a user interface for a mobile application that performs malware detection scans and, in case a malware was detected, provides further information on (1) how to resolve the security issue and (2) how to avoid the security issue it in the future. | ||
|
||
By default, the TRAPEZE Mobile Application makes use of the [Kaspersky Mobile Security SDK](https://www.kaspersky.com/mobile-security-sdk) by the Kaspersky Cyber-Security Company that implements malware detection scans. | ||
|
||
This ```trapeze-mobile``` repository DOES NOT contain any malware detection business logic. | ||
The business logic for malware detection for use with the TRAPEZE Mobile Application is available in a separate repository called ```kaspersky_sdk``` available [here](https://github.com/trapeze-project/kaspersky_sdk). The ```kaspersky_sdk``` repository implements a [Flutter Plugin Package](https://docs.flutter.dev/packages-and-plugins/developing-packages#types). | ||
Using malware detection scans provided by the Kaspersky Mobile Security SDK requires adding .aar files that contain their business logic to the ```kaspersky_sdk``` and also a *license key* from Kaspersky. | ||
|
||
A release version of the TRAPEZE Mobile Application can be downloaded [here](tbd). | ||
|
||
## 1. Clone the Code | ||
|
||
Clone the code respository for the TRAPEZE Mobile Application and the code repository for the Flutter package that holds the business logic for the malware detection scans. | ||
|
||
```sh | ||
git clone https://github.com/trapeze-project/trapeze-mobile.git | ||
git clone https://github.com/trapeze-project/kaspersky_sdk.git | ||
``` | ||
|
||
The TRAPEZE Mobile Application assumes that both repositories are located in the same directory. | ||
|
||
```sh | ||
./ | ||
|-- /kaspersky_sdk --> code repository of the KMS-SDK Flutter Plugin Package | ||
|-- /trapeze-mobile --> main code repository | ||
``` | ||
|
||
If you wish to use another folder structure, you need to specify the path to the ```kaspersky_sdk``` repository in the ```pubspec.yaml``` file in the ```trapeze-mobile``` repository. | ||
|
||
|
||
## 2. Install Dependencies | ||
|
||
### 2.1 Install Flutter and Dart command-line programs | ||
|
||
Download the latest stable release version of Flutter command-line program by following the official [installation steps](https://docs.flutter.dev/get-started/install). We verified the code to work for the following Flutter version: | ||
|
||
```sh | ||
>> flutter --version | ||
Flutter 3.0.0 • channel stable • https://github.com/flutter/flutter.git | ||
Framework • revision ee4e09cce0 (7 days ago) • 2022-05-09 16:45:18 -0700 | ||
Engine • revision d1b9a6938a | ||
Tools • Dart 2.17.0 • DevTools 2.12.2 | ||
``` | ||
|
||
> Note that the installation of the Flutter command-line program includes the installation of the Dart command-line program. | ||
### 2.2 Install an IDE | ||
|
||
<details><summary>IDE Installation Details</summary> | ||
|
||
We present installations of two popular IDEs for the development of the TRAPEZE-mobile application. | ||
|
||
#### 2.2.1 Android Studio | ||
|
||
Download the Android Studio IDE following these [installation instructions](https://developer.android.com/studio?hl=de&gclid=CjwKCAjwj42UBhAAEiwACIhADk7rYnzdjIAXFR_vOgtWB1K62yQZFkn2xq1wzcm5KfY0p2PltBpJKhoCwn0QAvD_BwE&gclsrc=aw.ds). We have verified that the project builds correctly under the following release of Android Studio, Flutter, Dart, and Kotlin plugins: | ||
|
||
``` | ||
Android Studio Chipmunk | 2021.2.1 | ||
Build #AI-212.5712.43.2112.8512546, built on April 28, 2022 | ||
Runtime version: 11.0.12+0-b1504.28-7817840 x86_64 | ||
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. | ||
Non-Bundled Plugins: Dart (212.5744), org.jetbrains.kotlin (212-1.6.21-release-334-AS5457.46), io.flutter (67.1.2) | ||
``` | ||
|
||
> Install Flutter, Dart, and Kotlin plugins by double tapping \[Shift\] and typing 'Plugin' into the search bar to navigate to the Plugin-manager. | ||
You may also need to configure the integrated Android SDK. You can install for instance the **Android SDK command-line Tools** and **Android SDK Build-Tools** via the SDK Manager. | ||
|
||
> Install Android SDK command-line tools and Build-tools by double tapping \[Shift\] and typing 'SDK Manager' into the search bar to navigate to the SDK Manager. | ||
|
||
#### 2.2.2 Visual Studio Code | ||
|
||
Download the Visual Studio Code IDE following these [installation instructions](https://code.visualstudio.com/). We have verified that the project builds correctly under the following release of Android Studio, Flutter, Dart, and Kotlin plugins: | ||
|
||
``` | ||
Visual Studio Code | Version: 1.67.1 | ||
Commit: da15b6fd3ef856477bf6f4fb29ba1b7af717770d | ||
Date: 2022-05-06T12:37:16.526Z | ||
``` | ||
|
||
> Install Kotlin, Dart, and Flutter extensions by clicking on the Extensions icon in the left menu, or clicking on the Settings icon (gear) in the bottom left and then select 'Extensions'. | ||
</details> | ||
|
||
|
||
## 3. Run the App and Build an APK | ||
|
||
### 3.1 Run and build the TRAPEZE-mobile application | ||
|
||
> CAVEAT Running the TRAPEZE Mobile Application will only run if it is run on an *Android device* (currently no support for iOS and Web). | ||
> CAVEAT Malware detection scans will only work if the** *.aar files* from the Kaspersky Mobile Security SDK and a license key are added to the ```kaspersky_sdk``` repository as described in the README in the ```kaspersky_sdk``` repository. | ||
Run the TRAPEZE-mobile application by running the following commands | ||
|
||
1. [OPTIONAL] Clear dependencies | ||
``` | ||
flutter clean | ||
``` | ||
|
||
2. Run the application | ||
``` | ||
flutter run --<debug|release> | ||
``` | ||
where you can choose between 'debug' and 'release' modes. | ||
|
||
> Note that `flutter run` includes the execution of `flutter pub get` (install dependencies). | ||
### 3.2 Build an APK of the TRAPEZE-mobile application | ||
|
||
> CAVEAT Building .apk files of the TRAPEZE Mobile Application requires adding the Kaspersky Mobile Security SDK's .aar files and a license key to the ```kaspersky_sdk``` repository as described in the README in the ```kaspersky_sdk``` repository.* | ||
Build an APK (.apk) by running the following commands in the command-line at the root of the ```trapeze-mobile``` repository. | ||
|
||
1. [OPTIONAL] Clear dependencies | ||
``` | ||
flutter clean | ||
``` | ||
|
||
2. Build APK | ||
``` | ||
flutter build apk --<debug|release> | ||
``` | ||
where you can choose between 'debug' and 'release' modes. | ||
|
||
The compiled .apk files can be found here: `./build/app/outputs/flutter-apk/app-<debug|release>.apk`. | ||
|
||
|
||
## Contact | ||
|
||
Please do not hesitate to direct your questions to tobias.eichinger (AT) tu-berlin.de and philip.raschke (AT) tu-berlin.de. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
gradle-wrapper.jar | ||
/.gradle | ||
/captures/ | ||
/gradlew | ||
/gradlew.bat | ||
/local.properties | ||
GeneratedPluginRegistrant.java | ||
|
||
# Remember to never publicly share your keystore. | ||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app | ||
key.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
def localProperties = new Properties() | ||
def localPropertiesFile = rootProject.file('local.properties') | ||
if (localPropertiesFile.exists()) { | ||
localPropertiesFile.withReader('UTF-8') { reader -> | ||
localProperties.load(reader) | ||
} | ||
} | ||
|
||
def flutterRoot = localProperties.getProperty('flutter.sdk') | ||
if (flutterRoot == null) { | ||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") | ||
} | ||
|
||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') | ||
if (flutterVersionCode == null) { | ||
flutterVersionCode = '1' | ||
} | ||
|
||
def flutterVersionName = localProperties.getProperty('flutter.versionName') | ||
if (flutterVersionName == null) { | ||
flutterVersionName = '1.0' | ||
} | ||
|
||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" | ||
|
||
android { | ||
compileSdkVersion 31 | ||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin' | ||
} | ||
|
||
defaultConfig { | ||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | ||
applicationId "de.tub.snet.flutternativetrapeze" | ||
minSdkVersion 24 | ||
targetSdkVersion 30 // = Android 11 | ||
versionCode flutterVersionCode.toInteger() | ||
versionName flutterVersionName | ||
} | ||
|
||
buildTypes { | ||
release { | ||
// TODO: Add your own signing config for the release build. | ||
// Signing with the debug keys for now, so `flutter run --release` works. | ||
signingConfig signingConfigs.debug | ||
} | ||
} | ||
} | ||
|
||
flutter { | ||
source '../..' | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="de.tub.snet.flutternativetrapeze"> | ||
<!-- Flutter needs it to communicate with the running application | ||
to allow setting breakpoints, to provide hot reload, etc. | ||
--> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
</manifest> |
8 changes: 8 additions & 0 deletions
8
android/app/src/debug/gen/de/tub/snet/flutternativetrapeze/BuildConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/*___Generated_by_IDEA___*/ | ||
|
||
package de.tub.snet.flutternativetrapeze; | ||
|
||
/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */ | ||
public final class BuildConfig { | ||
public final static boolean DEBUG = Boolean.parseBoolean(null); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="de.tub.snet.flutternativetrapeze"> | ||
<!-- SEE THE MANUAL OF THE 'KASPERKSY MOBILE SECURITY SDK' FOR DETAILS ON REQUIRED PERMISSIONS: e.g. | ||
"Kaspersky%20SDK/android/5.13.0.136/KL_Mobile_SDK_Android_5.13.0.136_Release_Trapeze_(EuroComission)/manuals/Kaspersky%20Mobile%20Security%20SDK/manual/en/Doc_data/136808.htm" --> | ||
<!-- 1. READ-Access Permissions: Permission to scan (see EasyScanner component of the Kaspersky Mobile Security SDK) | ||
files on external storage such as SD card or device volumes beyond the app's storage scope --> | ||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> | ||
<!-- For Android SDK API levels 30+ (Android 11+): | ||
(see: * https://support.google.com/googleplay/android-developer/answer/10467955#zippy=%2Cpermitted-uses-of-the-all-files-access-permission) | ||
* https://developer.android.com/training/package-visibility --> | ||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/> | ||
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/> | ||
<!-- Prevent long device scans from being suspended by Android. --> | ||
<uses-permission android:name="android.permission.WAKE_LOCK"/> | ||
<!-- Access the Kaspersky Security Network (KSN) for cloud-based security checks via the internet. --> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
|
||
|
||
<application | ||
android:label="trapeze-mobile" | ||
android:icon="@mipmap/ic_launcher"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:launchMode="singleTop" | ||
android:theme="@style/LaunchTheme" | ||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" | ||
android:hardwareAccelerated="true" | ||
android:windowSoftInputMode="adjustResize"> | ||
<!-- Specifies an Android theme to apply to this Activity as soon as | ||
the Android process has started. This theme is visible to the user | ||
while the Flutter UI initializes. After that, this theme continues | ||
to determine the Window background behind the Flutter UI. --> | ||
<meta-data | ||
android:name="io.flutter.embedding.android.NormalTheme" | ||
android:resource="@style/NormalTheme" | ||
/> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
<!-- Don't delete the meta-data below. | ||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> | ||
<meta-data | ||
android:name="flutterEmbedding" | ||
android:value="2" /> | ||
</application> | ||
</manifest> |
6 changes: 6 additions & 0 deletions
6
android/app/src/main/kotlin/de/tub/snet/flutternativetrapeze/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package de.tub.snet.flutternativetrapeze | ||
|
||
import io.flutter.embedding.android.FlutterActivity | ||
|
||
class MainActivity: FlutterActivity() { | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item> | ||
<bitmap android:gravity="fill" android:src="@drawable/background"/> | ||
</item> | ||
<item> | ||
<bitmap android:gravity="center" android:src="@drawable/splash"/> | ||
</item> | ||
</layer-list> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item> | ||
<bitmap android:gravity="fill" android:src="@drawable/background"/> | ||
</item> | ||
<item> | ||
<bitmap android:gravity="center" android:src="@drawable/splash"/> | ||
</item> | ||
</layer-list> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.