How do I sign an APK with the system key using SingApk.jar?

I need to sign an APK using the system keys obtained from Google's source (As an example) using SignApk.jar. However, everytime we try to Sign we get the error below...
This is the command we are using (Please note we are using the Source code downloaded from Google for Android 8.1 for the Pixel).

Besides this method, is there another way to sign an APK with the system key?

java -Xmx2048m -Djava.library.path="out/host/linux-x86/lib64" -jar prebuilts/sdk/tools/lib/signapk.jar -w build/make/target/product/security/platform.x509.pem build/make/target/product/security/platform.pk8 Unsigned-Apk.apk Signed_final_apk.apk

Error: Exception in thread "main" java.lang.ExceptionInInitializerError
at org.conscrypt.OpenSSLBIOInputStream.<init>(OpenSSL
at org.conscrypt.OpenSSLX509Certificate.fromX509PemIn putStream(
at org.conscrypt.OpenSSLX509CertificateFactory$1.from X509PemInputStream(OpenSSLX509CertificateFactory.j ava:220)
at org.conscrypt.OpenSSLX509CertificateFactory$1.from X509PemInputStream(OpenSSLX509CertificateFactory.j ava:216)
at org.conscrypt.OpenSSLX509CertificateFactory$Parser .generateItem( 4)
at org.conscrypt.OpenSSLX509CertificateFactory.engine GenerateCertificate(OpenSSLX509CertificateFactory. java:272)
at ificate(
at java:184)
at )
Caused by: java.lang.IllegalArgumentException: Failed to load any of the given libraries: [conscrypt_openjdk_jni-osx-x86_64, conscrypt_openjdk_jni]
at org.conscrypt.NativeLibraryLoader.loadFirstAvailab le(
at org.conscrypt.NativeCryptoJni.init(NativeCryptoJni .java:49)
at org.conscrypt.NativeCrypto.<clinit>(NativeCrypto.j ava:53)
... 9 more

Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by lessie74
1 hour ago
Last post by leanna.hahn
3 hours ago
Last post by okey.labadie
1 hour ago
Last post by dwight07
23 minutes ago
Last post by willis.stanton
3 hours ago
Last post by ibalistreri
3 hours ago
Last post by howard13
2 hours ago