Skip to content

Commit 129772c

Browse files
authored
Merge pull request #13 from omnt/rel/0.3
Create Release 0.3
2 parents 98dccef + 1256205 commit 129772c

File tree

105 files changed

+2494
-1172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+2494
-1172
lines changed

.github/workflows/android.yml

+74-16
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,83 @@ name: Android CI
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: [ 'main', 'rel/**' ]
6+
tags:
7+
- '*'
68
pull_request:
7-
branches: [ "main" ]
9+
branches: [ 'main' ]
10+
811

912
jobs:
1013
build:
11-
1214
runs-on: ubuntu-latest
13-
15+
environment: ngni-omnt
1416
steps:
15-
- uses: actions/checkout@v3
16-
- name: set up JDK 11
17-
uses: actions/setup-java@v3
18-
with:
19-
java-version: '11'
20-
distribution: 'temurin'
21-
cache: gradle
22-
23-
- name: Grant execute permission for gradlew
24-
run: chmod +x gradlew
25-
- name: Build with Gradle
26-
run: ./gradlew build
17+
- name: Checkout Branch ${{ github.ref }}
18+
uses: actions/checkout@v4
19+
- name: Get Latest iPerf
20+
run: |
21+
wget -O jniLibs.zip https://github.com/omnt/iperf/releases/latest/download/jniLibs
22+
unzip jniLibs.zip -d app/src/main
23+
rm jniLibs.zip
24+
25+
- name: Decode Keystore and Create key.properties
26+
env:
27+
ENCODED_STRING: ${{ secrets.KEYSTORE }}
28+
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.STOREPASSWORD }}
29+
RELEASE_KEYSTORE_ALIAS: ${{ secrets.KEYALIAS }}
30+
RELEASE_KEY_PASSWORD: ${{ secrets.KEYPASSWORD }}
31+
run: |
32+
echo -n "$ENCODED_STRING" | base64 -d > app/OpenMobileNetworkToolkit-key.jks
33+
mkdir android
34+
touch android/key.properties
35+
echo "storePassword=$RELEASE_KEYSTORE_PASSWORD" > android/key.properties
36+
echo "keyPassword=$RELEASE_KEY_PASSWORD" >> android/key.properties
37+
echo "keyAlias=$RELEASE_KEYSTORE_ALIAS" >> android/key.properties
38+
echo "storeFile=OpenMobileNetworkToolkit-key.jks" >> android/key.properties
39+
40+
- name: Setup Java
41+
uses: actions/setup-java@v4
42+
with:
43+
distribution: 'temurin'
44+
java-version: 17
45+
cache: gradle
46+
47+
- name: Build Release APK
48+
env:
49+
ENCODED_STRING: ${{ secrets.KEYSTORE }}
50+
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PW }}
51+
RELEASE_KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}
52+
RELEASE_KEY_PASSWORD: ${{ secrets.KEY_PW }}
53+
run: ./gradlew assembleRelease --stacktrace
54+
55+
- name: Build Release APK
56+
env:
57+
ENCODED_STRING: ${{ secrets.KEYSTORE }}
58+
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PW }}
59+
RELEASE_KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}
60+
RELEASE_KEY_PASSWORD: ${{ secrets.KEY_PW }}
61+
run: ./gradlew assembleDebug --stacktrace
62+
63+
- name: Generate SPDX
64+
env:
65+
ENCODED_STRING: ${{ secrets.KEYSTORE }}
66+
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PW }}
67+
RELEASE_KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}
68+
RELEASE_KEY_PASSWORD: ${{ secrets.KEY_PW }}
69+
run: ./gradlew app:spdxSbomForRelease
70+
71+
- name: Get release file apk path
72+
id: releaseApk
73+
run: |
74+
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
75+
mkdir upload
76+
mv app/build/outputs/apk/debug/app-debug.apk ./upload/omnt-debug.apk
77+
mv app/build/outputs/apk/release/app-release.apk ./upload/omnt-release.apk
78+
mv app/build/spdx/release.spdx.json ./upload/release.spdx.json
79+
80+
- name: Upload All Artifacts
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: omnt-${{ steps.releaseApk.outputs.sha_short }}
84+
path: ./upload

