From abdb7b2e842e6e554401aeccab5a831a2a0b3a85 Mon Sep 17 00:00:00 2001 From: l2uler <335852737+CodePhrex@users.noreply.github.com> Date: Sun, 25 Oct 2026 07:20:17 -0700 Subject: [PATCH 01/14] ci: build and upload debug APK artifact --- .github/workflows/android-build.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index c5a1100..b258be5 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -90,3 +90,20 @@ jobs: - name: Run Jest Test Suite run: npm test -- --passWithNoTests + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Build debug APK + run: | + chmod +x android/gradlew + cd android + ./gradlew --no-daemon assembleDebug + + - name: Upload debug APK + uses: actions/upload-artifact@v4 + with: + name: droid-commander-debug-apk + path: android/app/build/outputs/apk/debug/*.apk + if-no-files-found: error + retention-days: 14 From cd57a28cda34e2b9a039344d42ee4763e13359fd Mon Sep 17 00:00:00 2001 From: l2uler <335852737+CodePhrex@users.noreply.github.com> Date: Sun, 25 Oct 2026 07:29:21 -0700 Subject: [PATCH 02/14] Fix Kotlin import ordering in USB host module --- .../java/com/droidcommander/usb/DroidCommanderUsbHostModule.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/droid-commander-usb-host/android/src/main/java/com/droidcommander/usb/DroidCommanderUsbHostModule.kt b/modules/droid-commander-usb-host/android/src/main/java/com/droidcommander/usb/DroidCommanderUsbHostModule.kt index ad95bfc..20c2fd0 100644 --- a/modules/droid-commander-usb-host/android/src/main/java/com/droidcommander/usb/DroidCommanderUsbHostModule.kt +++ b/modules/droid-commander-usb-host/android/src/main/java/com/droidcommander/usb/DroidCommanderUsbHostModule.kt @@ -4,6 +4,7 @@ import android.content.Intent import android.os.Build import android.provider.Settings import android.util.Base64 +import java.util.zip.CRC32 import expo.modules.kotlin.modules.Module import expo.modules.kotlin.modules.ModuleDefinition @@ -155,5 +156,3 @@ class DroidCommanderUsbHostModule : Module() { } } -import java.util.zip.CRC32 -// FAIL_CLOSED ENFORCE_EXECUTION_GATES From 6d344c8f3c08e5fa6ea411446c56a2ec456fecd1 Mon Sep 17 00:00:00 2001 From: l2uler <335852737+CodePhrex@users.noreply.github.com> Date: Sun, 25 Oct 2026 07:29:29 -0700 Subject: [PATCH 03/14] Preserve security gate marker after Kotlin import fix --- .../java/com/droidcommander/usb/DroidCommanderUsbHostModule.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/droid-commander-usb-host/android/src/main/java/com/droidcommander/usb/DroidCommanderUsbHostModule.kt b/modules/droid-commander-usb-host/android/src/main/java/com/droidcommander/usb/DroidCommanderUsbHostModule.kt index 20c2fd0..5652fd6 100644 --- a/modules/droid-commander-usb-host/android/src/main/java/com/droidcommander/usb/DroidCommanderUsbHostModule.kt +++ b/modules/droid-commander-usb-host/android/src/main/java/com/droidcommander/usb/DroidCommanderUsbHostModule.kt @@ -156,3 +156,4 @@ class DroidCommanderUsbHostModule : Module() { } } +// FAIL_CLOSED ENFORCE_EXECUTION_GATES From 07fc24a8af1d63b2c43999184720e8a90689a3ea Mon Sep 17 00:00:00 2001 From: l2uler <335852737+CodePhrex@users.noreply.github.com> Date: Sun, 25 Oct 2026 07:35:47 -0700 Subject: [PATCH 04/14] Add gated signed production release APK build --- .github/workflows/android-build.yml | 66 +++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index b258be5..e7bf331 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -107,3 +107,69 @@ jobs: path: android/app/build/outputs/apk/debug/*.apk if-no-files-found: error retention-days: 14 + + build-release-apk: + name: Build signed production release APK + needs: sast-static-analysis + if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' + runs-on: ubuntu-latest + steps: + - name: Checkout Codebase + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v5 + with: + java-version: '17' + distribution: 'zulu' + + - name: Set up Node.js 22 + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: 'npm' + + - name: Install Dependencies + run: npm ci + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Configure release signing + env: + ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} + ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} + ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} + ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} + ANDROID_KEYSTORE_PATH: ${{ runner.temp }}/droid-commander-release.keystore + run: | + set -euo pipefail + for name in ANDROID_KEYSTORE_BASE64 ANDROID_KEYSTORE_PASSWORD ANDROID_KEY_ALIAS ANDROID_KEY_PASSWORD; do + if [ -z "${!name}" ]; then + echo "::error::Missing required GitHub Actions secret: $name" + exit 1 + fi + done + printf '%s' "$ANDROID_KEYSTORE_BASE64" | base64 --decode > "$ANDROID_KEYSTORE_PATH" + chmod 600 "$ANDROID_KEYSTORE_PATH" + echo "ANDROID_KEYSTORE_PATH=$ANDROID_KEYSTORE_PATH" >> "$GITHUB_ENV" + echo "ANDROID_KEYSTORE_PASSWORD=$ANDROID_KEYSTORE_PASSWORD" >> "$GITHUB_ENV" + echo "ANDROID_KEY_ALIAS=$ANDROID_KEY_ALIAS" >> "$GITHUB_ENV" + echo "ANDROID_KEY_PASSWORD=$ANDROID_KEY_PASSWORD" >> "$GITHUB_ENV" + + - name: Build signed release APK + env: + ANDROID_VERSION_CODE: ${{ github.run_number }} + ANDROID_VERSION_NAME: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || 'manual-' }} + run: | + chmod +x android/gradlew + cd android + ./gradlew --no-daemon assembleRelease + + - name: Upload signed release APK + uses: actions/upload-artifact@v4 + with: + name: droid-commander-release-apk + path: android/app/build/outputs/apk/release/*.apk + if-no-files-found: error + retention-days: 30 From 21f83d99a4ca04564ac28dddcea181bdc9eafe33 Mon Sep 17 00:00:00 2001 From: l2uler <335852737+CodePhrex@users.noreply.github.com> Date: Sun, 25 Oct 2026 07:36:00 -0700 Subject: [PATCH 05/14] Use unique version name for manual release builds --- .github/workflows/android-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index e7bf331..d45184d 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -160,7 +160,7 @@ jobs: - name: Build signed release APK env: ANDROID_VERSION_CODE: ${{ github.run_number }} - ANDROID_VERSION_NAME: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || 'manual-' }} + ANDROID_VERSION_NAME: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || format('manual-{0}', github.run_number) }} run: | chmod +x android/gradlew cd android From d3d8f58a476112866d50881f2ea52f35b8eea9da Mon Sep 17 00:00:00 2001 From: l2uler <335852737+CodePhrex@users.noreply.github.com> Date: Sun, 25 Oct 2026 08:06:43 -0700 Subject: [PATCH 06/14] Generate debug keystore for CI APK build --- .github/workflows/android-build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index d45184d..85d1408 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -94,6 +94,17 @@ jobs: - name: Set up Gradle uses: gradle/actions/setup-gradle@v4 + - name: Create temporary debug signing keystore + run: | + keytool -genkeypair -v \ + -keystore android/app/debug.keystore \ + -storepass android \ + -alias androiddebugkey \ + -keypass android \ + -keyalg RSA -keysize 2048 -validity 10000 \ + -dname "CN=Android Debug,O=Android,C=US" \ + -noprompt + - name: Build debug APK run: | chmod +x android/gradlew From 0e6bec06b9d677ecab26defb378a768200ff0af6 Mon Sep 17 00:00:00 2001 From: l2uler <335852737+CodePhrex@users.noreply.github.com> Date: Sun, 25 Oct 2026 08:26:16 -0700 Subject: [PATCH 07/14] security: restrict workflow token permissions --- .github/workflows/android-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index 85d1408..1acbdca 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -1,5 +1,8 @@ name: Droid Commander Production Android Build, Signing & Security Scanning +permissions: + contents: read + on: pull_request: types: [opened, synchronize, reopened] From 83bb77bb5225d535c59c840cd86b55ab9f58abb3 Mon Sep 17 00:00:00 2001 From: l2uler <335852737+CodePhrex@users.noreply.github.com> Date: Sun, 25 Oct 2026 09:36:09 -0700 Subject: [PATCH 08/14] Bundle JavaScript into standalone debug APK --- android/app/build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index cbe86df..cf66777 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -32,7 +32,9 @@ react { // The list of variants to that are debuggable. For those we're going to // skip the bundling of the JS bundle and the assets. By default is just 'debug'. // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. - // debuggableVariants = ["liteDebug", "prodDebug"] + // Package the JavaScript bundle in BOTH debug and release APKs. This makes the CI debug APK installable without Metro. + // Keep this empty: the default ["debug"] skips JS bundling for debug builds. + debuggableVariants = [] /* Bundling */ // A list containing the node command and its flags. Default is just 'node'. From dfe83aacd21004ca0f9ae9bdf2c72ddde576c67d Mon Sep 17 00:00:00 2001 From: l2uler <335852737+CodePhrex@users.noreply.github.com> Date: Sun, 25 Oct 2026 09:36:16 -0700 Subject: [PATCH 09/14] Protect production signing with environment approval --- .github/workflows/android-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index 1acbdca..6aeb2e8 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -127,6 +127,7 @@ jobs: needs: sast-static-analysis if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest + environment: production steps: - name: Checkout Codebase uses: actions/checkout@v4 From b4dde2bd500d13b919761d63062459baec2fe72e Mon Sep 17 00:00:00 2001 From: l2uler <335852737+CodePhrex@users.noreply.github.com> Date: Sun, 25 Oct 2026 09:45:06 -0700 Subject: [PATCH 10/14] Fix case-sensitive HapticTab import for Android CI --- app/(tabs)/_layout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx index 3d54bb1..f13b6a7 100644 --- a/app/(tabs)/_layout.tsx +++ b/app/(tabs)/_layout.tsx @@ -1,7 +1,7 @@ import { Tabs } from "expo-router"; import { useSafeAreaInsets } from "react-native-safe-area-context"; -import { HapticTab } from "../../components/HapticTab"; +import { HapticTab } from "../../components/haptic-tab"; import { IconSymbol } from "@/components/ui/icon-symbol"; import { palette } from "@/constants/commander"; import { Platform } from "react-native"; From fd0c736aeffbdd5134b9982475ac8964a0d462e9 Mon Sep 17 00:00:00 2001 From: l2uler <335852737+CodePhrex@users.noreply.github.com> Date: Sun, 25 Oct 2026 09:55:42 -0700 Subject: [PATCH 11/14] Fix root @ import alias for Expo Metro bundling --- tsconfig.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index b2925da..9961d11 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,11 @@ "skipLibCheck": true, "noImplicitAny": false, "strict": false, - "esModuleInterop": true + "esModuleInterop": true, + "baseUrl": ".", + "paths": { + "@/*": ["./*"] + } }, "include": [ "/*.ts", @@ -18,4 +22,4 @@ "**/*.jsx", "global.d.ts" ] -} \ No newline at end of file +} From 6b0b35b63c2d8687908cd65c9d0cd25bb70d1100 Mon Sep 17 00:00:00 2001 From: l2uler <335852737+CodePhrex@users.noreply.github.com> Date: Sun, 25 Oct 2026 10:04:44 -0700 Subject: [PATCH 12/14] Fix malformed JSX in wireless diagnostics screen --- app/(tabs)/wireless-diagnostics-screen.tsx | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/app/(tabs)/wireless-diagnostics-screen.tsx b/app/(tabs)/wireless-diagnostics-screen.tsx index e1152c2..4cca851 100644 --- a/app/(tabs)/wireless-diagnostics-screen.tsx +++ b/app/(tabs)/wireless-diagnostics-screen.tsx @@ -60,19 +60,6 @@ export default function WirelessDiagnosticsScreen() { )} - - Wi-Fi Networks ({wifiNetworks.length}) - {wifiNetworks.map((net, idx) => ( - - - {net.ssid} {net.isConnected ? "(Connected)" : ""} - 4Text style={styles.itemSub}>BSSID: {net.bssid} | {net.security} - - {net.rssi} dBm - - ))} - - Wi-Fi Networks ({wifiNetworks.length}) {wifiNetworks.map((net, idx) => ( From da1ceb500b872a0bcd7ee5aca1621a2596067b6c Mon Sep 17 00:00:00 2001 From: l2uler <335852737+CodePhrex@users.noreply.github.com> Date: Sun, 25 Oct 2026 10:44:00 -0700 Subject: [PATCH 13/14] Fix corrupted duplicate vulnerability scanner screen JSX --- .../vulnerability-scanner-screen-v3.tsx" | 85 +++++++++++++++++-- 1 file changed, 79 insertions(+), 6 deletions(-) diff --git "a/app/\357\277\274/vulnerability-scanner-screen-v3.tsx" "b/app/\357\277\274/vulnerability-scanner-screen-v3.tsx" index 8c2966f..b6cd236 100644 --- "a/app/\357\277\274/vulnerability-scanner-screen-v3.tsx" +++ "b/app/\357\277\274/vulnerability-scanner-screen-v3.tsx" @@ -103,7 +103,7 @@ export default function VulnerabilityScannerScreenV3() { {/* Header */} - Live Host Uulnerability Scanner v2 + Live Host Vulnerability Scanner v2 Offline Multi-Gate CVE Correlation & Firmware Risk Engine @@ -127,8 +127,7 @@ export default function VulnerabilityScannerScreenV3() { {/* Device Telemetry Snapshot */} - Collecte -‰eyË^t Host Telemetry + Collected Host Telemetry Device ID: @@ -183,10 +182,10 @@ export default function VulnerabilityScannerScreenV3() { > {report.overallRiskScore.toFixed(1)} / 10.0 - pText style={styles.scoreLabel}>CVSS v3.1 Composite Risk Score + CVSS v3.1 Composite Risk Score - + {report.summary.criticalCount} Critical @@ -258,4 +257,78 @@ export default function VulnerabilityScannerScreenV3() { Automated Remediation Playbook: - {item.signature.remediationAction&jÚâ \ No newline at end of file + {item.signature.remediationAction} + + + + )) + )} + + + )} + + ); +} + +const styles = StyleSheet.create({ + container: { flex: 1, backgroundColor: "#0A0E17" }, + content: { padding: 16 }, + header: { marginBottom: 16 }, + title: { fontSize: 20, fontWeight: "bold", color: "#F8FAFC" }, + subtitle: { fontSize: 13, color: "#94A3B8", marginTop: 2 }, + card: { + backgroundColor: "#1E293B", + borderRadius: 12, + padding: 16, + marginBottom: 16, + borderWidth: 1, + borderColor: "#334155", + }, + cardTitle: { fontSize: 16, fontWeight: "600", color: "#38BDF8", marginBottom: 12 }, + primaryButton: { + backgroundColor: "#0284C7", + paddingVertical: 12, + borderRadius: 8, + alignItems: "center", + }, + buttonText: { color: "#FFFFFF", fontWeight: "600", fontSize: 14 }, + metaGrid: { flexDirection: "row", flexWrap: "wrap", justifyContent: "space-between" }, + metaItem: { width: "48%", marginBottom: 10 }, + metaLabel: { fontSize: 12, color: "#64748B" }, + metaValue: { fontSize: 13, fontWeight: "600", color: "#F1F5F9", marginTop: 2 }, + metaValueSmall: { fontSize: 11, fontWeight: "500", color: "#CBD5E1", marginTop: 2 }, + scoreContainer: { alignItems: "center", marginVertical: 12 }, + scoreValue: { fontSize: 32, fontWeight: "bold" }, + scoreLabel: { fontSize: 12, color: "#94A3B8", marginTop: 2 }, + summaryBadgeRow: { flexDirection: "row", justifyContent: "space-around", marginTop: 8 }, + badge: { paddingHorizontal: 10, paddingVertical: 4, borderRadius: 16, borderWidth: 1 }, + badgeText: { fontSize: 12, fontWeight: "bold" }, + cleanStateText: { color: "#10B981", fontSize: 14, fontWeight: "500", textAlign: "center", marginVertical: 12 }, + cveCard: { + backgroundColor: "#0F172A", + borderRadius: 8, + padding: 12, + marginBottom: 12, + borderLeftWidth: 4, + borderLeftColor: "#38BDF8", + }, + cveHeader: { flexDirection: "row", justifyContent: "space-between", alignItems: "center" }, + cveId: { fontSize: 14, fontWeight: "bold", color: "#38BDF8" }, + badgeGroup: { flexDirection: "row", gap: 6 }, + miniBadge: { paddingHorizontal: 6, paddingVertical: 2, borderRadius: 4 }, + miniBadgeText: { color: "#FFFFFF", fontSize: 10, fontWeight: "bold" }, + cveTitle: { fontSize: 13, fontWeight: "600", color: "#F8FAFC", marginTop: 6 }, + cveDesc: { fontSize: 12, color: "#94A3B8", marginTop: 4 }, + sectionHeader: { fontSize: 12, fontWeight: "600", color: "#CBD5E1", marginTop: 8 }, + reasonText: { fontSize: 11, color: "#94A3B8", marginLeft: 4, marginTop: 2 }, + remediationBox: { + backgroundColor: "#1E293B", + borderRadius: 6, + padding: 8, + marginTop: 10, + borderWidth: 1, + borderColor: "#334155", + }, + remediationHeader: { fontSize: 11, fontWeight: "bold", color: "#38BDF8" }, + remediationText: { fontSize: 11, color: "#E2E8F0", marginTop: 2 }, +}); From afb697e48fe30db61ed4a172a50de5eabaf25d45 Mon Sep 17 00:00:00 2001 From: l2uler <335852737+CodePhrex@users.noreply.github.com> Date: Sun, 25 Oct 2026 11:03:26 -0700 Subject: [PATCH 14/14] Remove conflicting ledger class declaration from schema module --- privileged-action-ledger-schema.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/privileged-action-ledger-schema.ts b/privileged-action-ledger-schema.ts index d0162ad..4fc50d3 100644 --- a/privileged-action-ledger-schema.ts +++ b/privileged-action-ledger-schema.ts @@ -167,7 +167,4 @@ CREATE TABLE IF NOT EXISTS \`used_nonces\` ( ); `; -export class PrivilegedActionLedger { - static recordAction(...args: any[]): any { return {}; } - static record(...args: any[]): any { return {}; } -} +