APK簽名報錯
使用的jar:$CODE/out/host/linux-x86/framework/signapk.jar
簽名命令1:java -jar signapk.jar platform.x509.pem platform.pk8 Apk_To_Be_sign.apk Apk_Signed.apk
使用命令1簽名報錯:
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.conscrypt.OpenSSLBIOInputStream.<init>(OpenSSLBIOInputStream.java:34)
at org.conscrypt.OpenSSLX509Certificate.fromX509PemInputStream(OpenSSLX509Certificate.java:129)
at org.conscrypt.OpenSSLX509CertificateFactory$1.fromX509PemInputStream(OpenSSLX509CertificateFactory.java:226)
at org.conscrypt.OpenSSLX509CertificateFactory$1.fromX509PemInputStream(OpenSSLX509CertificateFactory.java:222)
at org.conscrypt.OpenSSLX509CertificateFactory$Parser.generateItem(OpenSSLX509CertificateFactory.java:100)
at org.conscrypt.OpenSSLX509CertificateFactory.engineGenerateCertificate(OpenSSLX509CertificateFactory.java:278)
at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:339)
at com.android.signapk.SignApk.readPublicKey(SignApk.java:184)
at com.android.signapk.SignApk.main(SignApk.java:1007)
Caused by: java.lang.IllegalArgumentException: Failed to load any of the given libraries: [conscrypt_openjdk_jni-linux-x86_64, conscrypt_openjdk_jni-linux-x86_64-fedora, conscrypt_openjdk_jni]
at org.conscrypt.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:176)
at org.conscrypt.NativeCryptoJni.init(NativeCryptoJni.java:49)
at org.conscrypt.NativeCrypto.<clinit>(NativeCrypto.java:53)
可以看見報錯說少了[conscrypt_openjdk_jni-linux-x86_64, conscrypt_openjdk_jni-linux-x86_64-fedora, conscrypt_openjdk_jni]
因為這個檔案在prebuilts/sdk/tools/linux/lib64下面,於是使用命令2,多加了-Djava.ibrary.path引數:
java -Djava.library.path=prebuilts/sdk/tools/linux/lib64
-jar signapk.jar platform.x509.pem platform.pk8 Apk_To_Be_sign.apk Apk_Signed.apk
報錯:
FATAL ERROR in native method: RegisterNatives failed for 'org/conscrypt/NativeCrypto'; aborting...
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
- locked <0x0000000580106818> (a java.util.Vector)
- locked <0x0000000580143958> (a java.util.Vector)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
- locked <0x000000058011a438> (a java.lang.Runtime)
at java.lang.System.loadLibrary(System.java:1122)
at org.conscrypt.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.conscrypt.NativeLibraryLoader$1.run(NativeLibraryLoader.java:272)
at java.security.AccessController.doPrivileged(Native Method)
at org.conscrypt.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:264)
at org.conscrypt.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:252)
at org.conscrypt.NativeLibraryLoader.load(NativeLibraryLoader.java:197)
at org.conscrypt.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:169)
at org.conscrypt.NativeCryptoJni.init(NativeCryptoJni.java:49)
at org.conscrypt.NativeCrypto.<clinit>(NativeCrypto.java:53)
at org.conscrypt.OpenSSLBIOInputStream.<init>(OpenSSLBIOInputStream.java:34)
at org.conscrypt.OpenSSLX509Certificate.fromX509PemInputStream(OpenSSLX509Certificate.java:129)
at org.conscrypt.OpenSSLX509CertificateFactory$1.fromX509PemInputStream(OpenSSLX509CertificateFactory.java:226)
at org.conscrypt.OpenSSLX509CertificateFactory$1.fromX509PemInputStream(OpenSSLX509CertificateFactory.java:222)
at org.conscrypt.OpenSSLX509CertificateFactory$Parser.generateItem(OpenSSLX509CertificateFactory.java:100)
at org.conscrypt.OpenSSLX509CertificateFactory.engineGenerateCertificate(OpenSSLX509CertificateFactory.java:278)
at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:339)
at com.android.signapk.SignApk.readPublicKey(SignApk.java:184)
at com.android.signapk.SignApk.main(SignApk.java:1007)
解決方法
-Djava.ibrary.path引數路徑使用out/host/linux-x86/lib
:
java -Djava.library.path=out/host/linux-x86/lib -jar signapk.jar platform.x509.pem platform.pk8 Apk_To_Be_sign.apk Apk_Signed.apk
簽名成功!
相關文章
- Android空包Apk簽名AndroidAPK
- Android之重新簽名APKAndroidAPK
- Apk 簽名的那些事APK
- 簽名打包Android版apkAndroidAPK
- Android加固之後Apk重簽名AndroidAPK
- win10 驅動簽名 報錯,Error =52Win10Error
- Postman除錯技巧之介面簽名Postman除錯
- Android APK命令列實現V1、V2簽名及驗證AndroidAPK命令列
- iOS簽名、iOS企業簽名、iOS超級簽名工具使用iOS
- 蘋果企業簽名多少錢-ios企業簽名-企業簽名蘋果iOS
- 群簽名與環簽名的介紹
- Pressone 簽名
- 簽名修改
- 環簽名
- iOS逆向——應用簽名及重簽名原理iOS
- iOS證書籤名機制&重簽名&防止重簽名iOS
- 安卓簽名檔案打包錯誤 Invalid keystore format安卓ORM
- 遇到程式碼簽名證書出錯怎麼辦
- react native 安裝app時報錯 ”已安裝了簽名衝突的應用“React NativeAPP
- 蘋果簽名該怎麼去選擇呢?iOS企業簽名-企業簽名蘋果iOS
- Android v1 簽名 和 v2+ 簽名Android
- 超級簽名是什麼?超級簽名跟企業簽名有什麼區別?
- iOSApp重簽名iOSAPP
- iOSApp簽名原理iOSAPP
- 【Vue】 簽名元件Vue元件
- canvas簽名效果Canvas
- 手寫簽名
- 工行銀企直連簽名報文亂碼
- kali更新源數字簽名錯誤解決辦法
- C# 啟動程式提示簽名時出錯: 未能對 binx86Debugapp.publish*.exe 簽名。 SignTool Error: No certificates weC#APPError
- 電子簽名與手寫簽名的區別,電子簽名的優勢是什麼?
- 蘋果企業簽名—ios簽名的演算法形式蘋果iOS演算法
- iOS逆向 應用重簽名+微信重簽名實戰iOS
- 蘋果簽名推薦,如何選擇蘋果簽名者蘋果
- ActiveX控制元件數字簽名實踐(免費簽名)控制元件
- tkinter調取簽名網而設計簽名頁面(十七)
- 程式碼簽名、驅動簽名的常見問題解答
- 程式碼簽名證書出錯的原因及解決方法