Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Release 0.3 #13

Merged
merged 87 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
e175ba6
update workflow
hajoha Jun 3, 2024
4ee2140
update workflow
hajoha Jun 3, 2024
122bd3a
update workflow
hajoha Jun 3, 2024
23bb4d5
update workflow
hajoha Jun 3, 2024
44e531c
update workflow
hajoha Jun 3, 2024
f6dcb4b
update workflow
hajoha Jun 3, 2024
bdd3a81
update workflow
hajoha Jun 3, 2024
1369fdf
update workflow
hajoha Jun 3, 2024
7ef75fa
update workflow
hajoha Jun 3, 2024
d4c0652
update workflow
hajoha Jun 3, 2024
0ac625f
update workflow
hajoha Jun 3, 2024
a1a435a
update workflow
hajoha Jun 3, 2024
34f81b1
update workflow
hajoha Jun 3, 2024
0a88b02
update workflow
hajoha Jun 3, 2024
e2f5e4a
update workflow
hajoha Jun 3, 2024
1802f32
update workflow
hajoha Jun 3, 2024
ac36247
update workflow
hajoha Jun 3, 2024
c97e870
update workflow
hajoha Jun 3, 2024
64e67ce
update workflow
hajoha Jun 3, 2024
07f33a9
update workflow
hajoha Jun 3, 2024
ac661b5
update workflow
hajoha Jun 3, 2024
9428d8d
update workflow
hajoha Jun 4, 2024
abb0639
update workflow
hajoha Jun 4, 2024
53c2ffd
update workflow
hajoha Jun 4, 2024
20ca84d
update workflow
hajoha Jun 4, 2024
03daf89
update workflow
hajoha Jun 4, 2024
08546cc
update workflow
hajoha Jun 4, 2024
49cdbfe
update workflow
hajoha Jun 4, 2024
9eb4ae3
update workflow
hajoha Jun 4, 2024
b8e1dd6
update workflow
hajoha Jun 4, 2024
12e37b4
update workflow
hajoha Jun 4, 2024
3474e33
update workflow
hajoha Jun 4, 2024
57f592c
update workflow
hajoha Jun 4, 2024
9951b28
update workflow
hajoha Jun 4, 2024
de18f9e
update workflow
hajoha Jun 4, 2024
b02b3cb
update workflow
hajoha Jun 4, 2024
c61da51
bump depencies, remove deprecated sdkVersion flag
PeterHasse Jun 5, 2024
9fef4f0
Merge branch 'main' of github.com:omnt/OpenMobileNetworkToolkit into …
PeterHasse Jun 5, 2024
1a34548
update workflow
hajoha Jun 5, 2024
101f8c5
update workflow
hajoha Jun 5, 2024
83eb14b
update workflow
hajoha Jun 5, 2024
dff82a4
update workflow
hajoha Jun 5, 2024
185ebcd
added signing config changes for release builds
PeterHasse Jun 5, 2024
f0d7577
added proguard rule to exclude influxdb client for now to make releas…
PeterHasse Jun 5, 2024
4230ecc
updated documentation
PeterHasse Jun 5, 2024
86922ad
simple catch for rare racecondition regarding the logging icon
PeterHasse Jun 5, 2024
ebd2436
Merge branch 'github-main' into rel/0.3
PeterHasse Jun 5, 2024
856e036
added more documentation
PeterHasse Jun 5, 2024
b0e7d21
documentation update
PeterHasse Jun 5, 2024
d888dec
remove old iPerf3 code, write own parser
hajoha Jun 6, 2024
a66cf02
fix parsing
hajoha Jun 6, 2024
0e47e7a
update JSON parsing
hajoha Jun 7, 2024
07ef0cf
documentation update
PeterHasse Jun 7, 2024
770c165
documentation update
PeterHasse Jun 7, 2024
658ace0
add JITTER MS and Packet Loss live view
hajoha Jun 7, 2024
2b34573
update JSON parsing
hajoha Jun 10, 2024
d6f1354
remove run config
hajoha Jun 10, 2024
3d992fe
Merge pull request #14 from omnt/refactor/iperf3
hajoha Jun 10, 2024
6514f12
display actual value
hajoha Jun 10, 2024
70cfc9c
update iPerf3 Docs
hajoha Jun 10, 2024
a8b3b03
fix typo
hajoha Jun 10, 2024
c873088
update doc
hajoha Jun 10, 2024
6e9d78c
update doc
hajoha Jun 10, 2024
5a6f6a7
update doc
hajoha Jun 10, 2024
a7b6d7a
update doc
hajoha Jun 10, 2024
5ef0d88
update doc
hajoha Jun 10, 2024
f82ea38
update doc
hajoha Jun 10, 2024
7c4f65a
update doc
hajoha Jun 10, 2024
bf0add3
update doc
hajoha Jun 10, 2024
7a06cf4
update doc
hajoha Jun 10, 2024
f53de0a
update doc
hajoha Jun 10, 2024
89b5477
update doc
hajoha Jun 10, 2024
230ca3b
add CHANGELOG.md
hajoha Jun 12, 2024
72da643
fix typo
hajoha Jun 12, 2024
51c40d3
update changelog
hajoha Jun 12, 2024
f7d9b3c
fix parsing bug
hajoha Jun 12, 2024
d54b504
update ping
hajoha Jun 12, 2024
1c5cf7b
fix ping bug, after reboot
hajoha Jun 13, 2024
f1653fa
bump grade version to 8.4.2
PeterHasse Jun 13, 2024
f7e9235
bump grade distibution to 8.8
PeterHasse Jun 13, 2024
f059628
bump some dependcies. Add app version, build flavor and git hash to t…
PeterHasse Jun 13, 2024
9166975
fix Ping
hajoha Jun 13, 2024
1776902
fix bug where reference to old propertyChangeListener is used
hajoha Jun 13, 2024
cf737b3
extend parsing of ping
hajoha Jun 13, 2024
3dd563f
extend parsing of ping
hajoha Jun 14, 2024
be4eb3d
extend parsing of ping
hajoha Jun 14, 2024
1256205
add signature hash to about page
PeterHasse Jun 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 74 additions & 16 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,83 @@ name: Android CI

