gpt4 book ai didi

android - apksigner 不接受密码

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:07:14 27 4
gpt4 key购买 nike

到目前为止,我一直使用以下方法对我的 apk 进行签名:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore {keystore-file} {apk-file} {keystore-alias}

但是我正在尝试使用新的 apksigner 工具,但我无法让它工作,因为它总是告诉我密码无效。这是不可能的,因为我已经做过多次了,jarsigner 有效而 apksigner 无效。我尝试过的命令如下:

apksigner sign --ks {keystore-file} {apk-file}

apksigner sign --ks {keystore-file} --ks-key-alias {keystore-alias} {apk-file}

现在最奇怪的部分出现了,我创建了一个新的 keystore 来测试它,并且有了这个新的 keystore ,它就可以正常工作了。所以我不明白有什么区别。这是通过在两者上调用“keytool -v -list -keystore {keystore-file}”获得的信息。

生产 keystore (我删除了一些文本以防这很危险):

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: {keystore-alias}
Creation date: Apr 4, 2016
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN={removed-text}, OU={removed-text}, O={removed-text}, L=Unknown, ST=Unknown, C=Unknown
Issuer: CN={removed-text}, OU={removed-text}, O={removed-text}, L=Unknown, ST=Unknown, C=Unknown
Serial number: {removed-text}
Valid from: Mon Apr 04 12:39:50 CEST 2016 until: Fri Aug 21 12:39:50 CEST 2043
Certificate fingerprints:
MD5: {removed-text}
SHA1: {removed-text}
SHA256: {removed-text}
Signature algorithm name: SHA256withRSA
Version: 3

Extensions:

#1: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: {removed-text}
0010: {removed-text} {removed-text} ....
]
]



*******************************************
*******************************************

新的测试 keystore :

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: app
Creation date: Nov 17, 2016
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Foobar, OU=Foobar, O=foobar, L=Unknown, ST=Unknown, C=Unknown
Issuer: CN=Foobar, OU=Foobar, O=foobar, L=Unknown, ST=Unknown, C=Unknown
Serial number: 448c7afc
Valid from: Thu Nov 17 11:40:26 CET 2016 until: Mon Apr 04 12:40:26 CEST 2044
Certificate fingerprints:
MD5: 3E:29:C0:3C:30:B4:DC:E0:A5:94:1D:2E:E9:86:58:CA
SHA1: 3D:09:B4:42:A2:7C:14:C7:3E:54:33:0E:AB:75:2E:F1:19:23:00:FA
SHA256: 7F:E0:51:F1:6A:53:45:56:42:B9:F9:38:92:69:81:7A:DA:71:FF:44:51:15:7F:F9:B4:1C:AA:2B:53:4A:89:72
Signature algorithm name: SHA256withRSA
Version: 3

Extensions:

#1: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: BC 1B E6 C4 6D 25 01 70 CA AC 81 34 81 4B AE 41 ....m%.p...4.K.A
0010: 10 DF D8 13 ....
]
]



*******************************************
*******************************************

最佳答案

这样使用

./apksigner sign --ks test.jks --ks-key-alias test --ks-pass pass:testtest --key-pass pass:testtest Test_Aligned.apk

关于android - apksigner 不接受密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40653492/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com