F-Droid Devs

115 Members
F-Droid development discussion only | Use #fdroid:f-droid.org for general, app- and repo-related matters | Meeting every Thursday at 11:30 UTC | This channel is publicly logged at https://matrix.f-droid.org/alias/%23fdroid-dev:f-droid.org 19 Servers

Load older messages


SenderMessageTime
22 Sep 2020
@freenode_cdesai:matrix.orgcdesaiAnd https://android.googlesource.com/platform/tools/apksig/+/refs/heads/master/src/main/java/com/android/apksig/internal/zip/09:49:18
@freenode_mimi89999:matrix.orgmimi89999 That's much more complicated than I thought. 09:57:37
@freenode_mimi89999:matrix.orgmimi89999Does not verify10:02:14
@freenode_mimi89999:matrix.orgmimi89999But apksigner might have aligned and reordered my zip.10:03:20
@eighthave:matrix.org_hcthere are two ordered places in a ZIP: the file entries in the ZIP header and the actual data. The ZIP header can be rewritten easily. The actual data basically needs to be reconstructed from scratch to reorder it10:19:49
@eighthave:matrix.org_hc mimi89999: have you looked at any of the Python libs that do JAR signing? It might be helpful 10:21:01
@eighthave:matrix.org_hcthere are also some relevant issues: https://gitlab.com/fdroid/fdroidserver/-/issues?scope=all&utf8=%E2%9C%93&state=opened&label_name[]=apksig10:23:51
@freenode_wb9688:matrix.orgwb9688mimi89999: Once you have something working that I could test, please ping me10:24:33
@freenode_mimi89999:matrix.orgmimi89999There is that code under the MR10:25:04
@eighthave:matrix.org_hcalso, I think androguard has some code to parse APK sigs10:25:34
@freenode_mimi89999:matrix.orgmimi89999https://gitlab.com/fdroid/fdroidserver/-/issues/55110:26:16
@freenode_mimi89999:matrix.orgmimi89999https://gitlab.com/fdroid/fdroidserver/-/issues/40410:26:22
@freenode_mimi89999:matrix.orgmimi89999 > there isn't really a clear standard for the file order in APKs 10:26:50
@freenode_mimi89999:matrix.orgmimi89999Hmm10:26:52
@freenode_mimi89999:matrix.orgmimi89999AndroidManifest.xml10:27:27
@eighthave:matrix.org_hcI guess the standard would be what the latest Android SDK tools do10:27:31
@freenode_mimi89999:matrix.orgmimi89999Always got that one first10:27:34
@freenode_mimi89999:matrix.orgmimi89999 The code is huge and I can't find what I'm searching form 10:29:15
@freenode_cdesai:matrix.orgcdesaiyou can use https://cs.android.com/android/platform/superproject/+/master:tools/apksig/ for AOSP10:37:52
@freenode_mimi89999:matrix.orgmimi89999The signer seems to add the `META-INF/CERT.SF`, `META-INF/CERT.RSA` and `META-INF/MANIFEST.MF` files at the end.10:49:12
@freenode_mimi89999:matrix.orgmimi89999That would make sense. It makes it easy to append them to the zip and might make it easier to read them.10:49:46
@freenode_mimi89999:matrix.orgmimi89999What was the URL of F-Droid reproducible builds?10:55:56
@eighthave:matrix.org_hcthere is a page in the docs?11:21:17
@freenode_mimi89999:matrix.orgmimi89999 https://cs.android.com/android/platform/superproject/+/master:tools/apksig/src/main/java/com/android/apksig/internal/apk/v1/V1SchemeSigner.java?q=MANIFEST_ENTRY_NAME&ss=android%2Fplatform%2Fsuperproject:tools%2Fapksig%2F 11:28:32
@freenode_mimi89999:matrix.orgmimi89999There is this. I will order the files in the same way11:28:46
@eighthave:matrix.org_hc mimi89999: one tricky bit is that Java JAR format says that META-INF/MANIFEST.MF should be first https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8031748 11:38:07
@eighthave:matrix.org_hcso APKs signed by jarsigner will likely have that order11:38:20
@freenode_mimi89999:matrix.orgmimi89999But apksigner puts that last11:52:54
@eighthave:matrix.org_hcyeah so for APKs with v2/v3 it should follow apksigner, for v1 only, it might need to follow Java JAR. Or I guess it could follow apksigner for all those cases12:08:31
@freenode_wb9688:matrix.orgwb9688_hc: What about v1+v2?12:13:38

Show newer messages


Back to Room ListRoom Version: 1