on:
push:
branches: [ "main" ]
branches: [ 'main', 'rel/**' ]
tags:
- '*'
pull_request:
branches: [ "main" ]
branches: [ 'main' ]


jobs:
build:

runs-on: ubuntu-latest

environment: ngni-omnt
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Checkout Branch ${{ github.ref }}
uses: actions/checkout@v4
- name: Get Latest iPerf
run: |
wget -O jniLibs.zip https://github.com/omnt/iperf/releases/latest/download/jniLibs
unzip jniLibs.zip -d app/src/main
rm jniLibs.zip

- name: Decode Keystore and Create key.properties
env:
ENCODED_STRING: ${{ secrets.KEYSTORE }}
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.STOREPASSWORD }}
RELEASE_KEYSTORE_ALIAS: ${{ secrets.KEYALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.KEYPASSWORD }}
run: |
echo -n "$ENCODED_STRING" | base64 -d > app/OpenMobileNetworkToolkit-key.jks
mkdir android
touch android/key.properties
echo "storePassword=$RELEASE_KEYSTORE_PASSWORD" > android/key.properties
echo "keyPassword=$RELEASE_KEY_PASSWORD" >> android/key.properties
echo "keyAlias=$RELEASE_KEYSTORE_ALIAS" >> android/key.properties
echo "storeFile=OpenMobileNetworkToolkit-key.jks" >> android/key.properties

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: gradle

- name: Build Release APK
env:
ENCODED_STRING: ${{ secrets.KEYSTORE }}
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PW }}
RELEASE_KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.KEY_PW }}
run: ./gradlew assembleRelease --stacktrace

- name: Build Release APK
env:
ENCODED_STRING: ${{ secrets.KEYSTORE }}
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PW }}
RELEASE_KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.KEY_PW }}
run: ./gradlew assembleDebug --stacktrace

- name: Generate SPDX
env:
ENCODED_STRING: ${{ secrets.KEYSTORE }}
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PW }}
RELEASE_KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.KEY_PW }}
run: ./gradlew app:spdxSbomForRelease

- name: Get release file apk path
id: releaseApk
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
mkdir upload
mv app/build/outputs/apk/debug/app-debug.apk ./upload/omnt-debug.apk
mv app/build/outputs/apk/release/app-release.apk ./upload/omnt-release.apk
mv app/build/spdx/release.spdx.json ./upload/release.spdx.json

- name: Upload All Artifacts
uses: actions/upload-artifact@v4
with:
name: omnt-${{ steps.releaseApk.outputs.sha_short }}
path: ./upload
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# OpenMobileNetworkToolkit Changelog
## Release [0.3]

