Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrgeek authored Aug 13, 2023
2 parents 3cf06d5 + f862e48 commit e8d6bfa
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: gradle/wrapper-validation-action@v1

- name: Build debug APK
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v2.7.0
with:
arguments: assembleDebug
env:
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build Pull Request APK

on:
pull_request:
branches:
- "main"

jobs:
apk:
permissions:
# Required to upload/save artifact, otherwise you'll get
# "Error: Resource not accessible by integration"
contents: write
# Required to post comment, otherwise you'll get
# "Error: Resource not accessible by integration"
pull-requests: write

name: Generate APK for pull request
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 11

- name: Make Gradle wrapper executable
run: chmod +x ./gradlew

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Build debug APK
uses: gradle/gradle-build-action@v2.7.0
with:
arguments: assembleDebug
env:
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}

- name: Add pull request artifact
uses: gavv/pull-request-artifacts@v1.1.0
with:
# Commit hash that triggered PR
commit: ${{ github.event.pull_request.head.sha }}
# Token for current repo (used to post PR comment)
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Upload artifacts to specific branch, usually the main branch is
# protected by rules so it's not possible to upload there
artifacts-branch: prartifacts
artifacts: |
app/build/outputs/apk/debug/app-debug.apk
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This repository contains an [Xposed](https://github.com/rovo89/XposedBridge) mod
These are
* [Digitales Amt](https://play.google.com/store/apps/details?id=at.gv.oe.app) by Bundesministerium für Digitalisierung und Wirtschaftsort
* [FinanzOnline [+]](https://play.google.com/store/apps/details?id=at.gv.bmf.bmf2go) by Bundesministerium für Finanzen
* [SPB Serviceportal Bund](https://play.google.com/store/apps/details?id=at.gv.bka.serviceportal) by Bundeskanzleramt Oesterreich

## Mission statement

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,26 @@ class ModuleMain : IXposedHookZygoteInit, IXposedHookLoadPackage {
private lateinit var digitalesAmtPackageName: String
private lateinit var bmf2GoPackageName: String
private lateinit var eduDigicardPackageName: String
private lateinit var serviceportalBundPackageName: String

override fun initZygote(startupParam: IXposedHookZygoteInit.StartupParam) {
val moduleResources = XModuleResources.createInstance(startupParam.modulePath, null)
digitalesAmtPackageName = moduleResources.getString(R.string.digitales_amt_package_name)
bmf2GoPackageName = moduleResources.getString(R.string.bmf2go_package_name)
eduDigicardPackageName = moduleResources.getString(R.string.edudigicard_package_name)
serviceportalBundPackageName = moduleResources.getString(R.string.serviceportal_bund_package_name)
}

override fun handleLoadPackage(lpparam: LoadPackageParam) {
when (lpparam.packageName) {
digitalesAmtPackageName -> handleDigitalesAmt(lpparam)
digitalesAmtPackageName -> handleASitPlusIntegrityCheck(lpparam)
bmf2GoPackageName -> handleBmf2Go(lpparam)
eduDigicardPackageName -> handleEduDigicard(lpparam)
serviceportalBundPackageName -> handleASitPlusIntegrityCheck(lpparam)
}
}

private fun handleDigitalesAmt(lpparam: LoadPackageParam) {
private fun handleASitPlusIntegrityCheck(lpparam: XC_LoadPackage.LoadPackageParam) {
XposedBridge.log("Hooking DeviceIntegrityCheck")
XposedHelpers.findAndHookMethod(DEVICE_INTEGRITY_CHECK_CLASS, lpparam.classLoader, "checkIntegrity", XC_MethodReplacement.DO_NOTHING)
XposedHelpers.findAndHookMethod(DEVICE_INTEGRITY_CHECK_CLASS, lpparam.classLoader, "checkIntegrityForceCheck", XC_MethodReplacement.DO_NOTHING)
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
<item>@string/digitales_amt_package_name</item>
<item>@string/bmf2go_package_name</item>
<item>@string/edudigicard_package_name</item>
<item>@string/serviceportal_bund_package_name</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
<string name="digitales_amt_package_name" translatable="false">at.gv.oe.app</string>
<string name="bmf2go_package_name" translatable="false">at.gv.bmf.bmf2go</string>
<string name="edudigicard_package_name">at.asitplus.digitalid.wallet.pupilid</string>
<string name="serviceportal_bund_package_name" translatable="false">at.gv.bka.serviceportal</string>
</resources>

0 comments on commit e8d6bfa

Please sign in to comment.