Skip to content

Instantly share code, notes, and snippets.

View obfusk's full-sized avatar
🏳️‍🌈
hacking ⇒ ¬sleeping 😸

FC (Fay) Stegerman obfusk

🏳️‍🌈
hacking ⇒ ¬sleeping 😸
View GitHub Profile
@obfusk
obfusk / cat_sigblock.py
Last active February 3, 2024 23:35
APK signing block manipulation scripts
#!/usr/bin/python3
# encoding: utf-8
# SPDX-FileCopyrightText: 2024 FC (Fay) Stegerman <[email protected]>
# SPDX-License-Identifier: GPL-3.0-or-later
import apksigtool
import dataclasses
import sys
# Usage: cat_sigblock.py [--prepend] APK_A APK_B
@obfusk
obfusk / leaving-fdroid.md
Last active January 1, 2024 09:24
Leaving F-Droid

Edit: originally posted here on 2023-11-17.

Edit 2: "blocking protecting marginalised community members from abuse" refers to the events during the incident (which was never made public, which unfortunately leaves me unable to provide more detail) that prompted the creation of the Community Council to begin with.

Edit 3: please note that this statement was originally addressed to the F-Droid team, not a general audience.

Leaving F-Droid

With a heavy heart, I have no choice but to leave @fdroid, effective immediately.

@obfusk
obfusk / screen-quit.sh
Created October 24, 2023 21:45
quit screen session after command finishes successfully
do_stuff && screen -X -S $( screen -ls | awk '{print $1}' | grep "^$PPID\." ) quit
@obfusk
obfusk / catima-locale-diff.sh
Last active October 23, 2023 00:51
diff locales for catima
#!/bin/bash
diff -Naur \
<( sed -n '/name="locale_values"/,/string-array/p' < app/src/main/res/values/settings.xml \
| grep '<item>' | sed -r 's!.*>(.*)<.*!\1!' | sort | grep -v '^en$' ) \
<( ls app/src/main/res/values-* -d | sed 's!.*values-!!' | grep -Ev 'night|w600dp' ) \
| bat -p -l diff
@obfusk
obfusk / index-curl-jq.sh
Created October 4, 2023 22:38
a few f-droid index curl + jq commands
curl -s https://f-droid.org/repo/index-v2.json | ...
... | jq -r '.packages[] | [.versions[]] | max_by(.manifest.versionCode) | .manifest.usesSdk.targetSdkVersion' | sort -n | uniq -c
... | jq -r '.packages | to_entries[] | select([.value.versions[]] | max_by(.manifest.versionCode) | .manifest.usesSdk.targetSdkVersion < 23) | select(.value.metadata.lastUpdated/1000 > now-365/2*24*3600) | .key' | wc -l
@obfusk
obfusk / strings.sh
Last active September 29, 2023 00:45
safer (but also much slower) strings command
#!/bin/bash
LC_ALL=C exec grep -ahPo '[\x09\x20-\x7E]{4,}' -- "$@"
@obfusk
obfusk / .gitignore
Last active June 24, 2024 17:36
-> https://github.com/obfusk/fdroid-mirrors-timestamp | check f-droid mirrors' timestamps
/fdroid-statuspage-deployment
@obfusk
obfusk / indexdiff.py
Last active September 27, 2023 17:06
diff f-droid v2 index (new apps & versions)
#!/usr/bin/python3
import json
from typing import Any, Dict, Iterable, List, Set, Tuple
def packages(data: Dict[str, Any]) -> Dict[str, str]:
d = {}
for k, v in data["packages"].items():
m = v["metadata"]
@obfusk
obfusk / h2-to-h3.js
Created September 5, 2023 19:43
replace all but the first h2 with h3 using JS
[...document.getElementsByTagName("h2")].forEach((x, i) => { if (i > 0) { y = document.createElement("h3"); y.innerHTML = x.innerHTML; x.parentNode.replaceChild(y, x) } })

If this app -- which many people had no choice but to rely on -- was supposed to be open source, then IMO it failed.

You had F-Droid maintainers willing to help bring the app to F-Droid and thus make it available to people without being forced to use the Play Store and accept Google's terms of service; however:

The code may use an open-source license, but the images are not redistributable

Finally – The EUPL 1.2 and the CC0 do not apply to photos, videos, infographics or other forms of images. It is therefore not permitted to reuse or transfer the image, unless the image explicitly states that it is permitted or you have received written permission of the Dutch Government. Such permission will not be withheld on unreasonable grounds.

I asked for permission several times but never received a reply. So the app had to be forked -- and looked much worse without the images -- for no good reason.