├── app ├── .gitignore ├── version.properties ├── src │ ├── main │ │ ├── ic_launcher-web.png │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── values │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ ├── arrays.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── xml │ │ │ │ └── locales_config.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── drawable │ │ │ │ ├── ic_delete_white_24dp.xml │ │ │ │ ├── ic_delete_24dp.xml │ │ │ │ ├── ic_baseline_arrow_back_24.xml │ │ │ │ ├── ic_info_white_24dp.xml │ │ │ │ ├── ic_refresh_white_24dp.xml │ │ │ │ ├── ic_adb_white_24dp.xml │ │ │ │ ├── ic_android_24dp.xml │ │ │ │ └── ic_baseline_language_24.xml │ │ │ ├── menu │ │ │ │ ├── logcat_menu.xml │ │ │ │ └── main_menu.xml │ │ │ ├── layout │ │ │ │ ├── activity_logcat.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── application_rule_header.xml │ │ │ │ ├── activity_about.xml │ │ │ │ ├── application_rule_item.xml │ │ │ │ ├── activity_send_log.xml │ │ │ │ └── activity_register.xml │ │ │ ├── values-de │ │ │ │ └── strings.xml │ │ │ ├── values-it │ │ │ │ └── strings.xml │ │ │ ├── values-fr │ │ │ │ └── strings.xml │ │ │ └── values-night │ │ │ │ └── styles.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── github │ │ │ │ └── frimtec │ │ │ │ └── android │ │ │ │ └── securesmsproxy │ │ │ │ ├── domain │ │ │ │ ├── Application.java │ │ │ │ └── ApplicationRule.java │ │ │ │ ├── state │ │ │ │ ├── DbFactory.java │ │ │ │ └── DbHelper.java │ │ │ │ ├── ui │ │ │ │ ├── BaseActivity.java │ │ │ │ ├── AboutActivity.java │ │ │ │ ├── SendLogActivity.java │ │ │ │ ├── LogcatActivity.java │ │ │ │ ├── ApplicationRuleArrayAdapter.java │ │ │ │ └── RegisterActivity.java │ │ │ │ ├── service │ │ │ │ ├── SmsManagerResolver.java │ │ │ │ ├── SmsDecoder.java │ │ │ │ ├── PhoneNumberFormatter.java │ │ │ │ ├── IsAllowedPhoneNumberContentProvider.java │ │ │ │ ├── SmsListener.java │ │ │ │ └── SmsSender.java │ │ │ │ ├── utility │ │ │ │ ├── PackageInfoAccessor.java │ │ │ │ ├── AlertDialogHelper.java │ │ │ │ └── Permission.java │ │ │ │ └── SecureSmsProxyApplication.java │ │ └── AndroidManifest.xml │ └── test │ │ └── java │ │ └── com │ │ └── github │ │ └── frimtec │ │ └── android │ │ └── securesmsproxy │ │ ├── state │ │ └── DbHelperTest.java │ │ ├── domain │ │ ├── ApplicationTest.java │ │ └── ApplicationRuleTest.java │ │ ├── service │ │ ├── PhoneNumberFormatterTest.java │ │ ├── IsAllowedPhoneNumberContentProviderTest.java │ │ └── SmsDecoderTest.java │ │ └── utility │ │ └── PackageInfoAccessorTest.java ├── proguard-rules.pro └── build.gradle ├── securesmsproxyapi ├── consumer-rules.pro ├── .gitignore ├── src │ ├── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── github │ │ │ └── frimtec │ │ │ └── android │ │ │ └── securesmsproxyapi │ │ │ ├── utility │ │ │ ├── AesOperations.java │ │ │ ├── Random.java │ │ │ ├── Aes.java │ │ │ ├── Aes2.java │ │ │ └── PhoneNumberType.java │ │ │ ├── IsAllowedPhoneNumberContract.java │ │ │ └── Sms.java │ └── test │ │ └── java │ │ └── com │ │ └── github │ │ └── frimtec │ │ └── android │ │ └── securesmsproxyapi │ │ ├── utility │ │ ├── AesTest.java │ │ ├── Aes2Test.java │ │ └── RandomTest.java │ │ ├── SecureSmsProxyFacadeTest.java │ │ └── SmsTest.java ├── proguard-rules.pro └── build.gradle ├── fastlane └── metadata │ └── android │ ├── en-US │ ├── title.txt │ ├── changelogs │ │ ├── 728754.txt │ │ ├── 2378536.txt │ │ ├── 907475.txt │ │ ├── 2521354.txt │ │ ├── 1195360.txt │ │ ├── 906939.txt │ │ ├── 941956.txt │ │ ├── 816215.txt │ │ ├── 722606.txt │ │ ├── 1567699.txt │ │ ├── 1419365.txt │ │ ├── 2023327.txt │ │ ├── 2317073.txt │ │ ├── 830624.txt │ │ ├── 1097353.txt │ │ ├── 1873545.txt │ │ ├── 774508.txt │ │ ├── 1566923.txt │ │ ├── 905920.txt │ │ ├── 1983861.txt │ │ ├── 2519531.txt │ │ ├── 940497.txt │ │ ├── 1259952.txt │ │ ├── 1196330.txt │ │ ├── 1624213.txt │ │ ├── 1997119.txt │ │ ├── 2434922.txt │ │ ├── 1247099.txt │ │ ├── 1338879.txt │ │ ├── 1549366.txt │ │ ├── 1720561.txt │ │ ├── 1583663.txt │ │ ├── 2021393.txt │ │ ├── 793087.txt │ │ ├── 1194093.txt │ │ ├── 1268617.txt │ │ ├── 1268691.txt │ │ ├── 1481802.txt │ │ ├── 2601811.txt │ │ ├── 1782659.txt │ │ ├── 2217464.txt │ │ ├── 760064.txt │ │ ├── 2158216.txt │ │ ├── 2360312.txt │ │ ├── 2432057.txt │ │ ├── 2099754.txt │ │ ├── 2501095.txt │ │ ├── 1965752.txt │ │ └── 2302205.txt │ ├── short_description.txt │ ├── images │ │ ├── icon.png │ │ └── phoneScreenshots │ │ │ ├── S2MSP-01.png │ │ │ └── S2MSP-02.png │ └── full_description.txt │ ├── it │ ├── short_description.txt │ └── full_description.txt │ ├── de │ ├── short_description.txt │ └── full_description.txt │ └── fr │ ├── short_description.txt │ └── full_description.txt ├── settings.gradle ├── images ├── lokalise_logo.png └── restricted-settings.png ├── gradle ├── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties └── libs.versions.toml ├── .idea ├── dictionaries │ └── frim.xml ├── compiler.xml ├── codeStyles │ ├── codeStyleConfig.xml │ └── Project.xml ├── vcs.xml ├── gradle.xml ├── jarRepositories.xml ├── inspectionProfiles │ └── Project_Default.xml └── misc.xml ├── .github ├── pr-labeler.yml ├── workflows │ ├── pr-labeler.yml │ ├── release-drafter.yaml │ └── buid.yml ├── dependabot.yml └── release-drafter.yml ├── .gitignore ├── gradle.properties └── gradlew.bat /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /securesmsproxyapi/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /securesmsproxyapi/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/title.txt: -------------------------------------------------------------------------------- 1 | S2MSP -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':securesmsproxyapi' 2 | -------------------------------------------------------------------------------- /securesmsproxyapi/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/version.properties: -------------------------------------------------------------------------------- 1 | VERSION_NAME=$version 2 | VERSION_CODE=$code 3 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/728754.txt: -------------------------------------------------------------------------------- 1 | * Set metadata for F-Droid with fastlane -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2378536.txt: -------------------------------------------------------------------------------- 1 | - Migrate to target SDK 36 (Android 16) 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/907475.txt: -------------------------------------------------------------------------------- 1 | - Fix current selection in language list 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2521354.txt: -------------------------------------------------------------------------------- 1 | - Fix various inspection warnings @frimtec 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1195360.txt: -------------------------------------------------------------------------------- 1 | - Support local numbers provided by carrier or OS 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/906939.txt: -------------------------------------------------------------------------------- 1 | - Add in app language selection for android 13+ 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/941956.txt: -------------------------------------------------------------------------------- 1 | - Fix color of toolbar back icon for day theme 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/short_description.txt: -------------------------------------------------------------------------------- 1 | SMS communication for apps restricted on phone numbers -------------------------------------------------------------------------------- /fastlane/metadata/android/it/short_description.txt: -------------------------------------------------------------------------------- 1 | Comunicazione SMS da app limitata a numeri di telefono -------------------------------------------------------------------------------- /images/lokalise_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/images/lokalise_logo.png -------------------------------------------------------------------------------- /fastlane/metadata/android/de/short_description.txt: -------------------------------------------------------------------------------- 1 | SMS-Kommunikation von Apps eingeschränkt auf Telefonnummern -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/816215.txt: -------------------------------------------------------------------------------- 1 | - #146 Fix NPE on delete rule if no item is selected 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/722606.txt: -------------------------------------------------------------------------------- 1 | * Try fix missing icon in F-Droid store 2 | * Update dependencies -------------------------------------------------------------------------------- /images/restricted-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/images/restricted-settings.png -------------------------------------------------------------------------------- /app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /fastlane/metadata/android/fr/short_description.txt: -------------------------------------------------------------------------------- 1 | Communication SMS à partir d'applications limitées aux numéros de téléphone -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1567699.txt: -------------------------------------------------------------------------------- 1 | - Prevent logging errors while receiving SMS from alphanumeric short code 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1419365.txt: -------------------------------------------------------------------------------- 1 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.15 to 8.13.19 2 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2023327.txt: -------------------------------------------------------------------------------- 1 | - Migrate to material3 and edge-to-edge 2 | - Add note for new sideloading restrictions 3 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2317073.txt: -------------------------------------------------------------------------------- 1 | - Migrate from OSSRH to Central Portal 2 | - Bump compileSdk of securesmsproxyapi from 34 to 35 3 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/fastlane/metadata/android/en-US/images/icon.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/830624.txt: -------------------------------------------------------------------------------- 1 | - Bump android target API from 32 to 33 (Android 13-Tiramisu) 2 | - Bump android-junit5 from 1.8.2.0 to 1.8.2.1 3 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1097353.txt: -------------------------------------------------------------------------------- 1 | - Upgrade to android studio electric eel 2 | - Bump gradle from 7.3.0 to 7.3.1 3 | - Bump material from 1.6.1 to 1.7.0 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /.idea/dictionaries/frim.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | pikett 5 | 6 | 7 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1873545.txt: -------------------------------------------------------------------------------- 1 | - Bump com.googlecode.libphonenumber:libphonenumber from8.13.35 to 8.13.39 2 | - Bump androidx.appcompat:appcompat from 1.6.1 to 1.7.0 3 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/774508.txt: -------------------------------------------------------------------------------- 1 | - Bump android target API from 31 to 32 (Android 13) 2 | - Bump gradle from 7.2.0 to 7.2.1 3 | - Bump mockito-core from 4.5.1 to 4.6.0 4 | -------------------------------------------------------------------------------- /.github/pr-labeler.yml: -------------------------------------------------------------------------------- 1 | new-feature: ['feature/*', 'feat/*'] 2 | bugfix: ['bugfix/*', 'bug/*', 'fix/*'] 3 | documentation: ['documentation/*', 'doc/*'] 4 | dependencies: ['dependencies/*', 'dep/*'] -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1566923.txt: -------------------------------------------------------------------------------- 1 | - #282 Add support for alphanumeric short code SMS numbers 2 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.25 to 8.13.26 3 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/905920.txt: -------------------------------------------------------------------------------- 1 | - Support app language via device settings for android 13+ 2 | - Bump gradle from 7.2.1 to 7.2.2 3 | - Bump appcompat from 1.4.2 to 1.5.0 4 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/phoneScreenshots/S2MSP-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/S2MSP-01.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/phoneScreenshots/S2MSP-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frimtec/secure-sms-proxy/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/S2MSP-02.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1983861.txt: -------------------------------------------------------------------------------- 1 | - Support numeric short codes (only for countries ch, de, fr and us) 2 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.44 to 8.13.45 3 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2519531.txt: -------------------------------------------------------------------------------- 1 | - Bump down com.google.android.material:material from 1.13.0 to 1.12.0 2 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.14 to 9.0.15 3 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/940497.txt: -------------------------------------------------------------------------------- 1 | - Support day/night themes 2 | - Migrate to android studio dolphin 3 | - Bump appcompat from 1.5.0 to 1.5.1 4 | - Bump json from 20220320 to 20220924 5 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1259952.txt: -------------------------------------------------------------------------------- 1 | - Ask to disable battery optimization on startup (to work reliable on more devices) 2 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.10 to 8.13.11 3 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1196330.txt: -------------------------------------------------------------------------------- 1 | - Using E164 phone number format internally to work well with international and local numbers provided by some carriers 2 | - Support local numbers provided by carrier 3 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1624213.txt: -------------------------------------------------------------------------------- 1 | - Extend support for 2024 2 | - Bump com.android.tools.build:gradle from 8.1.4 to 8.2.1 3 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.27 to 8.13.28 4 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1997119.txt: -------------------------------------------------------------------------------- 1 | - Add additional countries to support short codes 2 | - Bump target sdk from 34 to 35 3 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.45 to 8.13.46 4 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2434922.txt: -------------------------------------------------------------------------------- 1 | - Add support for numeric short codes for Australia 2 | - Bump androidx.test:runner from 1.6.2 to 1.7.0 3 | - Bump androidx.test.espresso:espresso-core from 1.6.2 to 1.7.0 4 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1247099.txt: -------------------------------------------------------------------------------- 1 | - Migrate to android studio flamingo 2 | - Define telephony feature as required and other inspection cleanups 3 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.8 to 8.13.10 4 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1338879.txt: -------------------------------------------------------------------------------- 1 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.11 to 8.13.15 2 | - Bump org.json:json from 20230227 to 20230618 3 | - Bump com.android.tools.build:gradle from 8.0.1 to 8.0.2 4 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1549366.txt: -------------------------------------------------------------------------------- 1 | - Bump org.json:json from 20230618 to 20231013 2 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.22 to 8.13.25 3 | - Bump com.android.tools.build:gradle from 8.1.2 to 8.1.4 4 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1720561.txt: -------------------------------------------------------------------------------- 1 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.28 to 8.13.32 2 | - Bump com.android.tools.build:gradle from 8.2.1 to 8.2.2 3 | - Bump org.json:json from 20231013 to 20240303 4 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1583663.txt: -------------------------------------------------------------------------------- 1 | - Fix hanging crash report on android 14 2 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.26 to 8.13.27 3 | - Bump com.google.android.material:material from 1.10.0 to 1.11.0 4 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2021393.txt: -------------------------------------------------------------------------------- 1 | - Disable edge-to-edge on android 15 to fix corrupted screen layout 2 | - Bump com.android.tools.build:gradle from 8.6.1 to 8.7.0 3 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.46 to 8.13.47 4 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/793087.txt: -------------------------------------------------------------------------------- 1 | - Added translations for fr and it 2 | - Fix and optimize string resources and references 3 | - Bump material from 1.6.0 to 1.6.1 4 | - Bump mockito-core from 4.6.0 to 4.6.1 5 | - Bump assertj-core from 3.22.0 to 3.23.1 6 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1194093.txt: -------------------------------------------------------------------------------- 1 | - Improve logger to analyze effective phone numbers from received SMS 2 | - Bump material from 1.7.0 to 1.8.0 3 | - Bump androidx.appcompat:appcompat from 1.6.0 to 1.6.1 4 | - Bump org.json:json from 20220924 to 20230227 5 | -------------------------------------------------------------------------------- /securesmsproxyapi/src/main/java/com/github/frimtec/android/securesmsproxyapi/utility/AesOperations.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxyapi.utility; 2 | 3 | public interface AesOperations { 4 | String encrypt(String cleartext); 5 | String decrypt(String encrypted); 6 | } -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1268617.txt: -------------------------------------------------------------------------------- 1 | - Use stronger encryption cipher 2 | - Add API for compatibility check between API version and APP version 3 | - Bump com.android.tools.build:gradle from 8.0.0 to 8.0.1 4 | - Bump com.google.android.material:material from 1.8.0 to 1.9.0 5 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1268691.txt: -------------------------------------------------------------------------------- 1 | - Use stronger encryption cipher 2 | - Add API for compatibility check between API version and APP version 3 | - Bump com.android.tools.build:gradle from 8.0.0 to 8.0.1 4 | - Bump com.google.android.material:material from 1.8.0 to 1.9.0 5 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1481802.txt: -------------------------------------------------------------------------------- 1 | - Migrate to android target sdk 34 (Android 14-UpsideDownCake) 2 | - Code cleanups for java 17 3 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.19 to 8.13.22 4 | - Bump com.android.tools.build:gradle from 8.1.0 to 8.1.2 5 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2601811.txt: -------------------------------------------------------------------------------- 1 | - Centralize dependency management 2 | - Bump com.android.tools.build:gradle from 8.13.0 to 8.13.1 3 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.15 to 9.0.19 4 | - Bump androidx.activity:activity from 1.11.0 to 1.12.0 5 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1782659.txt: -------------------------------------------------------------------------------- 1 | - Cleanup inspection warnings 2 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.32 to 8.13.35 3 | - Bump com.android.tools.build:gradle from 8.3.1 to 8.3.2 4 | - Bump com.google.android.material:material from 1.11.0 to 1.12.0 5 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Oct 17 07:59:36 CEST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip 7 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2217464.txt: -------------------------------------------------------------------------------- 1 | - Remove disturbing no-data toast 2 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.53 to 8.13.54 3 | - Bump com.android.tools.build:gradle from 8.8.0 to 8.8.1 4 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.54 to 8.13.55 5 | -------------------------------------------------------------------------------- /app/src/main/res/xml/locales_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/760064.txt: -------------------------------------------------------------------------------- 1 | - Setup release-drafter and pr-labeler 2 | - Migrate to android studio chipmunk 3 | - Generate fastlane changelog from release body 4 | - Bump material from 1.5.0 to 1.6.0 5 | - Bump release-drafter/release-drafter from 5.19.0 to 5.20.0 6 | - Bump constraintlayout from 2.1.3 to 2.1.4 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | /.idea/deploymentTargetDropDown.xml 11 | /.idea/shelf 12 | .DS_Store 13 | /build 14 | /app/release 15 | /captures 16 | .externalNativeBuild 17 | ringfile 18 | /publish.properties 19 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2158216.txt: -------------------------------------------------------------------------------- 1 | - Bump com.android.tools.build:gradle from 8.7.3 to 8.8.0 2 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.51 to 8.13.52 3 | - Bump org.json:json from 20240303 to 20241224 4 | - Bump org.json:json from 20241224 to 20250107 5 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.52 to 8.13.53 6 | - Bump androidx.activity:activity from 1.9.3 to 1.10.0 7 | -------------------------------------------------------------------------------- /.github/workflows/pr-labeler.yml: -------------------------------------------------------------------------------- 1 | name: PR Labeler 2 | on: 3 | pull_request: 4 | types: [opened] 5 | 6 | jobs: 7 | pr-labeler: 8 | permissions: 9 | contents: read 10 | pull-requests: write 11 | runs-on: ubuntu-22.04 12 | steps: 13 | - uses: TimonVS/pr-labeler-action@v5 14 | with: 15 | configuration-path: .github/pr-labeler.yml 16 | env: 17 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_delete_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_delete_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_arrow_back_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_info_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2360312.txt: -------------------------------------------------------------------------------- 1 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.4 to 9.0.5 2 | - Bump com.android.tools.build:gradle from 8.9.2 to 8.10.0 3 | - Bump org.json:json from 20250107 to 20250517 4 | - Bump com.vanniktech.maven.publish from 0.31.0 to 0.32.0 5 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.5 to 9.0.6 6 | - Bump com.android.tools.build:gradle from 8.10.0 to 8.10.1 7 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.6 to 9.0.7 8 | - Bump androidx.appcompat:appcompat from 1.7.0 to 1.7.1 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @string/system_language 5 | @string/english 6 | @string/german 7 | @string/french 8 | @string/italian 9 | 10 | 11 | 12 | en 13 | de 14 | fr 15 | it 16 | 17 | -------------------------------------------------------------------------------- /securesmsproxyapi/src/test/java/com/github/frimtec/android/securesmsproxyapi/utility/AesTest.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxyapi.utility; 2 | 3 | 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static org.assertj.core.api.Assertions.assertThat; 7 | 8 | 9 | class AesTest { 10 | 11 | private static final String SECRET = "this-is-a-test-secret-12"; 12 | 13 | @Test 14 | void testAes() { 15 | Aes aes = new Aes(SECRET); 16 | String message = aes.decrypt(aes.encrypt("message")); 17 | assertThat(message).isEqualTo("message"); 18 | } 19 | } -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_refresh_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /securesmsproxyapi/src/test/java/com/github/frimtec/android/securesmsproxyapi/utility/Aes2Test.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxyapi.utility; 2 | 3 | 4 | import static org.assertj.core.api.Assertions.assertThat; 5 | 6 | import org.junit.jupiter.api.Test; 7 | 8 | 9 | class Aes2Test { 10 | 11 | private static final String SECRET = "this-is-a-test-secret-12"; 12 | 13 | @Test 14 | void testAes() { 15 | Aes2 aes = new Aes2(SECRET); 16 | String message = aes.decrypt(aes.encrypt("message")); 17 | assertThat(message).isEqualTo("message"); 18 | } 19 | } -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2432057.txt: -------------------------------------------------------------------------------- 1 | - Bump com.vanniktech.maven.publish from 0.33.0 to 0.34.0 2 | - Extract JUnit version into constant 3 | - Bump com.vanniktech.maven.publish from 0.32.0 to 0.33.0 4 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.7 to 9.0.8 5 | - Bump com.android.tools.build:gradle from 8.10.1 to 8.11.0 6 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.8 to 9.0.9 7 | - Bump com.android.tools.build:gradle from 8.11.0 to 8.11.1 8 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.9 to 9.0.10 9 | - Bump com.vanniktech.maven.publish from 0.33.0 to 0.34.0 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/frimtec/android/securesmsproxy/domain/Application.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxy.domain; 2 | 3 | import java.util.Objects; 4 | 5 | public record Application(long id, String name, String listener, String secret) { 6 | 7 | @Override 8 | public boolean equals(Object o) { 9 | if (this == o) { 10 | return true; 11 | } 12 | if (o == null || getClass() != o.getClass()) { 13 | return false; 14 | } 15 | Application that = (Application) o; 16 | return id == that.id; 17 | } 18 | 19 | @Override 20 | public int hashCode() { 21 | return Objects.hash(id); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "gradle" 9 | directory: "/" 10 | schedule: 11 | interval: "weekly" 12 | 13 | # Maintain dependencies for GitHub Actions 14 | - package-ecosystem: "github-actions" 15 | directory: "/" 16 | schedule: 17 | interval: "weekly" 18 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2099754.txt: -------------------------------------------------------------------------------- 1 | - Fixing the loss of release commits 2 | - Bump com.android.tools.build:gradle from 8.7.0 to 8.7.1 3 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.47 to 8.13.48 4 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.48 to 8.13.49 5 | - Bump androidx.constraintlayout:constraintlayout from 2.1.4 to 2.2.0 6 | - Bump com.android.tools.build:gradle from 8.7.1 to 8.7.2 7 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.49 to 8.13.50 8 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.50 to 8.13.51 9 | - Bump com.android.tools.build:gradle from 8.7.2 to 8.7.3 10 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2501095.txt: -------------------------------------------------------------------------------- 1 | - Bump com.android.tools.build:gradle from 8.11.1 to 8.12.0 2 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.10 to 9.0.11 3 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.11 to 9.0.12 4 | - Bump com.android.tools.build:gradle from 8.12.0 to 8.12.1 5 | - Bump com.google.android.material:material from 1.12.0 to 1.13.0 6 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.12 to 9.0.13 7 | - Bump com.android.tools.build:gradle from 8.12.1 to 8.13.0 8 | - Bump androidx.activity:activity from 1.10.1 to 1.11.0 9 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.13 to 9.0.14 10 | -------------------------------------------------------------------------------- /securesmsproxyapi/src/main/java/com/github/frimtec/android/securesmsproxyapi/IsAllowedPhoneNumberContract.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxyapi; 2 | 3 | import android.net.Uri; 4 | 5 | public final class IsAllowedPhoneNumberContract { 6 | 7 | private IsAllowedPhoneNumberContract() { 8 | } 9 | 10 | public static final String AUTHORITY = "com.github.frimtec.android.securesmsproxy.provider"; 11 | public static final Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY); 12 | public static final String ALLOWED_PHONE_NUMBERS_PATH = "allowed_phone_numbers"; 13 | 14 | public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, ALLOWED_PHONE_NUMBERS_PATH); 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_adb_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/logcat_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 17 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1965752.txt: -------------------------------------------------------------------------------- 1 | - Support reproducible builds 2 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.39 to 8.13.40 3 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.40 to 8.13.41 4 | - Bump com.android.tools.build:gradle from 8.5.0 to 8.5.1 5 | - Bump org.assertj:assertj-core from 3.26.0 to 3.26.3 6 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.41 to 8.13.42 7 | - Bump com.android.tools.build:gradle from 8.5.1 to 8.5.2 8 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.42 to 8.13.43 9 | - Bump org.junit.jupiter:junit-jupiter-params from 5.10.3 to 5.11.0 10 | - Bump de.mannodermaus.gradle.plugins:android-junit5 from 1.10.0.0 to 1.11.0.0 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/frimtec/android/securesmsproxy/domain/ApplicationRule.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxy.domain; 2 | 3 | import java.util.Objects; 4 | import java.util.Set; 5 | 6 | public record ApplicationRule(Application application, Set allowedPhoneNumbers) { 7 | 8 | @Override 9 | public boolean equals(Object o) { 10 | if (this == o) { 11 | return true; 12 | } 13 | if (o == null || getClass() != o.getClass()) { 14 | return false; 15 | } 16 | ApplicationRule that = (ApplicationRule) o; 17 | return application.equals(that.application); 18 | } 19 | 20 | @Override 21 | public int hashCode() { 22 | return Objects.hash(application); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/2302205.txt: -------------------------------------------------------------------------------- 1 | - Bump com.android.tools.build:gradle from 8.8.1 to 8.8.2 2 | - Bump androidx.constraintlayout:constraintlayout from 2.2.0 to 2.2.1 3 | - Bump com.googlecode.libphonenumber:libphonenumber from 8.13.55 to 9.0.0 4 | - Bump androidx.activity:activity from 1.10.0 to 1.10.1 5 | - Bump com.android.tools.build:gradle from 8.8.2 to 8.9.0 6 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.0 to 9.0.1 7 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.1 to 9.0.2 8 | - Bump com.android.tools.build:gradle from 8.9.0 to 8.9.1 9 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.2 to 9.0.3 10 | - Bump com.googlecode.libphonenumber:libphonenumber from 9.0.3 to 9.0.4 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/frimtec/android/securesmsproxy/state/DbFactory.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxy.state; 2 | 3 | import android.database.sqlite.SQLiteDatabase; 4 | 5 | import com.github.frimtec.android.securesmsproxy.SecureSmsProxyApplication; 6 | 7 | import static com.github.frimtec.android.securesmsproxy.state.DbFactory.Mode.READ_ONLY; 8 | 9 | @FunctionalInterface 10 | public interface DbFactory { 11 | 12 | enum Mode { 13 | READ_ONLY, 14 | WRITABLE 15 | } 16 | 17 | static DbFactory instance() { 18 | return (mode -> mode == READ_ONLY ? SecureSmsProxyApplication.getReadableDatabase() : SecureSmsProxyApplication.getWritableDatabase()); 19 | } 20 | 21 | SQLiteDatabase getDatabase(Mode mode); 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_logcat.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /securesmsproxyapi/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/menu/main_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 18 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | android.enableJetifier=true 10 | android.useAndroidX=true 11 | org.gradle.jvmargs=-Xmx1536m 12 | android.defaults.buildfeatures.buildconfig=true 13 | android.nonTransitiveRClass=false 14 | android.nonFinalResIds=false 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | 21 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/full_description.txt: -------------------------------------------------------------------------------- 1 | As Google strongly restricts the use of SMS permissions for applications in the Play-Store, S2MSP provides an API for third party applications to send and receive SMS to specific phone numbers via a secure SMS proxy. 2 | 3 | S2MSP acts like a local firewall for SMS communication. 4 | 5 | Each application that wants to send/receive SMS to a phone number can register itself on S2MSP. S2MSP asks the user for permission, whether the requesting application is allowed to send/receive SMS from and to the requested phone numbers or not. 6 | 7 | All SMS exchanged with third party applications are strongly encrypted. 8 | 9 | S2SMP itself requires SMS permissions (SEND_SMS and RECEIVE_SMS) from the Android system and will request these permissions upon startup. 10 | S2MSP does not need any other permissions. This ensures the integrity and security of S2MSP. 11 | 12 | The API to integrate a third party application with S2MSP is available in Maven-Central. -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_android_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /fastlane/metadata/android/it/full_description.txt: -------------------------------------------------------------------------------- 1 | Poiché Google limita fortemente l'uso delle autorizzazioni SMS per le applicazioni nel Play Store, S2MSP fornisce un'API per le app di terze parti per inviare e ricevere SMS a numeri di telefono specifici tramite un proxy SMS sicuro. 2 | 3 | S2MSP agisce come un firewall locale per la comunicazione SMS. 4 | 5 | Qualsiasi app che desideri inviare/ricevere SMS a un numero di telefono può registrarsi con S2MSP. S2MSP chiede all'utente l'autorizzazione indipendentemente dal fatto che l'app richiedente sia autorizzata a inviare/ricevere SMS da e verso i numeri di telefono richiesti. 6 | Tutti gli SMS scambiati con app di terze parti sono fortemente crittografati. 7 | 8 | S2SMP stesso richiede autorizzazioni SMS (SEND_SMS e RECEIVE_SMS) dal sistema Android e richiede queste autorizzazioni all'avvio. 9 | S2MSP non richiede ulteriori autorizzazioni. Ciò garantisce l'integrità e la sicurezza di S2MSP. 10 | 11 | L'API per integrare un'applicazione di terze parti con S2MSP è disponibile in Maven-Central. -------------------------------------------------------------------------------- /fastlane/metadata/android/de/full_description.txt: -------------------------------------------------------------------------------- 1 | Da Google die Verwendung von SMS-Berechtigungen für Anwendungen im Play-Store stark einschränkt, bietet S2MSP eine API für Apps von Drittanbietern zum Senden und Empfangen von SMS an bestimmte Telefonnummern über einen sicheren SMS-Proxy. 2 | 3 | S2MSP fungiert wie eine lokale Firewall für die SMS-Kommunikation. 4 | 5 | Jede App, die SMS an eine Telefonnummer senden/empfangen möchte, kann sich bei S2MSP registrieren. S2MSP fragt den Benutzer um Erlaubnis, ob die anfragende App SMS von und an die angeforderten Telefonnummern senden/empfangen darf oder nicht. 6 | Alle SMS, die mit Apps von Drittanbietern ausgetauscht werden, sind stark verschlüsselt. 7 | 8 | S2SMP selbst benötigt SMS-Berechtigungen (SEND_SMS und RECEIVE_SMS) vom Android-System und fordert diese Berechtigungen beim Start an. 9 | S2MSP benötigt keine weiteren Berechtigungen. Dies gewährleistet die Integrität und Sicherheit von S2MSP. 10 | 11 | Die API zur Integration einer Drittanbieteranwendung mit S2MSP ist in Maven-Central verfügbar. -------------------------------------------------------------------------------- /securesmsproxyapi/src/test/java/com/github/frimtec/android/securesmsproxyapi/utility/RandomTest.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxyapi.utility; 2 | 3 | 4 | import static org.assertj.core.api.Assertions.assertThat; 5 | import static org.junit.jupiter.api.Assertions.assertThrows; 6 | 7 | import org.junit.jupiter.api.Test; 8 | 9 | 10 | class RandomTest { 11 | 12 | @Test 13 | void nextString() { 14 | String random = Random.nextString(10); 15 | assertThat(random.length()).isEqualTo(10); 16 | assertThat(random).isNotEqualTo(Random.nextString(10)); 17 | } 18 | 19 | @Test 20 | void nextBytes() { 21 | byte[] random = Random.nextBytes(10); 22 | assertThat(random.length).isEqualTo(10); 23 | assertThat(random).isNotEqualTo(Random.nextBytes(10)); 24 | } 25 | 26 | @Test 27 | void nextStringToSmallLength() { 28 | assertThrows(IllegalArgumentException.class, () -> Random.nextString(0)); 29 | } 30 | 31 | @Test 32 | void nextBytesToSmallLength() { 33 | assertThrows(IllegalArgumentException.class, () -> Random.nextBytes(0)); 34 | } 35 | } -------------------------------------------------------------------------------- /fastlane/metadata/android/fr/full_description.txt: -------------------------------------------------------------------------------- 1 | Étant donné que Google limite considérablement l'utilisation des autorisations SMS pour les applications du Play Store, S2MSP fournit une API permettant aux applications tierces d'envoyer et de recevoir des SMS vers des numéros de téléphone spécifiques via un proxy SMS sécurisé. 2 | 3 | S2MSP agit comme un pare-feu local pour la communication SMS. 4 | 5 | Toute application qui souhaite envoyer/recevoir des SMS vers un numéro de téléphone peut s'inscrire auprès de S2MSP. S2MSP demande à l'utilisateur l'autorisation d'autoriser ou non l'application demandeuse à envoyer/recevoir des SMS depuis et vers les numéros de téléphone demandés. 6 | Tous les SMS échangés avec des applications tierces sont fortement cryptés. 7 | 8 | S2SMP lui-même nécessite des autorisations SMS (SEND_SMS et RECEIVE_SMS) du système Android et demande ces autorisations au démarrage. 9 | S2MSP ne nécessite aucune autre autorisation. Cela garantit l'intégrité et la sécurité de S2MSP. 10 | 11 | L'API pour intégrer une application tierce avec S2MSP est disponible dans Maven-Central. -------------------------------------------------------------------------------- /securesmsproxyapi/src/main/java/com/github/frimtec/android/securesmsproxyapi/utility/Random.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxyapi.utility; 2 | 3 | import java.security.SecureRandom; 4 | 5 | public class Random { 6 | 7 | private static final char[] SYMBOLS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".toCharArray(); 8 | private static final java.util.Random RANDOM = new SecureRandom(); 9 | 10 | /** 11 | * Generates a random string. 12 | */ 13 | public static String nextString(int length) { 14 | if (length < 1) { 15 | throw new IllegalArgumentException("Length must be bigger than 0"); 16 | } 17 | char[] buffer = new char[length]; 18 | for (int i = 0; i < buffer.length; i++) { 19 | buffer[i] = SYMBOLS[RANDOM.nextInt(SYMBOLS.length)]; 20 | } 21 | return new String(buffer); 22 | } 23 | 24 | public static byte[] nextBytes(int length) { 25 | if (length < 1) { 26 | throw new IllegalArgumentException("Length must be bigger than 0"); 27 | } 28 | byte[] buffer = new byte[length]; 29 | RANDOM.nextBytes(buffer); 30 | return buffer; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/frimtec/android/securesmsproxy/ui/BaseActivity.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxy.ui; 2 | 3 | import android.os.Bundle; 4 | 5 | import androidx.activity.EdgeToEdge; 6 | import androidx.appcompat.app.AppCompatActivity; 7 | import androidx.core.graphics.Insets; 8 | import androidx.core.view.ViewCompat; 9 | import androidx.core.view.WindowInsetsCompat; 10 | 11 | public abstract class BaseActivity extends AppCompatActivity { 12 | 13 | @Override 14 | protected final void onCreate(Bundle savedInstanceState) { 15 | EdgeToEdge.enable(this); 16 | super.onCreate(savedInstanceState); 17 | doOnCreate(savedInstanceState); 18 | ViewCompat.setOnApplyWindowInsetsListener( 19 | findViewById(android.R.id.content), 20 | (view, windowInsets) -> { 21 | Insets insets = windowInsets.getInsets( 22 | WindowInsetsCompat.Type.systemBars() | 23 | WindowInsetsCompat.Type.displayCutout() 24 | ); 25 | view.setPadding(insets.left, insets.top, insets.right, insets.bottom); 26 | return WindowInsetsCompat.CONSUMED; 27 | }); 28 | } 29 | 30 | abstract void doOnCreate(Bundle savedInstanceState); 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/application_rule_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_language_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/frimtec/android/securesmsproxy/service/SmsManagerResolver.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxy.service; 2 | 3 | import android.content.Context; 4 | import android.os.Build; 5 | import android.telephony.SmsManager; 6 | 7 | import androidx.annotation.RequiresApi; 8 | 9 | @FunctionalInterface 10 | interface SmsManagerResolver { 11 | 12 | SmsManager resolve(Context context, Integer subscriptionId); 13 | 14 | static SmsManagerResolver create() { 15 | return Build.VERSION.SDK_INT >= Build.VERSION_CODES.S ? 16 | resolverForAndroidFromS() : resolverForAndroidBeforeS(); 17 | 18 | } 19 | 20 | @RequiresApi(api = Build.VERSION_CODES.S) 21 | static SmsManagerResolver resolverForAndroidFromS() { 22 | return (context, subscriptionId) -> { 23 | SmsManager defaultSmSManager = context.getSystemService(SmsManager.class); 24 | return subscriptionId == null ? defaultSmSManager : 25 | defaultSmSManager.createForSubscriptionId(subscriptionId); 26 | }; 27 | } 28 | 29 | static SmsManagerResolver resolverForAndroidBeforeS() { 30 | return (context, subscriptionId) -> 31 | subscriptionId == null ? context.getSystemService(SmsManager.class) : 32 | // there is no alternative for this deprecated API before Android S 33 | SmsManager.getSmsManagerForSubscriptionId(subscriptionId); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name-template: "$RESOLVED_VERSION" 3 | tag-template: "$RESOLVED_VERSION" 4 | change-template: "- #$NUMBER $TITLE @$AUTHOR" 5 | sort-direction: ascending 6 | 7 | categories: 8 | - title: "🚨 Breaking changes" 9 | labels: 10 | - "breaking-change" 11 | - title: "✨ New features" 12 | labels: 13 | - "new-feature" 14 | - title: "🐛 Bug fixes" 15 | labels: 16 | - "bugfix" 17 | - title: "🚀 Enhancements" 18 | labels: 19 | - "enhancement" 20 | - "refactor" 21 | - "performance" 22 | - title: "🧰 Maintenance" 23 | labels: 24 | - "maintenance" 25 | - "ci" 26 | - title: "📚 Documentation" 27 | labels: 28 | - "documentation" 29 | - title: "⬆️ Dependency updates" 30 | collapse-after: 5 31 | labels: 32 | - "dependencies" 33 | 34 | version-resolver: 35 | major: 36 | labels: 37 | - "major" 38 | - "breaking-change" 39 | minor: 40 | labels: 41 | - "minor" 42 | - "new-feature" 43 | patch: 44 | labels: 45 | - "patch" 46 | - "bugfix" 47 | - "maintenance" 48 | - "ci" 49 | - "dependencies" 50 | - "documentation" 51 | - "enhancement" 52 | - "performance" 53 | - "refactor" 54 | default: patch 55 | 56 | template: | 57 | ## What's changed 58 | 59 | $CHANGES 60 | 61 | **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$RESOLVED_VERSION -------------------------------------------------------------------------------- /app/src/main/java/com/github/frimtec/android/securesmsproxy/utility/PackageInfoAccessor.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxy.utility; 2 | 3 | import android.content.Context; 4 | import android.content.pm.PackageManager; 5 | import android.graphics.drawable.Drawable; 6 | 7 | import java.util.Optional; 8 | 9 | public class PackageInfoAccessor { 10 | 11 | private final PackageManager packageManager; 12 | 13 | public PackageInfoAccessor(Context context) { 14 | this.packageManager = context.getPackageManager(); 15 | } 16 | 17 | public Optional getIcon(String packageName) { 18 | try { 19 | return Optional.of(this.packageManager.getApplicationIcon(packageName)); 20 | } catch (PackageManager.NameNotFoundException e) { 21 | return Optional.empty(); 22 | } 23 | } 24 | 25 | public CharSequence getLabel(String packageName) { 26 | try { 27 | return this.packageManager.getApplicationLabel(this.packageManager.getApplicationInfo(packageName, PackageManager.GET_META_DATA)); 28 | } catch (PackageManager.NameNotFoundException e) { 29 | return packageName.substring(packageName.lastIndexOf(".") + 1); 30 | } 31 | } 32 | 33 | public boolean isInstalled(String packageName) { 34 | try { 35 | packageManager.getPackageInfo(packageName, PackageManager.GET_META_DATA); 36 | return true; 37 | } catch (PackageManager.NameNotFoundException e) { 38 | return false; 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 19 | 20 | 26 | 27 | 33 | 34 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/test/java/com/github/frimtec/android/securesmsproxy/state/DbHelperTest.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxy.state; 2 | 3 | import android.content.Context; 4 | import android.database.sqlite.SQLiteDatabase; 5 | 6 | import org.junit.jupiter.api.Test; 7 | import org.mockito.Mockito; 8 | 9 | import static com.github.frimtec.android.securesmsproxy.state.DbHelper.TABLE_APPLICATION; 10 | import static com.github.frimtec.android.securesmsproxy.state.DbHelper.TABLE_RULE; 11 | import static com.github.frimtec.android.securesmsproxy.state.DbHelper.VIEW_APPLICATION_RULE; 12 | import static org.mockito.Mockito.mock; 13 | import static org.mockito.Mockito.verify; 14 | import static org.mockito.Mockito.verifyNoInteractions; 15 | import static org.mockito.Mockito.verifyNoMoreInteractions; 16 | 17 | class DbHelperTest { 18 | 19 | @Test 20 | void onCreate() { 21 | try (DbHelper dbHelper = new DbHelper(mock(Context.class))) { 22 | SQLiteDatabase db = mock(SQLiteDatabase.class); 23 | dbHelper.onCreate(db); 24 | verify(db).execSQL(Mockito.startsWith("CREATE TABLE " + TABLE_APPLICATION)); 25 | verify(db).execSQL(Mockito.startsWith("CREATE TABLE " + TABLE_RULE)); 26 | verify(db).execSQL(Mockito.startsWith("CREATE VIEW " + VIEW_APPLICATION_RULE)); 27 | verifyNoMoreInteractions(db); 28 | } 29 | } 30 | 31 | @Test 32 | void onUpgradeV1ToV1() { 33 | try (DbHelper dbHelper = new DbHelper(mock(Context.class))) { 34 | SQLiteDatabase db = mock(SQLiteDatabase.class); 35 | dbHelper.onUpgrade(db, 1, 1); 36 | verifyNoInteractions(db); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /securesmsproxyapi/src/test/java/com/github/frimtec/android/securesmsproxyapi/SecureSmsProxyFacadeTest.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxyapi; 2 | 3 | import android.content.Context; 4 | import android.content.pm.PackageManager; 5 | 6 | import org.junit.jupiter.api.Test; 7 | import org.junit.jupiter.params.ParameterizedTest; 8 | import org.junit.jupiter.params.provider.EnumSource; 9 | 10 | import static org.assertj.core.api.AssertionsForClassTypes.assertThat; 11 | import static org.junit.jupiter.params.provider.EnumSource.Mode.EXCLUDE; 12 | import static org.mockito.Mockito.mock; 13 | import static org.mockito.Mockito.when; 14 | 15 | import com.github.frimtec.android.securesmsproxyapi.SecureSmsProxyFacade.Installation.AppCompatibility; 16 | 17 | 18 | class SecureSmsProxyFacadeTest { 19 | 20 | @Test 21 | void instance() { 22 | Context context = mock(Context.class); 23 | when(context.getPackageManager()).thenReturn(mock(PackageManager.class)); 24 | SecureSmsProxyFacade instance = SecureSmsProxyFacade.instance(context); 25 | assertThat(instance).isNotNull(); 26 | } 27 | 28 | @ParameterizedTest 29 | @EnumSource(value = AppCompatibility.class, names = {"SUPPORTED", "UPDATE_RECOMMENDED" }) 30 | void appCompatibilitySupported(AppCompatibility appCompatibility) { 31 | assertThat(appCompatibility.isSupported()).isTrue(); 32 | } 33 | 34 | @ParameterizedTest 35 | @EnumSource(value = AppCompatibility.class, names = {"SUPPORTED", "UPDATE_RECOMMENDED" }, mode = EXCLUDE) 36 | void appCompatibilityNotSupported(AppCompatibility appCompatibility) { 37 | assertThat(appCompatibility.isSupported()).isFalse(); 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /.github/workflows/release-drafter.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Release Drafter 3 | 4 | on: 5 | push: 6 | branches: 7 | - master 8 | 9 | jobs: 10 | update_release_draft: 11 | name: ✏️ Draft release 12 | permissions: 13 | contents: write 14 | pull-requests: write 15 | runs-on: ubuntu-22.04 16 | 17 | steps: 18 | - name: 🚀 Run Release Drafter 19 | id: release_drafter 20 | uses: release-drafter/release-drafter@v6.1.0 21 | env: 22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 23 | 24 | - name: Checkout 25 | uses: actions/checkout@v6 26 | 27 | - name: Generate VCODE 28 | id: generate_vcode 29 | run: echo "vcode=$(expr $(date +%s) / 60 - 26797800)" >> $GITHUB_OUTPUT 30 | 31 | - name: Set version 32 | run: | 33 | sed -i 's/$version/${{ steps.release_drafter.outputs.name }}/g' app/version.properties 34 | sed -i 's/$code/${{ steps.generate_vcode.outputs.vcode }}/g' app/version.properties 35 | 36 | - name: Commit version 37 | uses: stefanzweifel/git-auto-commit-action@v7 38 | with: 39 | commit_message: Configure release information 40 | branch: release/next 41 | create_branch: true 42 | push_options: '--force' 43 | 44 | - name: Change target 45 | run: | 46 | curl -X PATCH \ 47 | -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ 48 | -H 'Accept: application/vnd.github.v3+json' \ 49 | -H 'Content-Type: application/json' \ 50 | "https://api.github.com/repos/frimtec/secure-sms-proxy/releases/${{ steps.release_drafter.outputs.id }}" \ 51 | -d '{"tag_name": "${{ steps.release_drafter.outputs.name }}", "target_commitish": "refs/heads/release/next"}' 52 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/frimtec/android/securesmsproxy/utility/AlertDialogHelper.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxy.utility; 2 | 3 | import android.app.AlertDialog; 4 | import android.content.Context; 5 | import android.content.DialogInterface; 6 | 7 | import com.github.frimtec.android.securesmsproxy.R; 8 | 9 | import java.util.function.BiConsumer; 10 | 11 | 12 | public class AlertDialogHelper { 13 | 14 | public static void requirePermissions(Context context, int titleResourceId, int textResourceId, BiConsumer action) { 15 | requireFeature(context, context.getString(R.string.permission_required) + " " + context.getString(titleResourceId), textResourceId, action); 16 | } 17 | 18 | public static void requireFeature(Context context, int titleResourceId, int textResourceId, BiConsumer action) { 19 | requireFeature(context, context.getString(titleResourceId), textResourceId, action); 20 | } 21 | 22 | private static void requireFeature(Context context, String title, int textResourceId, BiConsumer action) { 23 | AlertDialog alertDialog = new AlertDialog.Builder(context) 24 | .setTitle(title) 25 | .setMessage(textResourceId) 26 | .setCancelable(true) 27 | .setPositiveButton("OK", action::accept) 28 | .create(); 29 | alertDialog.show(); 30 | } 31 | 32 | public static void areYouSure(Context context, DialogInterface.OnClickListener onYes, DialogInterface.OnClickListener onNo) { 33 | AlertDialog.Builder builder = new AlertDialog.Builder(context); 34 | builder.setMessage(R.string.general_are_you_sure) 35 | .setPositiveButton(R.string.general_yes, onYes) 36 | .setNegativeButton(R.string.general_no, onNo) 37 | .show(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /.github/workflows/buid.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | name: Build and Test 12 | permissions: 13 | contents: read 14 | runs-on: ubuntu-22.04 15 | 16 | steps: 17 | - uses: actions/checkout@v6 18 | 19 | - name: set up JDK 17 20 | uses: actions/setup-java@v5 21 | with: 22 | distribution: 'zulu' 23 | java-version: 17 24 | 25 | - name: Build and Test coverage Report 26 | run: bash ./gradlew test unitTestCoverageReport --stacktrace 27 | 28 | - uses: codecov/codecov-action@v5.5.2 29 | with: 30 | files: ./app/build/reports/jacoco/unitTestCoverageReport/unitTestCoverageReport.xml,./securesmsproxyapi/build/reports/jacoco/unitTestCoverageReport/unitTestCoverageReport.xml 31 | token: ${{ secrets.CODECOV_TOKEN }} 32 | 33 | apk: 34 | name: Generate APK 35 | if: "github.actor == 'frimtec'" 36 | permissions: 37 | contents: read 38 | runs-on: ubuntu-22.04 39 | 40 | steps: 41 | - uses: actions/checkout@v6 42 | - name: set up JDK 17 43 | uses: actions/setup-java@v5 44 | with: 45 | distribution: 'zulu' 46 | java-version: 17 47 | 48 | - name: Build debug APK 49 | run: bash ./gradlew assembleDebug --stacktrace 50 | 51 | - name: Upload APK 52 | uses: actions/upload-artifact@v6 53 | with: 54 | name: secure-sms-proxy 55 | path: ./app/build/outputs/apk/debug/app-debug.apk 56 | 57 | - name: 🛡 VirusTotal Scan 58 | uses: crazy-max/ghaction-virustotal@v4 59 | with: 60 | request_rate: 4 61 | vt_api_key: ${{ secrets.VT_API_KEY }} 62 | files: ./app/build/outputs/apk/debug/app-debug.apk -------------------------------------------------------------------------------- /app/src/main/java/com/github/frimtec/android/securesmsproxy/ui/AboutActivity.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxy.ui; 2 | 3 | import android.os.Bundle; 4 | import android.text.Html; 5 | import android.text.method.LinkMovementMethod; 6 | import android.widget.TextView; 7 | 8 | import com.github.frimtec.android.securesmsproxy.BuildConfig; 9 | import com.github.frimtec.android.securesmsproxy.R; 10 | 11 | public class AboutActivity extends BaseActivity { 12 | 13 | @Override 14 | protected void doOnCreate(Bundle savedInstanceState) { 15 | setContentView(R.layout.activity_about); 16 | setupAppInfo(); 17 | setupDocumentation(); 18 | setupDisclaimer(); 19 | } 20 | 21 | private void setupAppInfo() { 22 | TextView textView = findViewById(R.id.app_info); 23 | String version = BuildConfig.VERSION_NAME; 24 | int build = BuildConfig.VERSION_CODE; 25 | 26 | textView.setText(Html.fromHtml( 27 | "