CHANGELOG.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# OpenMobileNetworkToolkit Changelog
2+
## Release [0.3]
3+
4+
### Added
5+
- Github Action Workflow for APK Debug/Relase Build and SPDX File [PR 13](https://github.com/omnt/OpenMobileNetworkToolkit/pull/13)
6+
- Documentation [PR 13](https://github.com/omnt/OpenMobileNetworkToolkit/pull/13)
7+
- CHANGELOG.md [PR 13](https://github.com/omnt/OpenMobileNetworkToolkit/pull/13)
8+
9+
### Changed
10+
- Fix possible [InfluxDB Bug](https://github.com/influxdata/influxdb-client-java/issues/731)
11+
- iPerf3 GUI [PR 14](https://github.com/omnt/OpenMobileNetworkToolkit/pull/14)
12+
- Fix Ping Bug, where button is enabled but now Ping is running after app restart [PR 14](https://github.com/omnt/OpenMobileNetworkToolkit/pull/14)
13+
- Update Ping Fragment, now uses the Metric class to display [PR 14](https://github.com/omnt/OpenMobileNetworkToolkit/pull/14)
14+
-
15+
### Breaking Changes
16+
- see [PR 14](https://github.com/omnt/OpenMobileNetworkToolkit/pull/14)
17+
18+
## Release [0.2]
19+
### Changed
20+
- Improved 4G support. Now all cell parameters of 4G networks should be logged and displayed correctly
21+
- Improved 2G same as 4G
22+
- Logging status indicator in the actionbar
23+
- Filter for Carrier Settings Readout
24+
- Carrier Settings Apply button moved to Settings
25+
- InfluxDB Cloud is now also supported to be used as logging target. This means we can log to Influx 1.x 2.x and 3.x
26+
- [PR 7](https://github.com/omnt/OpenMobileNetworkToolkit/pull/7)
27+
- [Release 0.2](https://github.com/omnt/OpenMobileNetworkToolkit/releases/tag/0.2

README.md

+7-68
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ Also, OMNT provides access to different "secret" settings in Android phones.
1212
The current state of the app can be described as "research software", it fits our needs but does not aim to be complete or bug free.
1313
Use the app at your own risk. If you find it useful for your research, please cite the app in publications.
1414

15+
16+
* [Quick Start HowTo](docs/quick-start.md)
17+
* [User Manual](docs/OpenMobileNetworkToolkit.md)
18+
* [Signing HowTo](docs/signing.md)
19+
1520
## Why use this app
1621

1722
* As apps like OMNT can can access a lot of private information. It is important for users to be able to make sure that those data is not
@@ -46,75 +51,9 @@ The following permissions are requested:
4651

4752
If the app can't gain Carrier Privileges, some values can't be accessed and some features are disabled. See below.
4853

49-
### Carrier Permissions
50-
Carrier specific settings can only be accessed by apps running with so-called carrier privileges. This was added in android 6 and is mostly relevant
51-
for 4G and 5G networks. (https://source.android.com/devices/tech/config/carrier)
52-
53-
Carrier or researcher who are able (admin key to the SIM card is required) to program their own sim cards can store a fingerprint of an signing certificate in an access rule applet (ARA-M) on the SIM card.
54-
An app signed with this certificate will get carrier privileges granted by android. (https://source.android.com/devices/tech/config/uicc)
55-
56-
E.g. the [ARAM-Applet by Bertrand Martel](https://github.com/bertrandmartel/aram-applet) for JavaCard based SIM cards can be used.
57-
Some SIM cards like the cards from [Sysmocom](http://shop.sysmocom.de/products/sysmoISIM-SJA2) already come with the applet pre installed.
58-
To install the applet to a SIM card [GlobalPlatformPro by Martin Paljak](https://github.com/martinpaljak/GlobalPlatformPro) can be used.
59-
Pre-compiled versions of ARA-M and GP can be found in the [CoIMS_Wiki repository by Supreeth Herle](https://github.com/herlesupreeth/CoIMS_Wiki).
60-
61-
To provision the fingerprint to the applet, either (pySim)[https://github.com/osmocom/pysim] or GP can be used.
62-
63-
With pySim it can be done by entering the following commands into pySim-shell:
64-
65-
start pySim shell with an PSCD attached reader
66-
```
67-
python3 pySim-shell.py -p0 -a <admin key>
68-
or if you have a csv file with ICCID and admin pin:
69-
python3 pySim-shell.py -p0 --csv card_data.csv
70-
```
71-
72-
Provision the fingerprint. Note that instead of a fingerprint also a valid android App ID can be used.
73-
If you have a SIM Card with the ARA-M applet from sysmocom you can skip the 'verify_adm' part as the applet is not write protected.
74-
```shell
75-
verify_adm
76-
select ADF.ARA-M
77-
aram_delete_all
78-
aram_store_ref_ar_do --aid ffffffffffff --device-app-id E849B63A7B96E571F788FC5845C4AA3C520D18E8 --android-permissions 0000000000000001
79-
```
80-
(this assumes the credentials to access the card are stored in the pySim format.)
81-
82-
### Signing the app
83-
This can be done with android studio.
84-
85-
To generated a signed apk:
86-
```
87-
Go to 'build' -> 'Generate signed Bundle/APK'
88-
You will be ask to generate a new key or import an existing one.
89-
Click through the dialogs until you end up with a signed APK
90-
```
91-
92-
To sign the debug apks used for development
93-
```
94-
Go to 'file' -> Project Structure -> Modules
95-
Select the 'app', select the 'Signing config' tab.
96-
create a new signing config referencing you key file
97-
```
98-
99-
You can also manually re-sign the downloaded .apk file using apksigner https://developer.android.com/tools/apksigner .
100-
```shell
101-
apksigner sign --ks my.keystore OpenMobileNetworkToolkit.apk
102-
```
103-
where my.keystore is your java keystore.
10454

10555
## SPDX-SBOM
106-
The SPDX formatted Software Bill Of Material is a machine readable list of all software components used in the app.
107-
To generate a new file run
56+
The SPDX formatted ```Software Bill Of Material``` is a machine readable list of all software components used in the app. To generate a new file run
10857
```shell
10958
./gradlew app:spdxSbomForRelease
110-
```
111-
112-
## iPerf3
113-
iPerf3 has been compiled with a [jni](https://developer.android.com/training/articles/perf-jni) interface to enable OMNT to call it using the specified parameters.
114-
To see how to integrate iPerf3 into your app, look at [iPerf3 Repo](https://github.com/omnt/iperf)
115-
116-
![iPerf3](screenshots/iperf3.png)
117-
118-
## Network Slicing
119-
120-
This function is still under development and requires support from the core network.
59+
```

app/build.gradle

+29-14
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
plugins {
99
id 'com.android.application'
1010
id 'androidx.navigation.safeargs'
11-
id("org.spdx.sbom") version "0.7.0"
11+
id("org.spdx.sbom") version "0.8.0"
1212
}
1313

1414
def keystoreProperties = new Properties()
@@ -24,6 +24,14 @@ if (keystorePropertiesFile.exists()) {
2424
keystoreProperties['storePassword'] = "omnt2024"
2525
}
2626

27+
def getGitHash = { ->
28+
def stdout = new ByteArrayOutputStream()
29+
exec {
30+
commandLine "git", "rev-parse", "--short", "HEAD"
31+
standardOutput = stdout
32+
}
33+
return stdout.toString().trim()
34+
}
2735

2836
android {
2937
signingConfigs {
@@ -33,16 +41,23 @@ android {
3341
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
3442
storePassword keystoreProperties['storePassword']
3543
}
44+
release{
45+
keyAlias keystoreProperties['keyAlias']
46+
keyPassword keystoreProperties['keyPassword']
47+
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
48+
storePassword keystoreProperties['storePassword']
49+
}
3650
}
51+
3752
compileSdk 34
3853

3954
defaultConfig {
4055
applicationId "de.fraunhofer.fokus.OpenMobileNetworkToolkit"
41-
//targetSdkPreview "VanillaIceCream"
4256
minSdk 31
4357
targetSdk 34
44-
versionCode 2
45-
versionName "0.2"
58+
versionCode 3
59+
versionName "0.3"
60+
resValue("string", "git_hash", getGitHash())
4661

4762
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4863
signingConfig signingConfigs.debug
@@ -72,13 +87,13 @@ android {
7287
}
7388
buildFeatures {
7489
viewBinding true
90+
buildConfig = true
7591
}
7692
namespace 'de.fraunhofer.fokus.OpenMobileNetworkToolkit'
7793
ndkVersion '25.2.9519653'
7894
lint {
7995
abortOnError false
8096
}
81-
buildToolsVersion '34.0.0'
8297
}
8398

8499
spdxSbom {
@@ -87,7 +102,7 @@ spdxSbom {
87102
configurations = ['releaseRuntimeClasspath']
88103
scm {
89104
uri.set("https://github.com/omnt/OpenMobileNetworkToolkit")
90-
revision.set("0.2")
105+
revision.set("0.3")
91106
}
92107
document {
93108
name.set("OpenMobileNetworkToolkit")
@@ -106,13 +121,13 @@ dependencies {
106121

107122
implementation "androidx.room:room-runtime:$room_version"
108123
annotationProcessor "androidx.room:room-compiler:$room_version"
109-
implementation 'androidx.appcompat:appcompat:1.6.1'
124+
implementation 'androidx.appcompat:appcompat:1.7.0'
110125
implementation 'com.google.guava:guava:33.1.0-jre'
111-
implementation 'androidx.concurrent:concurrent-futures:1.1.0'
126+
implementation 'androidx.concurrent:concurrent-futures:1.2.0'
112127
implementation 'androidx.activity:activity:1.9.0'
113-
implementation 'androidx.fragment:fragment:1.7.0'
114-
implementation 'androidx.appcompat:appcompat:1.6.1'
115-
implementation 'com.google.android.material:material:1.11.0'
128+
implementation 'androidx.fragment:fragment:1.8.0'
129+
implementation 'androidx.appcompat:appcompat:1.7.0'
130+
implementation 'com.google.android.material:material:1.12.0'
116131
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
117132
implementation 'androidx.navigation:navigation-fragment:2.7.7'
118133
implementation 'androidx.navigation:navigation-ui:2.7.7'
@@ -123,10 +138,10 @@ dependencies {
123138
implementation 'androidx.preference:preference-ktx:1.2.1'
124139
implementation 'androidx.recyclerview:recyclerview:1.3.2'
125140
implementation 'androidx.recyclerview:recyclerview-selection:1.1.0'
126-
implementation 'com.influxdb:influxdb-client-java:7.0.0'
127-
implementation 'com.google.android.gms:play-services-location:21.2.0'
141+
implementation 'com.influxdb:influxdb-client-java:7.1.0'
142+
implementation 'com.google.android.gms:play-services-location:21.3.0'
128143
implementation 'com.github.anastr:speedviewlib:1.6.1'
129-
implementation "androidx.viewpager2:viewpager2:1.0.0"
144+
implementation "androidx.viewpager2:viewpager2:1.1.0"
130145
}
131146

132147
configurations.implementation {

app/proguard-rules.pro

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
# hide the original source file name.
2121
#-renamesourcefileattribute SourceFile
2222

23-
-dontskipnonpubliclibraryclasses
2423
-dontobfuscate
25-
-forceprocessing
2624
-optimizationpasses 5
2725

2826
-keep class * extends android.app.Activity
27+
-keep class com.influxdb.**
28+
2929
-assumenosideeffects class android.util.Log {
3030
public static *** d(...);
3131
public static *** v(...);

app/src/main/AndroidManifest.xml

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
<service
6363
android:name="de.fraunhofer.fokus.OpenMobileNetworkToolkit.LoggingService"
6464
android:foregroundServiceType="location" />
65+
<service
66+
android:name="de.fraunhofer.fokus.OpenMobileNetworkToolkit.Ping.PingService" />
6567

6668

6769
<service android:name="androidx.work.impl.foreground.SystemForegroundService" android:foregroundServiceType="specialUse">

app/src/main/java/de/fraunhofer/fokus/OpenMobileNetworkToolkit/AboutFragment.java

+8
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,22 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
3333
super.onViewCreated(view, savedInstanceState);
3434
TextView about_text = requireView().findViewById(R.id.about_text_box);
3535
about_text.setAutoLinkMask(Linkify.WEB_URLS);
36+
about_text.setTextIsSelectable(true);
3637
about_text.append(getString(R.string.appinfo));
3738
about_text.append("\n\n");
39+
about_text.append("https://omnt.app\n");
3840
about_text.append("https://github.com/omnt/OpenMobileNetworkToolkit");
3941
about_text.append("\n\nThird party software used in this app: \n \n");
4042
about_text.append(
4143
"The InfluxDB 2.x JVM Based Client is released under the MIT License. \nhttps://github.com/influxdata/influxdb-client-java");
4244
about_text.append("\n\n");
4345
about_text.append(
4446
"iPerf3 is licensed under a BSD style license. \nhttps://github.com/esnet/iperf");
47+
48+
about_text.append("\n\n");
49+
about_text.append("Version Code: " + BuildConfig.VERSION_CODE + "\nVersion Name: " + BuildConfig.VERSION_NAME + "\n");
50+
about_text.append("Build Type: " + BuildConfig.BUILD_TYPE + "\n");
51+
about_text.append("GitHash: " + getString(R.string.git_hash) + "\n");
52+
about_text.append("SigningHash sha256: " + GlobalVars.getInstance().getSigning_hash() + "\n");
4553
}
4654
}

app/src/main/java/de/fraunhofer/fokus/OpenMobileNetworkToolkit/DataProvider/DataProvider.java

-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ public class DataProvider extends PhoneStateListener implements LocationListener
9595
private List<NetworkInterfaceInformation> nii = new ArrayList<>();
9696
private ArrayList<SignalStrengthInformation> ssi = new ArrayList<>();
9797
private SliceInformation si = new SliceInformation();
98-
private PingInformation pi = new PingInformation();
9998
// Time stamp, should be updated on each update of internal data caches
10099
private long ts = System.currentTimeMillis();
101100
private LocationCallback locationCallback;

0 commit comments

Comments
 (0)