NB: assumes signed APK from upstream named upstream-release.apk
, and unsigned
APK from F-Droid CI named fdroiddata-ci.apk
.
NB: also assumes a working directory in which it is okay to create temporary files & directories.
python3 -c $'import sys\nfor line in sorted(sys.stdin, key=lambda x: [int(n) for n in x[1:].split("-")[0].split(".")]): print(line, end="")' |
import java.util.Currency | |
Currency.availableCurrencies.each { | |
println "${it.getCurrencyCode()}=${it.getSymbol()}" | |
} |
#!/usr/bin/python3 | |
# encoding: utf-8 | |
# SPDX-FileCopyrightText: 2023 FC Stegerman <[email protected]> | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
from typing import Iterable, Iterator, List, Tuple | |
INDENT_SPACE = {" ", "│ ", "| "} | |
INDENT_FINAL = {"└── ", "├── ", "`-- ", "|-- "} |
#!/usr/bin/python3 | |
import sys | |
from androguard.core.bytecodes import apk | |
with open(sys.argv[1], "rb") as fh: | |
data = fh.read() | |
apk.ARSCParser(data).stringpool_main.show() |
// See https://developer.android.com/studio/publish/app-signing#secure-shared-keystore | |
def keystorePropertiesFile = rootProject.file("keystore.properties") | |
def keystoreProperties | |
def signedReleases = keystorePropertiesFile.exists() | |
if (signedReleases) { | |
println("Using ${keystorePropertiesFile} for release signingConfig...") | |
keystoreProperties = new Properties() | |
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) | |
} |
[global] | |
break-system-packages = true | |
no-index = true | |
index-url = https://localhost/do-not-use-pypi |
Signatures made by older versions of AGP cannot be copied by apksigcopier
because the signing method differs too much from that used by apksigner
(and signflinger
in newer versions).
It is unlikely that support for these signatures will be added.
The v1 (JAR) signature files are always added at the end of the ZIP file by apksigner
and apksigcopier
; these older versions add them in a different position and sometimes the order of the ZIP entries in the central directory doesn't match the order of the entries in the file.
import java.util.zip.ZipInputStream | |
def zis = new ZipInputStream(new FileInputStream(args[0])) | |
def entryCounter = 0 | |
while (temp = zis.getNextEntry()) { | |
entryCounter++ | |
if (!temp.name && !temp.size) { | |
println "Found virtual entry #${entryCounter}" | |
} | |
} |