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
簽名成功!
相關文章
- 簽名apkAPK
- Android空包Apk簽名AndroidAPK
- Apk 簽名的那些事APK
- 簽名打包Android版apkAndroidAPK
- Android之重新簽名APKAndroidAPK
- apk空包簽名方法及工具APK
- Android APK V1 簽名原理AndroidAPK
- 為IONIC開發的安卓apk簽名安卓APK
- Android加固之後Apk重簽名AndroidAPK
- Android 生成簽名apk與多渠道打包AndroidAPK
- User模式下內建apk做重簽名.模式APK
- win10 驅動簽名 報錯,Error =52Win10Error
- Android APK簽名原理和過程詳解AndroidAPK
- 獲取APK檔案的簽名資訊,反射實現APK反射
- apk簽名相關文章APK
- Visual Studio 2017為Android APK包簽名AndroidAPK
- 【Android自動化打包】03. APK的數字簽名AndroidAPK
- Postman除錯技巧之介面簽名Postman除錯
- iOS簽名、iOS企業簽名、iOS超級簽名工具使用iOS
- 蘋果企業簽名多少錢-ios企業簽名-企業簽名蘋果iOS
- 分享一個自動編譯,打包,簽名 android apk 的小指令碼編譯AndroidAPK指令碼
- 群簽名與環簽名的介紹
- 環簽名
- Pressone 簽名
- 簽名錄
- 【Brussel】簽名
- 簽名修改
- Android APK命令列實現V1、V2簽名及驗證AndroidAPK命令列
- iOS逆向——應用簽名及重簽名原理iOS
- iOS證書籤名機制&重簽名&防止重簽名iOS
- 蘋果簽名該怎麼去選擇呢?iOS企業簽名-企業簽名蘋果iOS
- 工行銀企直連簽名報文亂碼
- 蘋果簽名推薦,如何選擇蘋果簽名者蘋果
- Android 命令列構建和簽署APKAndroid命令列APK
- 遇到程式碼簽名證書出錯怎麼辦
- Android Studio 使用正式簽名進行除錯Android除錯
- 蘋果ios簽名蘋果iOS
- 手寫簽名