### Added
- Github Action Workflow for APK Debug/Relase Build and SPDX File [PR 13](https://github.com/omnt/OpenMobileNetworkToolkit/pull/13)
- Documentation [PR 13](https://github.com/omnt/OpenMobileNetworkToolkit/pull/13)
- CHANGELOG.md [PR 13](https://github.com/omnt/OpenMobileNetworkToolkit/pull/13)

### Changed
- Fix possible [InfluxDB Bug](https://github.com/influxdata/influxdb-client-java/issues/731)
- iPerf3 GUI [PR 14](https://github.com/omnt/OpenMobileNetworkToolkit/pull/14)
- Fix Ping Bug, where button is enabled but now Ping is running after app restart [PR 14](https://github.com/omnt/OpenMobileNetworkToolkit/pull/14)
- Update Ping Fragment, now uses the Metric class to display [PR 14](https://github.com/omnt/OpenMobileNetworkToolkit/pull/14)
-
### Breaking Changes
- see [PR 14](https://github.com/omnt/OpenMobileNetworkToolkit/pull/14)

## Release [0.2]
### Changed
- Improved 4G support. Now all cell parameters of 4G networks should be logged and displayed correctly
- Improved 2G same as 4G
- Logging status indicator in the actionbar
- Filter for Carrier Settings Readout
- Carrier Settings Apply button moved to Settings
- 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
- [PR 7](https://github.com/omnt/OpenMobileNetworkToolkit/pull/7)
- [Release 0.2](https://github.com/omnt/OpenMobileNetworkToolkit/releases/tag/0.2
75 changes: 7 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ Also, OMNT provides access to different "secret" settings in Android phones.
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.
Use the app at your own risk. If you find it useful for your research, please cite the app in publications.


* [Quick Start HowTo](docs/quick-start.md)
* [User Manual](docs/OpenMobileNetworkToolkit.md)
* [Signing HowTo](docs/signing.md)

## Why use this app

* 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
Expand Down Expand Up @@ -46,75 +51,9 @@ The following permissions are requested:

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

### Carrier Permissions
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
for 4G and 5G networks. (https://source.android.com/devices/tech/config/carrier)

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.
An app signed with this certificate will get carrier privileges granted by android. (https://source.android.com/devices/tech/config/uicc)

E.g. the [ARAM-Applet by Bertrand Martel](https://github.com/bertrandmartel/aram-applet) for JavaCard based SIM cards can be used.
Some SIM cards like the cards from [Sysmocom](http://shop.sysmocom.de/products/sysmoISIM-SJA2) already come with the applet pre installed.
To install the applet to a SIM card [GlobalPlatformPro by Martin Paljak](https://github.com/martinpaljak/GlobalPlatformPro) can be used.
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).

To provision the fingerprint to the applet, either (pySim)[https://github.com/osmocom/pysim] or GP can be used.

With pySim it can be done by entering the following commands into pySim-shell:

start pySim shell with an PSCD attached reader
```
python3 pySim-shell.py -p0 -a <admin key>
or if you have a csv file with ICCID and admin pin:
python3 pySim-shell.py -p0 --csv card_data.csv
```

Provision the fingerprint. Note that instead of a fingerprint also a valid android App ID can be used.
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.
```shell
verify_adm
select ADF.ARA-M
aram_delete_all
aram_store_ref_ar_do --aid ffffffffffff --device-app-id E849B63A7B96E571F788FC5845C4AA3C520D18E8 --android-permissions 0000000000000001
```
(this assumes the credentials to access the card are stored in the pySim format.)

### Signing the app
This can be done with android studio.

To generated a signed apk:
```
Go to 'build' -> 'Generate signed Bundle/APK'
You will be ask to generate a new key or import an existing one.
Click through the dialogs until you end up with a signed APK
```

To sign the debug apks used for development
```
Go to 'file' -> Project Structure -> Modules
Select the 'app', select the 'Signing config' tab.
create a new signing config referencing you key file
```

You can also manually re-sign the downloaded .apk file using apksigner https://developer.android.com/tools/apksigner .
```shell
apksigner sign --ks my.keystore OpenMobileNetworkToolkit.apk
```
where my.keystore is your java keystore.

## SPDX-SBOM
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
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
```shell
./gradlew app:spdxSbomForRelease
```

## iPerf3
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.
To see how to integrate iPerf3 into your app, look at [iPerf3 Repo](https://github.com/omnt/iperf)

![iPerf3](screenshots/iperf3.png)

## Network Slicing

This function is still under development and requires support from the core network.
```
43 changes: 29 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
plugins {
id 'com.android.application'
id 'androidx.navigation.safeargs'
id("org.spdx.sbom") version "0.7.0"
id("org.spdx.sbom") version "0.8.0"
}

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

def getGitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine "git", "rev-parse", "--short", "HEAD"
standardOutput = stdout
}
return stdout.toString().trim()
}

android {
signingConfigs {
Expand All @@ -33,16 +41,23 @@ android {
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
release{
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}

compileSdk 34

defaultConfig {
applicationId "de.fraunhofer.fokus.OpenMobileNetworkToolkit"
//targetSdkPreview "VanillaIceCream"
minSdk 31
targetSdk 34
versionCode 2
versionName "0.2"
versionCode 3
versionName "0.3"
resValue("string", "git_hash", getGitHash())

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.debug
Expand Down Expand Up @@ -72,13 +87,13 @@ android {
}
buildFeatures {
viewBinding true
buildConfig = true
}
namespace 'de.fraunhofer.fokus.OpenMobileNetworkToolkit'
ndkVersion '25.2.9519653'
lint {
abortOnError false
}
buildToolsVersion '34.0.0'
}

spdxSbom {
Expand All @@ -87,7 +102,7 @@ spdxSbom {
configurations = ['releaseRuntimeClasspath']
scm {
uri.set("https://github.com/omnt/OpenMobileNetworkToolkit")
revision.set("0.2")
revision.set("0.3")
}
document {
name.set("OpenMobileNetworkToolkit")
Expand All @@ -106,13 +121,13 @@ dependencies {

implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.guava:guava:33.1.0-jre'
implementation 'androidx.concurrent:concurrent-futures:1.1.0'
implementation 'androidx.concurrent:concurrent-futures:1.2.0'
implementation 'androidx.activity:activity:1.9.0'
implementation 'androidx.fragment:fragment:1.7.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.fragment:fragment:1.8.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment:2.7.7'
implementation 'androidx.navigation:navigation-ui:2.7.7'
Expand All @@ -123,10 +138,10 @@ dependencies {
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.recyclerview:recyclerview-selection:1.1.0'
implementation 'com.influxdb:influxdb-client-java:7.0.0'
implementation 'com.google.android.gms:play-services-location:21.2.0'
implementation 'com.influxdb:influxdb-client-java:7.1.0'
implementation 'com.google.android.gms:play-services-location:21.3.0'
implementation 'com.github.anastr:speedviewlib:1.6.1'
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation "androidx.viewpager2:viewpager2:1.1.0"
}

configurations.implementation {
Expand Down
4 changes: 2 additions & 2 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
# hide the original source file name.
#-renamesourcefileattribute SourceFile

-dontskipnonpubliclibraryclasses
-dontobfuscate
-forceprocessing
-optimizationpasses 5

-keep class * extends android.app.Activity
-keep class com.influxdb.**

-assumenosideeffects class android.util.Log {
public static *** d(...);
public static *** v(...);
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
<service
android:name="de.fraunhofer.fokus.OpenMobileNetworkToolkit.LoggingService"
android:foregroundServiceType="location" />
<service
android:name="de.fraunhofer.fokus.OpenMobileNetworkToolkit.Ping.PingService" />


<service android:name="androidx.work.impl.foreground.SystemForegroundService" android:foregroundServiceType="specialUse">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,22 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
super.onViewCreated(view, savedInstanceState);
TextView about_text = requireView().findViewById(R.id.about_text_box);
about_text.setAutoLinkMask(Linkify.WEB_URLS);
about_text.setTextIsSelectable(true);
about_text.append(getString(R.string.appinfo));
about_text.append("\n\n");
about_text.append("https://omnt.app\n");
about_text.append("https://github.com/omnt/OpenMobileNetworkToolkit");
about_text.append("\n\nThird party software used in this app: \n \n");
about_text.append(
"The InfluxDB 2.x JVM Based Client is released under the MIT License. \nhttps://github.com/influxdata/influxdb-client-java");
about_text.append("\n\n");
about_text.append(
"iPerf3 is licensed under a BSD style license. \nhttps://github.com/esnet/iperf");

about_text.append("\n\n");
about_text.append("Version Code: " + BuildConfig.VERSION_CODE + "\nVersion Name: " + BuildConfig.VERSION_NAME + "\n");
about_text.append("Build Type: " + BuildConfig.BUILD_TYPE + "\n");
about_text.append("GitHash: " + getString(R.string.git_hash) + "\n");
about_text.append("SigningHash sha256: " + GlobalVars.getInstance().getSigning_hash() + "\n");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public class DataProvider extends PhoneStateListener implements LocationListener
private List<NetworkInterfaceInformation> nii = new ArrayList<>();
private ArrayList<SignalStrengthInformation> ssi = new ArrayList<>();
private SliceInformation si = new SliceInformation();
private PingInformation pi = new PingInformation();
// Time stamp, should be updated on each update of internal data caches
private long ts = System.currentTimeMillis();
private LocationCallback locationCallback;
Expand Down
Loading