more android clean up

This commit is contained in:
Egor 2026-01-25 21:47:55 -08:00
parent d69bf16165
commit 3b50d0e43d
12 changed files with 2 additions and 193 deletions

View file

@ -3,14 +3,8 @@ name: CI
on:
push:
branches: [master]
paths-ignore:
- 'android/**'
- '.github/workflows/android-ci.yml'
pull_request:
branches: [master]
paths-ignore:
- 'android/**'
- '.github/workflows/android-ci.yml'
jobs:
check:

View file

@ -1,65 +0,0 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Decode keystore
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
run: |
echo "$KEYSTORE_BASE64" | base64 -d > android/release.keystore
- name: Build Android APK
env:
KEYSTORE_FILE: ${{ github.workspace }}/android/release.keystore
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: sup-release
run: |
cd android
chmod +x gradlew
./gradlew assembleRelease --no-daemon
- name: Calculate checksums
id: checksums
run: |
APK_PATH="android/app/build/outputs/apk/release/app-release.apk"
SHA256=$(sha256sum "$APK_PATH" | awk '{print $1}')
echo "sha256=$SHA256" >> $GITHUB_OUTPUT
echo "apk_path=$APK_PATH" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: ${{ steps.checksums.outputs.apk_path }}
body: |
## Android App
**SHA256:** `${{ steps.checksums.outputs.sha256 }}`
**Certificate Fingerprint:**
```
0D:3C:99:15:0E:12:1A:DE:0D:AE:05:CB:16:46:5E:65:31:56:DC:D6:98:87:59:4E:79:B1:0D:AE:1E:56:F2:E8
```
Verify the certificate fingerprint in Obtainium before installing.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

8
.gitignore vendored
View file

@ -2,11 +2,3 @@ node_modules/
signal-cli
.env
sup-server
android/.gradle
android/.kotlin
android/local.properties
android/build/
android/*/build/
android/*.keystore
android/*.jks

View file

@ -1,8 +1,3 @@
{
"recommendations": [
"biomejs.biome",
"mathiasfrohlich.kotlin",
"vscjava.vscode-gradle",
"adelphes.android-dev-ext"
]
"recommendations": ["biomejs.biome", "mathiasfrohlich.kotlin", "vscjava.vscode-gradle"]
}

64
.vscode/tasks.json vendored
View file

@ -1,64 +0,0 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Android: Build Debug APK",
"type": "shell",
"command": "./gradlew",
"args": ["assembleDebug"],
"options": {
"cwd": "${workspaceFolder}/android"
},
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "Android: Install Debug APK",
"type": "shell",
"command": "./gradlew",
"args": ["installDebug"],
"options": {
"cwd": "${workspaceFolder}/android"
},
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "Android: Clean Build",
"type": "shell",
"command": "./gradlew",
"args": ["clean", "assembleDebug"],
"options": {
"cwd": "${workspaceFolder}/android"
},
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "Android: View Logs (Logcat)",
"type": "shell",
"command": "adb",
"args": ["logcat", "-s", "SUP:*"],
"options": {
"cwd": "${workspaceFolder}/android"
},
"isBackground": true,
"presentation": {
"reveal": "always",
"panel": "dedicated"
}
}
]
}

34
NOTICE
View file

@ -1,34 +0,0 @@
# SUP - Signal Unified Push
Copyright (c) 2026 LoneCloud
This product includes software developed by Philipp C. Heckel (ntfy)
Licensed under the Apache License 2.0
The Android application (android/) contains modified code from:
ntfy-android (https://github.com/binwiederhier/ntfy-android)
Copyright (c) 2021-2024 Philipp C. Heckel
Licensed under Apache License 2.0
Major modifications:
- Completely replaced HTTP/WebSocket polling with Signal-based push delivery
- Removed all user authentication, attachment downloads, and action buttons
- Removed Firebase, certificate pinning, and instant delivery features
- Simplified database schema (removed 4 tables, 17 fields)
- Removed ~1000+ lines of code for unused features
- Changed theme and branding
- Designed for privacy-focused, self-hosted personal use only
The original ntfy-android license is included below:
================================================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
[Full Apache 2.0 license text would go here]
================================================================================

View file

@ -162,8 +162,6 @@ notify:
name: SUP
resource: "http://<Your SUP server network IP>/Home Assistant"
method: POST
data:
package: "io.homeassistant.companion.android"
headers:
Authorization: !secret sup_basic_auth
```

View file

@ -10,7 +10,6 @@ services:
- API_KEY=${API_KEY:-}
- VERBOSE_LOGGING=${VERBOSE_LOGGING:-false}
- ALLOW_INSECURE_HTTP=${ALLOW_INSECURE_HTTP:-false}
- ENABLE_ANDROID_INTEGRATION=${ENABLE_ANDROID_INTEGRATION:-false}
- PROTON_IMAP_USERNAME=${PROTON_IMAP_USERNAME:-}
- PROTON_IMAP_PASSWORD=${PROTON_IMAP_PASSWORD:-}
- PROTON_BRIDGE_HOST=protonmail-bridge

View file

@ -9,7 +9,6 @@ services:
- VERBOSE_LOGGING=${VERBOSE_LOGGING:-false}
- ALLOW_INSECURE_HTTP=${ALLOW_INSECURE_HTTP:-false}
- RATE_LIMIT=${RATE_LIMIT:-100}
- ENABLE_ANDROID_INTEGRATION=${ENABLE_ANDROID_INTEGRATION:-false}
- PROTON_IMAP_USERNAME=${PROTON_IMAP_USERNAME:-}
- PROTON_IMAP_PASSWORD=${PROTON_IMAP_PASSWORD:-}
- PROTON_BRIDGE_HOST=protonmail-bridge

View file

@ -35,7 +35,6 @@ async function sendNotification(from: string, subject: string) {
const groupId = await getOrCreateGroup(`proton-${PROTON_SUP_TOPIC}`, PROTON_SUP_TOPIC);
await sendGroupMessage(groupId, subject, {
androidPackage: 'ch.protonmail.android',
title: from,
});

View file

@ -142,7 +142,7 @@ export async function createGroup(name: string, members: string[] = []) {
export async function sendGroupMessage(
groupId: string,
message: string,
options?: { androidPackage?: string; title?: string },
options?: { title?: string },
) {
let formattedMessage = message;

View file

@ -31,14 +31,11 @@ ntfy.post('/:topic', async (c) => {
const contentType = c.req.header('content-type') || '';
let title: string | undefined =
c.req.header('X-Title') || c.req.header('Title') || c.req.header('t') || undefined;
let androidPackage: string | undefined =
c.req.header('X-Package') || c.req.header('Package') || c.req.header('p') || undefined;
if (contentType.includes('application/x-www-form-urlencoded')) {
const params = new URLSearchParams(message);
message = params.get('message') || message;
title = title || params.get('title') || params.get('t') || undefined;
androidPackage = androidPackage || params.get('package') || params.get('p') || undefined;
}
if (title === topic) title = undefined;
@ -46,7 +43,6 @@ ntfy.post('/:topic', async (c) => {
const groupId = await getOrCreateGroup(`ntfy-${topic}`, topic);
await sendGroupMessage(groupId, message, {
androidPackage: androidPackage || undefined,
title: title || undefined,
});