乐趣区

关于android:aosp-编译过程中Jack-server-SSL-error-错误解决方法

原文: https://balalals.cn/archives/… 可能更新不及时,取得残缺的浏览体验可浏览原文


编译 aosp 大概率会呈现 jack server 跑不起来而后抛一个相似这样的谬误

[10% 538/4980] Ensuring Jack server is installed and started
FAILED: setup-jack-server 
/bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar  2>&1 || (exit 0) ) && (JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation\"prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 4.11.ALPHA 2>&1 || exit 0) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-4.32.CANDIDATE.jar 4.32.CANDIDATE || exit 47)"
Jack server already installed in "/home/user/.jack-server"
Communication error with Jack server (35), try 'jack-diagnose' or see Jack server log
SSL error when connecting to the Jack server. Try 'jack-diagnose'
SSL error when connecting to the Jack server. Try 'jack-diagnose'
[10% 541/4980] build out/target/product/rk3399_mid/obj/ETC/precompiled_sepolicy_intermediates/precompiled_sepolicy
ninja: build stopped: subcommand failed.
22:32:18 ninja failed with: exit status 1

#### failed to build some targets (01:11 (mm:ss)) ####

Build android failed!

起因就是编译时用的是 open-jdk 8u292,默认禁用了 TLSv1, TLSv1.1,
从 /etc/java-8-openjdk/security/java.security 中勾销 TLSv1, TLSv1.1 禁用,
批改前
批改后:

jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, \
    DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
    include jdk.disabled.namedCurves

aosp/prebuilts/sdk/tools/ 目录下执行./jack-admin kill-server && ./jack-admin start-server 胜利。

退出移动版