Secure SMS Proxy

" + 28 | "

Version: " + version + "
" + "Build: " + build + "

" + 29 | "

© 2019-2025 frimTEC

" 30 | , Html.FROM_HTML_MODE_COMPACT)); 31 | textView.setMovementMethod(LinkMovementMethod.getInstance()); 32 | } 33 | 34 | private void setupDocumentation() { 35 | TextView textView = findViewById(R.id.documentation); 36 | textView.setText(Html.fromHtml(getString(R.string.about_documentation), Html.FROM_HTML_MODE_COMPACT)); 37 | textView.setMovementMethod(LinkMovementMethod.getInstance()); 38 | } 39 | 40 | private void setupDisclaimer() { 41 | TextView textView = findViewById(R.id.disclaimer); 42 | textView.setText(Html.fromHtml(getString(R.string.about_disclaimer), Html.FROM_HTML_MODE_COMPACT)); 43 | textView.setMovementMethod(LinkMovementMethod.getInstance()); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/frimtec/android/securesmsproxy/ui/SendLogActivity.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxy.ui; 2 | 3 | import static android.content.Intent.EXTRA_BUG_REPORT; 4 | 5 | import android.content.Intent; 6 | import android.os.Bundle; 7 | import android.widget.Button; 8 | 9 | import androidx.activity.result.ActivityResultLauncher; 10 | import androidx.activity.result.contract.ActivityResultContracts; 11 | 12 | import com.github.frimtec.android.securesmsproxy.R; 13 | 14 | public class SendLogActivity extends BaseActivity { 15 | 16 | private ActivityResultLauncher someActivityResultLauncher; 17 | 18 | @Override 19 | protected void doOnCreate(Bundle savedInstanceState) { 20 | super.onCreate(savedInstanceState); 21 | setContentView(R.layout.activity_send_log); 22 | 23 | Button sendButton = findViewById(R.id.send_log_button_send); 24 | sendButton.setOnClickListener(v -> sendCrashReport(getIntent().getStringExtra(EXTRA_BUG_REPORT))); 25 | 26 | Button exitButton = findViewById(R.id.send_log_button_exit); 27 | exitButton.setOnClickListener(v -> terminate()); 28 | 29 | someActivityResultLauncher = registerForActivityResult( 30 | new ActivityResultContracts.StartActivityForResult(), 31 | result -> terminate() 32 | ); 33 | } 34 | 35 | private void sendCrashReport(String report) { 36 | Intent intent = new Intent(Intent.ACTION_SEND); 37 | intent.setType("plain/text"); 38 | intent.putExtra(Intent.EXTRA_EMAIL, new String[]{"frimtec@gmx.ch"}); 39 | intent.putExtra(Intent.EXTRA_SUBJECT, "S2MSP crash report"); 40 | intent.putExtra(Intent.EXTRA_TEXT, report); 41 | someActivityResultLauncher.launch(intent); 42 | } 43 | 44 | private void terminate() { 45 | Intent intent = new Intent(); 46 | intent.setAction(Intent.ACTION_MAIN); 47 | intent.addCategory(Intent.CATEGORY_HOME); 48 | startActivity(intent); 49 | finish(); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/frimtec/android/securesmsproxy/service/SmsDecoder.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxy.service; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.telephony.SmsMessage; 6 | 7 | import com.github.frimtec.android.securesmsproxyapi.Sms; 8 | 9 | import java.util.Collections; 10 | import java.util.LinkedHashMap; 11 | import java.util.List; 12 | import java.util.Map; 13 | import java.util.function.BiFunction; 14 | import java.util.stream.Collectors; 15 | 16 | public class SmsDecoder { 17 | 18 | private final BiFunction pduDecoder; 19 | 20 | public SmsDecoder() { 21 | this(SmsMessage::createFromPdu); 22 | } 23 | 24 | SmsDecoder(BiFunction pduDecoder) { 25 | this.pduDecoder = pduDecoder; 26 | } 27 | 28 | public List getSmsFromIntent(PhoneNumberFormatter phoneNumberFormatter, Intent intent) { 29 | Bundle bundle = intent.getExtras(); 30 | if (bundle != null) { 31 | int subscription = bundle.getInt("subscription", -1); 32 | Object[] pdus = (Object[]) bundle.get("pdus"); 33 | String format = bundle.getString("format"); 34 | if (pdus != null) { 35 | Map smsTextByNumber = new LinkedHashMap<>(); 36 | for (Object pdu : pdus) { 37 | SmsMessage message = this.pduDecoder.apply((byte[]) pdu, format); 38 | String number = phoneNumberFormatter.toE164(message.getOriginatingAddress()); 39 | String text = smsTextByNumber.getOrDefault(number, ""); 40 | smsTextByNumber.put(number, text + message.getMessageBody()); 41 | } 42 | Integer subscriptionId = subscription >= 0 ? subscription : null; 43 | return smsTextByNumber.entrySet().stream() 44 | .map(entry -> new Sms(entry.getKey(), entry.getValue(), subscriptionId)) 45 | .collect(Collectors.toList()); 46 | } 47 | } 48 | return Collections.emptyList(); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/test/java/com/github/frimtec/android/securesmsproxy/domain/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxy.domain; 2 | 3 | 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static org.assertj.core.api.Assertions.assertThat; 7 | 8 | class ApplicationTest { 9 | 10 | @Test 11 | void testProperties() { 12 | Application application = new Application(12L, "name", "listener", "secret"); 13 | assertThat(application.id()).isEqualTo(12L); 14 | assertThat(application.name()).isEqualTo("name"); 15 | assertThat(application.listener()).isEqualTo("listener"); 16 | assertThat(application.secret()).isEqualTo("secret"); 17 | } 18 | 19 | @Test 20 | void testEquals() { 21 | Application application1 = new Application(12L, "name", "listener", "secret"); 22 | Application application2 = new Application(11L, "name", "listener", "secret"); 23 | assertThat(application1.equals(application2)).isFalse(); 24 | assertThat(application2.equals(application1)).isFalse(); 25 | 26 | assertThat(application1.equals(new Application(12L, null, null, null))).isTrue(); 27 | //noinspection EqualsWithItself 28 | assertThat(application1.equals(application1)).isTrue(); 29 | 30 | //noinspection ConstantConditions 31 | assertThat(application1.equals(null)).isFalse(); 32 | 33 | //noinspection EqualsBetweenInconvertibleTypes 34 | assertThat(application1.equals("Test")).isFalse(); 35 | } 36 | 37 | @Test 38 | void testHashCode() { 39 | Application application1 = new Application(12L, "name", "listener", "secret"); 40 | Application application2 = new Application(11L, "name", "listener", "secret"); 41 | assertThat(application1.hashCode()).isNotEqualTo(application2.hashCode()); 42 | assertThat(application2.equals(application1)).isFalse(); 43 | assertThat(application1.hashCode()).isEqualTo(new Application(12L, null, null, null).hashCode()); 44 | } 45 | 46 | @Test 47 | void testToString() { 48 | Application application = new Application(12L, "name", "listener", "secret"); 49 | assertThat(application.toString()).isEqualTo("Application[id=12, name=name, listener=listener, secret=secret]"); 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/application_rule_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 22 | 23 | 32 | 33 | 41 | 42 | 52 | 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/github/frimtec/android/securesmsproxy/ui/LogcatActivity.java: -------------------------------------------------------------------------------- 1 | package com.github.frimtec.android.securesmsproxy.ui; 2 | 3 | import android.os.Bundle; 4 | import android.text.TextUtils; 5 | import android.util.Log; 6 | import android.view.Menu; 7 | import android.view.MenuInflater; 8 | import android.view.MenuItem; 9 | import android.widget.TextView; 10 | 11 | import com.github.frimtec.android.securesmsproxy.R; 12 | 13 | import java.io.BufferedReader; 14 | import java.io.IOException; 15 | import java.io.InputStreamReader; 16 | import java.util.LinkedList; 17 | import java.util.List; 18 | 19 | public class LogcatActivity extends BaseActivity { 20 | 21 | private static final String TAG = "LogcatActivity"; 22 | 23 | @Override 24 | protected void doOnCreate(Bundle savedInstanceState) { 25 | setContentView(R.layout.activity_logcat); 26 | readLogcat(); 27 | } 28 | 29 | private void readLogcat() { 30 | try { 31 | Process process = Runtime.getRuntime().exec("logcat -t 500"); 32 | BufferedReader bufferedReader = new BufferedReader( 33 | new InputStreamReader(process.getInputStream())); 34 | 35 | List lines = new LinkedList<>(); 36 | String line; 37 | while ((line = bufferedReader.readLine()) != null) { 38 | lines.add(0, line); 39 | } 40 | TextView tv = findViewById(R.id.log_text); 41 | tv.setText(TextUtils.join("\n", lines)); 42 | } catch (IOException e) { 43 | Log.e(TAG, "Logcat read failed", e); 44 | } 45 | } 46 | 47 | @Override 48 | public boolean onCreateOptionsMenu(Menu menu) { 49 | MenuInflater inflater = getMenuInflater(); 50 | inflater.inflate(R.menu.logcat_menu, menu); 51 | return super.onCreateOptionsMenu(menu); 52 | } 53 | 54 | @Override 55 | public boolean onOptionsItemSelected(MenuItem item) { 56 | if (item.getItemId() == R.id.logcat_clear) { 57 | try { 58 | Runtime.getRuntime().exec("logcat -c"); 59 | } catch (IOException e) { 60 | Log.e(TAG, "Logcat clear failed", e); 61 | } 62 | Log.i(TAG, "Logcat cleared manually"); 63 | readLogcat(); 64 | return true; 65 | } else if (item.getItemId() == R.id.logcat_refresh) { 66 | readLogcat(); 67 | return true; 68 | } 69 | return super.onOptionsItemSelected(item); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_send_log.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 19 | 20 | 29 | 30 | 39 | 40 |