Skip to content

Commit ba50361

Browse files
committed
sign apks
1 parent acc5f6f commit ba50361

File tree

4 files changed

+39
-5
lines changed

4 files changed

+39
-5
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
.gradle/
22
build/
3+
signing.keystore*
4+
/org.playhex.twa*
5+
apks/*.idsig

README.md

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,32 @@ It is needed at least for F-Droid to build apk and add it in its store.
1010
https://hub.docker.com/r/mingc/android-build-box/
1111

1212
``` bash
13-
docker run --rm -v `pwd`:/project mingc/android-build-box bash
13+
docker run -it --rm -v `pwd`:/project mingc/android-build-box bash
1414

1515
# build aab
1616
./gradlew bundle
1717
```
1818

19+
### Sign
20+
21+
Sign apk with my signature.
22+
23+
Given `.apk` and `signing.keystore` are in same folder:
24+
25+
``` bash
26+
docker run -it --rm -v `pwd`:/project mingc/android-build-box bash
27+
28+
# sign
29+
/opt/android-sdk/build-tools/36.0.0/apksigner sign \
30+
--ks signing.keystore \
31+
org.playhex.twa_2025090823.apk
32+
33+
# verify
34+
/opt/android-sdk/build-tools/36.0.0/apksigner verify \
35+
--verbose --print-certs-pem --min-sdk-version 24 \
36+
org.playhex.twa_2025090823.apk
37+
```
38+
1939
## Rebuild TWA android app
2040

2141
Generates apk and source code.
@@ -60,7 +80,17 @@ To update on F-Droid:
6080

6181
- commit and push
6282
- Fork and clone `git@gitlab.com:fdroid/fdroiddata.git`
63-
- Add in `metadata/org.playhex.twa.yml`:
83+
- Fork and clone `git@gitlab.com:fdroid/fdroidserver.git`
84+
85+
Folder structure must be like:
86+
87+
```
88+
|- (current) playhex-android-app/
89+
|- fdroiddata/
90+
|- fdroidserver/
91+
```
92+
93+
- Add in `../fdroiddata/metadata/org.playhex.twa.yml`:
6494

6595
``` yml
6696
- versionName: 1.0.0.3 # update
@@ -71,7 +101,7 @@ To update on F-Droid:
71101
- yes
72102
```
73103
74-
- Edit in fdroiddata `config.yml`:
104+
- Edit in `../fdroiddata/config.yml`:
75105

76106
``` yaml
77107
serverwebroot: /tmp
@@ -81,8 +111,8 @@ serverwebroot: /tmp
81111

82112
``` bash
83113
docker run --rm -itu vagrant --entrypoint /bin/bash \
84-
-v /__YOUR_FOLDER__/dev/fdroiddata:/build:z \
85-
-v /__YOUR_FOLDER__/dev/fdroidserver:/home/vagrant/fdroidserver:Z \
114+
-v $(pwd)/../fdroiddata:/build:z \
115+
-v $(pwd)/../fdroidserver:/home/vagrant/fdroidserver:Z \
86116
registry.gitlab.com/fdroid/fdroidserver:buildserver
87117
88118
. /etc/profile
@@ -91,6 +121,7 @@ export JAVA_HOME=$(java -XshowSettings:properties -version 2>&1 > /dev/null | gr
91121
cd /build
92122
93123
mkdir -p /tmp/repo/status
124+
sudo chmod 600 config.yml
94125
95126
fdroid readmeta
96127
fdroid rewritemeta org.playhex.twa
912 KB
Binary file not shown.
912 KB
Binary file not shown.

0 commit comments

Comments
 (0)