android源码添加adb host支持

本文开始参考在 android 上使用 adb client-CSDN博客,在shell中已经可以使用。但当我想在app中用

String command = "/data/local/tmp/adb -s 307ef90dc8128844 shell ls";

        StringBuilder output = new StringBuilder();

        try {
            Process process = Runtime.getRuntime().exec(command);
            BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));

            String line;
            while ((line = reader.readLine()) != null) {
                output.append(line).append("\n");
            }

            reader.close();

        } catch (Exception e) {
            e.printStackTrace();
        }

来调用已经编译好的adb时,服务由于没有权限操作usb,没办法对连接到usb上的adb device设备进行操作,发现不了该设备,必须要先用root权限先启动adb server后才能使用。

为了解决该问题,我决定把adb host的应用通过android源码编译,并加载到开机启动服务中。

在android源码中编译adb host,部分步骤可以参考android源码添加c/c++工程-CSDN博客

adb的源码使用在前面参考文章中的源码,由于使用名称adb与原有android中的工程冲突,改名为adbhost(大家可以随意改,看大家心情)。同时由于内置的libssl不知道抽什么风,老是报函数BIO_f_base64无法找到,干脆把openssl源码也直接编译进去。

Android.bp如下:

// Copyright 2013 The Android Open Source Project

package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

cc_binary {
    name: "adbhost",
    srcs: [
            "core/adb/adb.c",
            "core/adb/adb_client.c",
            "core/adb/adb_auth_host.c",
            "core/adb/commandline.c",
            "core/adb/console.c",
            "core/adb/file_sync_client.c",
            "core/adb/fdevent.c",
            "core/adb/get_my_path_linux.c",
            "core/adb/services.c",
            "core/adb/sockets.c",
            "core/adb/transport.c",
            "core/adb/transport_local.c",
            "core/adb/transport_usb.c",
            "core/adb/usb_linux.c",
            "core/adb/usb_vendors.c",
            "core/adb/utils.c",

            "core/libcutils/abort_socket.c",
            "core/libcutils/socket_inaddr_any_server.c",
            "core/libcutils/socket_local_client.c",
            "core/libcutils/socket_local_server.c",
            "core/libcutils/socket_loopback_client.c",
            "core/libcutils/socket_loopback_server.c",
            "core/libcutils/socket_network_client.c",
            "core/libcutils/list.c",
            "core/libcutils/load_file.c",

            "core/libzipfile/centraldir.c",
            "core/libzipfile/zipfile.c",

            "openssl-1.0.0e/ssl/d1_pkt.c",
            "openssl-1.0.0e/ssl/d1_both.c",
            "openssl-1.0.0e/ssl/s3_srvr.c",
            "openssl-1.0.0e/ssl/s2_meth.c",
            "openssl-1.0.0e/ssl/ssl_asn1.c",
            "openssl-1.0.0e/ssl/s23_pkt.c",
            "openssl-1.0.0e/ssl/s23_lib.c",
            "openssl-1.0.0e/ssl/s2_lib.c",
            "openssl-1.0.0e/ssl/ssl_err.c",
            "openssl-1.0.0e/ssl/s3_lib.c",
            "openssl-1.0.0e/ssl/t1_reneg.c",
            "openssl-1.0.0e/ssl/s3_meth.c",
            "openssl-1.0.0e/ssl/s3_clnt.c",
            "openssl-1.0.0e/ssl/d1_enc.c",
            "openssl-1.0.0e/ssl/s2_enc.c",
            "openssl-1.0.0e/ssl/t1_enc.c",
            "openssl-1.0.0e/ssl/ssl_sess.c",
            "openssl-1.0.0e/ssl/s23_meth.c",
            "openssl-1.0.0e/ssl/s2_clnt.c",
            "openssl-1.0.0e/ssl/kssl.c",
            "openssl-1.0.0e/ssl/t1_meth.c",
            "openssl-1.0.0e/ssl/t1_lib.c",
            "openssl-1.0.0e/ssl/d1_srvr.c",
            "openssl-1.0.0e/ssl/ssl_stat.c",
            "openssl-1.0.0e/ssl/ssl_rsa.c",
            "openssl-1.0.0e/ssl/ssl_err2.c",
            "openssl-1.0.0e/ssl/s3_enc.c",
            "openssl-1.0.0e/ssl/d1_lib.c",
            "openssl-1.0.0e/ssl/t1_clnt.c",
            "openssl-1.0.0e/ssl/t1_srvr.c",
            "openssl-1.0.0e/ssl/s3_both.c",
            "openssl-1.0.0e/ssl/s2_srvr.c",
            "openssl-1.0.0e/ssl/ssl_cert.c",
            "openssl-1.0.0e/ssl/s3_pkt.c",
            "openssl-1.0.0e/ssl/d1_meth.c",
            "openssl-1.0.0e/ssl/d1_clnt.c",
            "openssl-1.0.0e/ssl/ssl_algs.c",
            "openssl-1.0.0e/ssl/s23_srvr.c",
            "openssl-1.0.0e/ssl/s2_pkt.c",
            "openssl-1.0.0e/ssl/s23_clnt.c",
            "openssl-1.0.0e/ssl/bio_ssl.c",
            "openssl-1.0.0e/ssl/ssl_lib.c",
            "openssl-1.0.0e/ssl/ssl_txt.c",
            "openssl-1.0.0e/ssl/ssl_ciph.c",
            "openssl-1.0.0e/crypto/stack/stack.c",
            "openssl-1.0.0e/crypto/o_time.c",
            "openssl-1.0.0e/crypto/dsa/dsa_ossl.c",
            "openssl-1.0.0e/crypto/dsa/dsa_pmeth.c",
            "openssl-1.0.0e/crypto/dsa/dsa_key.c",
            "openssl-1.0.0e/crypto/dsa/dsa_ameth.c",
            "openssl-1.0.0e/crypto/dsa/dsa_gen.c",
            "openssl-1.0.0e/crypto/dsa/dsa_prn.c",
            "openssl-1.0.0e/crypto/dsa/dsa_vrf.c",
            "openssl-1.0.0e/crypto/dsa/dsa_asn1.c",
            "openssl-1.0.0e/crypto/dsa/dsa_lib.c",
            "openssl-1.0.0e/crypto/dsa/dsa_err.c",
            "openssl-1.0.0e/crypto/dsa/dsa_depr.c",
            "openssl-1.0.0e/crypto/dsa/dsa_sign.c",
            "openssl-1.0.0e/crypto/pkcs7/pk7_lib.c",
            "openssl-1.0.0e/crypto/pkcs7/pk7_mime.c",
            "openssl-1.0.0e/crypto/pkcs7/pk7_attr.c",
            "openssl-1.0.0e/crypto/pkcs7/bio_pk7.c",
            "openssl-1.0.0e/crypto/pkcs7/pk7_smime.c",
            "openssl-1.0.0e/crypto/pkcs7/pk7_asn1.c",
            "openssl-1.0.0e/crypto/pkcs7/pkcs7err.c",
            "openssl-1.0.0e/crypto/pkcs7/pk7_doit.c",
            "openssl-1.0.0e/crypto/ec/ec2_smpl.c",
            "openssl-1.0.0e/crypto/ec/ec_lib.c",
            "openssl-1.0.0e/crypto/ec/eck_prn.c",
            "openssl-1.0.0e/crypto/ec/ec_mult.c",
            "openssl-1.0.0e/crypto/ec/ecp_nist.c",
            "openssl-1.0.0e/crypto/ec/ec_key.c",
            "openssl-1.0.0e/crypto/ec/ec_check.c",
            "openssl-1.0.0e/crypto/ec/ec_curve.c",
            "openssl-1.0.0e/crypto/ec/ec_ameth.c",
            "openssl-1.0.0e/crypto/ec/ecp_smpl.c",
            "openssl-1.0.0e/crypto/ec/ec_pmeth.c",
            "openssl-1.0.0e/crypto/ec/ec_err.c",
            "openssl-1.0.0e/crypto/ec/ecp_mont.c",
            "openssl-1.0.0e/crypto/ec/ec_asn1.c",
            "openssl-1.0.0e/crypto/ec/ec_cvt.c",
            "openssl-1.0.0e/crypto/ec/ec_print.c",
            "openssl-1.0.0e/crypto/ec/ec2_mult.c",
            "openssl-1.0.0e/crypto/uid.c",
            "openssl-1.0.0e/crypto/bf/bf_ofb64.c",
            "openssl-1.0.0e/crypto/bf/bf_cfb64.c",
            "openssl-1.0.0e/crypto/bf/bf_enc.c",
            "openssl-1.0.0e/crypto/bf/bf_skey.c",
            "openssl-1.0.0e/crypto/bf/bf_ecb.c",
            "openssl-1.0.0e/crypto/des/des_old.c",
            "openssl-1.0.0e/crypto/des/cfb64enc.c",
            "openssl-1.0.0e/crypto/des/ofb64enc.c",
            "openssl-1.0.0e/crypto/des/cbc_enc.c",
            "openssl-1.0.0e/crypto/des/enc_writ.c",
            "openssl-1.0.0e/crypto/des/qud_cksm.c",
            "openssl-1.0.0e/crypto/des/set_key.c",
            "openssl-1.0.0e/crypto/des/ecb_enc.c",
            "openssl-1.0.0e/crypto/des/ofb64ede.c",
            "openssl-1.0.0e/crypto/des/pcbc_enc.c",
            "openssl-1.0.0e/crypto/des/cfb_enc.c",
            "openssl-1.0.0e/crypto/des/cbc_cksm.c",
            "openssl-1.0.0e/crypto/des/xcbc_enc.c",
            "openssl-1.0.0e/crypto/des/ecb3_enc.c",
            "openssl-1.0.0e/crypto/des/des_old2.c",
            "openssl-1.0.0e/crypto/des/rpc_enc.c",
            "openssl-1.0.0e/crypto/des/fcrypt_b.c",
            "openssl-1.0.0e/crypto/des/read2pwd.c",
            "openssl-1.0.0e/crypto/des/ede_cbcm_enc.c",
            "openssl-1.0.0e/crypto/des/enc_read.c",
            "openssl-1.0.0e/crypto/des/fcrypt.c",
            "openssl-1.0.0e/crypto/des/ofb_enc.c",
            "openssl-1.0.0e/crypto/des/des_enc.c",
            "openssl-1.0.0e/crypto/des/cfb64ede.c",
            "openssl-1.0.0e/crypto/des/str2key.c",
            "openssl-1.0.0e/crypto/des/rand_key.c",
            "openssl-1.0.0e/crypto/md5/md5_dgst.c",
            "openssl-1.0.0e/crypto/md5/md5_one.c",
            "openssl-1.0.0e/crypto/cpt_err.c",
            "openssl-1.0.0e/crypto/err/err.c",
            "openssl-1.0.0e/crypto/err/err_prn.c",
            "openssl-1.0.0e/crypto/err/err_all.c",
            "openssl-1.0.0e/crypto/rand/rand_os2.c",
            "openssl-1.0.0e/crypto/rand/rand_unix.c",
            "openssl-1.0.0e/crypto/rand/md_rand.c",
            "openssl-1.0.0e/crypto/rand/rand_win.c",
            "openssl-1.0.0e/crypto/rand/rand_lib.c",
            "openssl-1.0.0e/crypto/rand/rand_egd.c",
            "openssl-1.0.0e/crypto/rand/rand_err.c",
            "openssl-1.0.0e/crypto/rand/randfile.c",
            "openssl-1.0.0e/crypto/rand/rand_nw.c",
            "openssl-1.0.0e/crypto/o_dir.c",
            "openssl-1.0.0e/crypto/lhash/lh_stats.c",
            "openssl-1.0.0e/crypto/lhash/lhash.c",
            "openssl-1.0.0e/crypto/mem.c",
            "openssl-1.0.0e/crypto/x509v3/pcy_map.c",
            "openssl-1.0.0e/crypto/x509v3/v3_ia5.c",
            "openssl-1.0.0e/crypto/x509v3/v3_ocsp.c",
            "openssl-1.0.0e/crypto/x509v3/v3_conf.c",
            "openssl-1.0.0e/crypto/x509v3/v3_genn.c",
            "openssl-1.0.0e/crypto/x509v3/v3_purp.c",
            "openssl-1.0.0e/crypto/x509v3/pcy_lib.c",
            "openssl-1.0.0e/crypto/x509v3/v3_utl.c",
            "openssl-1.0.0e/crypto/x509v3/v3_akeya.c",
            "openssl-1.0.0e/crypto/x509v3/pcy_data.c",
            "openssl-1.0.0e/crypto/x509v3/v3_enum.c",
            "openssl-1.0.0e/crypto/x509v3/v3_pci.c",
            "openssl-1.0.0e/crypto/x509v3/pcy_tree.c",
            "openssl-1.0.0e/crypto/x509v3/v3_bitst.c",
            "openssl-1.0.0e/crypto/x509v3/v3_sxnet.c",
            "openssl-1.0.0e/crypto/x509v3/v3_alt.c",
            "openssl-1.0.0e/crypto/x509v3/v3_lib.c",
            "openssl-1.0.0e/crypto/x509v3/v3_skey.c",
            "openssl-1.0.0e/crypto/x509v3/pcy_node.c",
            "openssl-1.0.0e/crypto/x509v3/v3_addr.c",
            "openssl-1.0.0e/crypto/x509v3/v3_pcons.c",
            "openssl-1.0.0e/crypto/x509v3/v3_pmaps.c",
            "openssl-1.0.0e/crypto/x509v3/v3_asid.c",
            "openssl-1.0.0e/crypto/x509v3/v3_pku.c",
            "openssl-1.0.0e/crypto/x509v3/v3_prn.c",
            "openssl-1.0.0e/crypto/x509v3/v3_extku.c",
            "openssl-1.0.0e/crypto/x509v3/v3err.c",
            "openssl-1.0.0e/crypto/x509v3/v3_int.c",
            "openssl-1.0.0e/crypto/x509v3/v3_info.c",
            "openssl-1.0.0e/crypto/x509v3/v3_ncons.c",
            "openssl-1.0.0e/crypto/x509v3/v3_pcia.c",
            "openssl-1.0.0e/crypto/x509v3/v3_bcons.c",
            "openssl-1.0.0e/crypto/x509v3/v3_cpols.c",
            "openssl-1.0.0e/crypto/x509v3/pcy_cache.c",
            "openssl-1.0.0e/crypto/x509v3/v3_akey.c",
            "openssl-1.0.0e/crypto/x509v3/v3_crld.c",
            "openssl-1.0.0e/crypto/ocsp/ocsp_err.c",
            "openssl-1.0.0e/crypto/ocsp/ocsp_prn.c",
            "openssl-1.0.0e/crypto/ocsp/ocsp_vfy.c",
            "openssl-1.0.0e/crypto/ocsp/ocsp_lib.c",
            "openssl-1.0.0e/crypto/ocsp/ocsp_ht.c",
            "openssl-1.0.0e/crypto/ocsp/ocsp_srv.c",
            "openssl-1.0.0e/crypto/ocsp/ocsp_asn.c",
            "openssl-1.0.0e/crypto/ocsp/ocsp_ext.c",
            "openssl-1.0.0e/crypto/ocsp/ocsp_cl.c",
            "openssl-1.0.0e/crypto/cversion.c",
            "openssl-1.0.0e/crypto/whrlpool/wp_dgst.c",
            "openssl-1.0.0e/crypto/whrlpool/wp_block.c",
            "openssl-1.0.0e/crypto/cms/cms_env.c",
            "openssl-1.0.0e/crypto/cms/cms_att.c",
            "openssl-1.0.0e/crypto/cms/cms_ess.c",
            "openssl-1.0.0e/crypto/cms/cms_sd.c",
            "openssl-1.0.0e/crypto/cms/cms_smime.c",
            "openssl-1.0.0e/crypto/cms/cms_dd.c",
            "openssl-1.0.0e/crypto/cms/cms_asn1.c",
            "openssl-1.0.0e/crypto/cms/cms_lib.c",
            "openssl-1.0.0e/crypto/cms/cms_err.c",
            "openssl-1.0.0e/crypto/cms/cms_io.c",
            "openssl-1.0.0e/crypto/cms/cms_cd.c",
            "openssl-1.0.0e/crypto/cms/cms_enc.c",
            "openssl-1.0.0e/crypto/md4/md4_one.c",
            "openssl-1.0.0e/crypto/md4/md4_dgst.c",
            "openssl-1.0.0e/crypto/cryptlib.c",
            "openssl-1.0.0e/crypto/o_str.c",
            "openssl-1.0.0e/crypto/engine/eng_openssl.c",
            "openssl-1.0.0e/crypto/engine/eng_err.c",
            "openssl-1.0.0e/crypto/engine/eng_all.c",
            "openssl-1.0.0e/crypto/engine/eng_lib.c",
            "openssl-1.0.0e/crypto/engine/tb_pkmeth.c",
            "openssl-1.0.0e/crypto/engine/tb_rsa.c",
            "openssl-1.0.0e/crypto/engine/tb_cipher.c",
            "openssl-1.0.0e/crypto/engine/tb_dsa.c",
            "openssl-1.0.0e/crypto/engine/eng_fat.c",
            "openssl-1.0.0e/crypto/engine/tb_digest.c",
            "openssl-1.0.0e/crypto/engine/tb_ecdsa.c",
            "openssl-1.0.0e/crypto/engine/tb_store.c",
            "openssl-1.0.0e/crypto/engine/eng_table.c",
            "openssl-1.0.0e/crypto/engine/eng_cryptodev.c",
            "openssl-1.0.0e/crypto/engine/eng_dyn.c",
            "openssl-1.0.0e/crypto/engine/tb_rand.c",
            "openssl-1.0.0e/crypto/engine/eng_ctrl.c",
            "openssl-1.0.0e/crypto/engine/eng_cnf.c",
            "openssl-1.0.0e/crypto/engine/tb_asnmth.c",
            "openssl-1.0.0e/crypto/engine/eng_pkey.c",
            "openssl-1.0.0e/crypto/engine/eng_init.c",
            "openssl-1.0.0e/crypto/engine/tb_dh.c",
            "openssl-1.0.0e/crypto/engine/tb_ecdh.c",
            "openssl-1.0.0e/crypto/engine/eng_list.c",
            "openssl-1.0.0e/crypto/seed/seed_cfb.c",
            "openssl-1.0.0e/crypto/seed/seed_cbc.c",
            "openssl-1.0.0e/crypto/seed/seed_ecb.c",
            "openssl-1.0.0e/crypto/seed/seed.c",
            "openssl-1.0.0e/crypto/seed/seed_ofb.c",
            "openssl-1.0.0e/crypto/ecdsa/ecs_sign.c",
            "openssl-1.0.0e/crypto/ecdsa/ecs_lib.c",
            "openssl-1.0.0e/crypto/ecdsa/ecs_asn1.c",
            "openssl-1.0.0e/crypto/ecdsa/ecs_vrf.c",
            "openssl-1.0.0e/crypto/ecdsa/ecs_ossl.c",
            "openssl-1.0.0e/crypto/ecdsa/ecs_err.c",
            "openssl-1.0.0e/crypto/rsa/rsa_pk1.c",
            "openssl-1.0.0e/crypto/rsa/rsa_eay.c",
            "openssl-1.0.0e/crypto/rsa/rsa_lib.c",
            "openssl-1.0.0e/crypto/rsa/rsa_gen.c",
            "openssl-1.0.0e/crypto/rsa/rsa_ssl.c",
            "openssl-1.0.0e/crypto/rsa/rsa_asn1.c",
            "openssl-1.0.0e/crypto/rsa/rsa_prn.c",
            "openssl-1.0.0e/crypto/rsa/rsa_oaep.c",
            "openssl-1.0.0e/crypto/rsa/rsa_x931.c",
            "openssl-1.0.0e/crypto/rsa/rsa_ameth.c",
            "openssl-1.0.0e/crypto/rsa/rsa_pss.c",
            "openssl-1.0.0e/crypto/rsa/rsa_depr.c",
            "openssl-1.0.0e/crypto/rsa/rsa_err.c",
            "openssl-1.0.0e/crypto/rsa/rsa_sign.c",
            "openssl-1.0.0e/crypto/rsa/rsa_chk.c",
            "openssl-1.0.0e/crypto/rsa/rsa_null.c",
            "openssl-1.0.0e/crypto/rsa/rsa_saos.c",
            "openssl-1.0.0e/crypto/rsa/rsa_pmeth.c",
            "openssl-1.0.0e/crypto/rsa/rsa_none.c",
            "openssl-1.0.0e/crypto/ui/ui_err.c",
            "openssl-1.0.0e/crypto/ui/ui_lib.c",
            "openssl-1.0.0e/crypto/ui/ui_compat.c",
            "openssl-1.0.0e/crypto/ui/ui_util.c",
            "openssl-1.0.0e/crypto/ui/ui_openssl.c",
            "openssl-1.0.0e/crypto/rc4/rc4_enc.c",
            "openssl-1.0.0e/crypto/rc4/rc4_skey.c",
            "openssl-1.0.0e/crypto/objects/obj_lib.c",
            "openssl-1.0.0e/crypto/objects/obj_err.c",
            "openssl-1.0.0e/crypto/objects/o_names.c",
            "openssl-1.0.0e/crypto/objects/obj_dat.c",
            "openssl-1.0.0e/crypto/objects/obj_xref.c",
            "openssl-1.0.0e/crypto/ecdh/ech_lib.c",
            "openssl-1.0.0e/crypto/ecdh/ech_err.c",
            "openssl-1.0.0e/crypto/ecdh/ech_ossl.c",
            "openssl-1.0.0e/crypto/ecdh/ech_key.c",
            "openssl-1.0.0e/crypto/mdc2/mdc2dgst.c",
            "openssl-1.0.0e/crypto/mdc2/mdc2_one.c",
            "openssl-1.0.0e/crypto/aes/aes_ecb.c",
            "openssl-1.0.0e/crypto/aes/aes_cfb.c",
            "openssl-1.0.0e/crypto/aes/aes_wrap.c",
            "openssl-1.0.0e/crypto/aes/aes_ige.c",
            "openssl-1.0.0e/crypto/aes/aes_cbc.c",
            "openssl-1.0.0e/crypto/aes/aes_ofb.c",
            "openssl-1.0.0e/crypto/aes/aes_ctr.c",
            "openssl-1.0.0e/crypto/aes/aes_core.c",
            "openssl-1.0.0e/crypto/aes/aes_misc.c",
            "openssl-1.0.0e/crypto/krb5/krb5_asn.c",
            "openssl-1.0.0e/crypto/ripemd/rmd_dgst.c",
            "openssl-1.0.0e/crypto/ripemd/rmd_one.c",
            "openssl-1.0.0e/crypto/dso/dso_err.c",
            "openssl-1.0.0e/crypto/dso/dso_dlfcn.c",
            "openssl-1.0.0e/crypto/dso/dso_null.c",
            "openssl-1.0.0e/crypto/dso/dso_dl.c",
            "openssl-1.0.0e/crypto/dso/dso_openssl.c",
            "openssl-1.0.0e/crypto/dso/dso_vms.c",
            "openssl-1.0.0e/crypto/dso/dso_win32.c",
            "openssl-1.0.0e/crypto/dso/dso_beos.c",
            "openssl-1.0.0e/crypto/dso/dso_lib.c",
            "openssl-1.0.0e/crypto/dh/dh_depr.c",
            "openssl-1.0.0e/crypto/dh/dh_lib.c",
            "openssl-1.0.0e/crypto/dh/dh_prn.c",
            "openssl-1.0.0e/crypto/dh/dh_check.c",
            "openssl-1.0.0e/crypto/dh/dh_key.c",
            "openssl-1.0.0e/crypto/dh/dh_pmeth.c",
            "openssl-1.0.0e/crypto/dh/dh_err.c",
            "openssl-1.0.0e/crypto/dh/dh_ameth.c",
            "openssl-1.0.0e/crypto/dh/dh_asn1.c",
            "openssl-1.0.0e/crypto/dh/dh_gen.c",
            "openssl-1.0.0e/crypto/pem/pem_x509.c",
            "openssl-1.0.0e/crypto/pem/pem_pk8.c",
            "openssl-1.0.0e/crypto/pem/pem_pkey.c",
            "openssl-1.0.0e/crypto/pem/pem_all.c",
            "openssl-1.0.0e/crypto/pem/pem_sign.c",
            "openssl-1.0.0e/crypto/pem/pem_seal.c",
            "openssl-1.0.0e/crypto/pem/pem_oth.c",
            "openssl-1.0.0e/crypto/pem/pem_info.c",
            "openssl-1.0.0e/crypto/pem/pem_xaux.c",
            "openssl-1.0.0e/crypto/pem/pem_err.c",
            "openssl-1.0.0e/crypto/pem/pvkfmt.c",
            "openssl-1.0.0e/crypto/pem/pem_lib.c",
            "openssl-1.0.0e/crypto/cast/c_cfb64.c",
            "openssl-1.0.0e/crypto/cast/c_ofb64.c",
            "openssl-1.0.0e/crypto/cast/c_ecb.c",
            "openssl-1.0.0e/crypto/cast/c_enc.c",
            "openssl-1.0.0e/crypto/cast/c_skey.c",
            "openssl-1.0.0e/crypto/modes/ofb128.c",
            "openssl-1.0.0e/crypto/modes/cts128.c",
            "openssl-1.0.0e/crypto/modes/ctr128.c",
            "openssl-1.0.0e/crypto/modes/cfb128.c",
            "openssl-1.0.0e/crypto/modes/cbc128.c",
            "openssl-1.0.0e/crypto/mem_clr.c",
            "openssl-1.0.0e/crypto/evp/bio_md.c",
            "openssl-1.0.0e/crypto/evp/p_open.c",
            "openssl-1.0.0e/crypto/evp/encode.c",
            "openssl-1.0.0e/crypto/evp/evp_key.c",
            "openssl-1.0.0e/crypto/evp/bio_enc.c",
            "openssl-1.0.0e/crypto/evp/e_seed.c",
            "openssl-1.0.0e/crypto/evp/m_dss.c",
            "openssl-1.0.0e/crypto/evp/m_null.c",
            "openssl-1.0.0e/crypto/evp/e_aes.c",
            "openssl-1.0.0e/crypto/evp/m_ecdsa.c",
            "openssl-1.0.0e/crypto/evp/e_des.c",
            "openssl-1.0.0e/crypto/evp/m_md2.c",
            "openssl-1.0.0e/crypto/evp/p5_crpt.c",
            "openssl-1.0.0e/crypto/evp/p_enc.c",
            "openssl-1.0.0e/crypto/evp/e_null.c",
            "openssl-1.0.0e/crypto/evp/m_sha.c",
            "openssl-1.0.0e/crypto/evp/evp_err.c",
            "openssl-1.0.0e/crypto/evp/pmeth_fn.c",
            "openssl-1.0.0e/crypto/evp/evp_enc.c",
            "openssl-1.0.0e/crypto/evp/evp_acnf.c",
            "openssl-1.0.0e/crypto/evp/bio_ok.c",
            "openssl-1.0.0e/crypto/evp/e_xcbc_d.c",
            "openssl-1.0.0e/crypto/evp/e_des3.c",
            "openssl-1.0.0e/crypto/evp/evp_pbe.c",
            "openssl-1.0.0e/crypto/evp/m_dss1.c",
            "openssl-1.0.0e/crypto/evp/digest.c",
            "openssl-1.0.0e/crypto/evp/names.c",
            "openssl-1.0.0e/crypto/evp/pmeth_lib.c",
            "openssl-1.0.0e/crypto/evp/p_lib.c",
            "openssl-1.0.0e/crypto/evp/p5_crpt2.c",
            "openssl-1.0.0e/crypto/evp/m_md4.c",
            "openssl-1.0.0e/crypto/evp/m_wp.c",
            "openssl-1.0.0e/crypto/evp/m_mdc2.c",
            "openssl-1.0.0e/crypto/evp/m_md5.c",
            "openssl-1.0.0e/crypto/evp/p_verify.c",
            "openssl-1.0.0e/crypto/evp/m_sigver.c",
            "openssl-1.0.0e/crypto/evp/e_idea.c",
            "openssl-1.0.0e/crypto/evp/e_rc2.c",
            "openssl-1.0.0e/crypto/evp/evp_lib.c",
            "openssl-1.0.0e/crypto/evp/m_sha1.c",
            "openssl-1.0.0e/crypto/evp/e_camellia.c",
            "openssl-1.0.0e/crypto/evp/e_bf.c",
            "openssl-1.0.0e/crypto/evp/e_old.c",
            "openssl-1.0.0e/crypto/evp/e_rc4.c",
            "openssl-1.0.0e/crypto/evp/e_rc5.c",
            "openssl-1.0.0e/crypto/evp/p_seal.c",
            "openssl-1.0.0e/crypto/evp/p_sign.c",
            "openssl-1.0.0e/crypto/evp/m_ripemd.c",
            "openssl-1.0.0e/crypto/evp/c_allc.c",
            "openssl-1.0.0e/crypto/evp/c_all.c",
            "openssl-1.0.0e/crypto/evp/evp_pkey.c",
            "openssl-1.0.0e/crypto/evp/pmeth_gn.c",
            "openssl-1.0.0e/crypto/evp/e_cast.c",
            "openssl-1.0.0e/crypto/evp/c_alld.c",
            "openssl-1.0.0e/crypto/evp/p_dec.c",
            "openssl-1.0.0e/crypto/evp/bio_b64.c",
            "openssl-1.0.0e/crypto/rc2/rc2ofb64.c",
            "openssl-1.0.0e/crypto/rc2/rc2cfb64.c",
            "openssl-1.0.0e/crypto/rc2/rc2_cbc.c",
            "openssl-1.0.0e/crypto/rc2/rc2_skey.c",
            "openssl-1.0.0e/crypto/rc2/rc2_ecb.c",
            "openssl-1.0.0e/crypto/buffer/buf_err.c",
            "openssl-1.0.0e/crypto/buffer/buffer.c",
            "openssl-1.0.0e/crypto/comp/comp_err.c",
            "openssl-1.0.0e/crypto/comp/comp_lib.c",
            "openssl-1.0.0e/crypto/comp/c_zlib.c",
            "openssl-1.0.0e/crypto/comp/c_rle.c",
            "openssl-1.0.0e/crypto/mem_dbg.c",
            "openssl-1.0.0e/crypto/ex_data.c",
            "openssl-1.0.0e/crypto/sha/sha512.c",
            "openssl-1.0.0e/crypto/sha/sha256.c",
            "openssl-1.0.0e/crypto/sha/sha_one.c",
            "openssl-1.0.0e/crypto/sha/sha1dgst.c",
            "openssl-1.0.0e/crypto/sha/sha1_one.c",
            "openssl-1.0.0e/crypto/sha/sha_dgst.c",
            "openssl-1.0.0e/crypto/txt_db/txt_db.c",
            "openssl-1.0.0e/crypto/hmac/hm_pmeth.c",
            "openssl-1.0.0e/crypto/hmac/hmac.c",
            "openssl-1.0.0e/crypto/hmac/hm_ameth.c",
            "openssl-1.0.0e/crypto/bio/bss_conn.c",
            "openssl-1.0.0e/crypto/bio/bss_sock.c",
            "openssl-1.0.0e/crypto/bio/bss_acpt.c",
            "openssl-1.0.0e/crypto/bio/bss_null.c",
            "openssl-1.0.0e/crypto/bio/bss_dgram.c",
            "openssl-1.0.0e/crypto/bio/bss_mem.c",
            "openssl-1.0.0e/crypto/bio/b_dump.c",
            "openssl-1.0.0e/crypto/bio/bss_fd.c",
            "openssl-1.0.0e/crypto/bio/b_sock.c",
            "openssl-1.0.0e/crypto/bio/bf_buff.c",
            "openssl-1.0.0e/crypto/bio/bf_null.c",
            "openssl-1.0.0e/crypto/bio/bio_err.c",
            "openssl-1.0.0e/crypto/bio/b_print.c",
            "openssl-1.0.0e/crypto/bio/bf_nbio.c",
            "openssl-1.0.0e/crypto/bio/bio_lib.c",
            "openssl-1.0.0e/crypto/bio/bss_log.c",
            "openssl-1.0.0e/crypto/bio/bss_file.c",
            "openssl-1.0.0e/crypto/bio/bio_cb.c",
            "openssl-1.0.0e/crypto/bio/bss_bio.c",
            "openssl-1.0.0e/crypto/pqueue/pqueue.c",
            "openssl-1.0.0e/crypto/conf/conf_mall.c",
            "openssl-1.0.0e/crypto/conf/conf_sap.c",
            "openssl-1.0.0e/crypto/conf/conf_lib.c",
            "openssl-1.0.0e/crypto/conf/conf_err.c",
            "openssl-1.0.0e/crypto/conf/conf_api.c",
            "openssl-1.0.0e/crypto/conf/conf_mod.c",
            "openssl-1.0.0e/crypto/conf/conf_def.c",
            "openssl-1.0.0e/crypto/ebcdic.c",
            "openssl-1.0.0e/crypto/asn1/t_x509.c",
            "openssl-1.0.0e/crypto/asn1/x_x509.c",
            "openssl-1.0.0e/crypto/asn1/a_print.c",
            "openssl-1.0.0e/crypto/asn1/x_pubkey.c",
            "openssl-1.0.0e/crypto/asn1/p5_pbev2.c",
            "openssl-1.0.0e/crypto/asn1/p8_pkey.c",
            "openssl-1.0.0e/crypto/asn1/a_bool.c",
            "openssl-1.0.0e/crypto/asn1/a_type.c",
            "openssl-1.0.0e/crypto/asn1/i2d_pu.c",
            "openssl-1.0.0e/crypto/asn1/x_crl.c",
            "openssl-1.0.0e/crypto/asn1/x_sig.c",
            "openssl-1.0.0e/crypto/asn1/x_bignum.c",
            "openssl-1.0.0e/crypto/asn1/tasn_fre.c",
            "openssl-1.0.0e/crypto/asn1/t_bitst.c",
            "openssl-1.0.0e/crypto/asn1/a_time.c",
            "openssl-1.0.0e/crypto/asn1/x_nx509.c",
            "openssl-1.0.0e/crypto/asn1/ameth_lib.c",
            "openssl-1.0.0e/crypto/asn1/a_utctm.c",
            "openssl-1.0.0e/crypto/asn1/nsseq.c",
            "openssl-1.0.0e/crypto/asn1/x_exten.c",
            "openssl-1.0.0e/crypto/asn1/p5_pbe.c",
            "openssl-1.0.0e/crypto/asn1/a_object.c",
            "openssl-1.0.0e/crypto/asn1/x_long.c",
            "openssl-1.0.0e/crypto/asn1/bio_ndef.c",
            "openssl-1.0.0e/crypto/asn1/a_dup.c",
            "openssl-1.0.0e/crypto/asn1/t_pkey.c",
            "openssl-1.0.0e/crypto/asn1/asn1_err.c",
            "openssl-1.0.0e/crypto/asn1/a_set.c",
            "openssl-1.0.0e/crypto/asn1/t_crl.c",
            "openssl-1.0.0e/crypto/asn1/x_val.c",
            "openssl-1.0.0e/crypto/asn1/n_pkey.c",
            "openssl-1.0.0e/crypto/asn1/asn_pack.c",
            "openssl-1.0.0e/crypto/asn1/tasn_prn.c",
            "openssl-1.0.0e/crypto/asn1/a_utf8.c",
            "openssl-1.0.0e/crypto/asn1/bio_asn1.c",
            "openssl-1.0.0e/crypto/asn1/t_spki.c",
            "openssl-1.0.0e/crypto/asn1/a_digest.c",
            "openssl-1.0.0e/crypto/asn1/tasn_dec.c",
            "openssl-1.0.0e/crypto/asn1/asn1_par.c",
            "openssl-1.0.0e/crypto/asn1/tasn_enc.c",
            "openssl-1.0.0e/crypto/asn1/a_gentm.c",
            "openssl-1.0.0e/crypto/asn1/d2i_pu.c",
            "openssl-1.0.0e/crypto/asn1/a_verify.c",
            "openssl-1.0.0e/crypto/asn1/a_i2d_fp.c",
            "openssl-1.0.0e/crypto/asn1/asn_mime.c",
            "openssl-1.0.0e/crypto/asn1/i2d_pr.c",
            "openssl-1.0.0e/crypto/asn1/x_name.c",
            "openssl-1.0.0e/crypto/asn1/a_int.c",
            "openssl-1.0.0e/crypto/asn1/f_string.c",
            "openssl-1.0.0e/crypto/asn1/a_strnid.c",
            "openssl-1.0.0e/crypto/asn1/f_int.c",
            "openssl-1.0.0e/crypto/asn1/a_bytes.c",
            "openssl-1.0.0e/crypto/asn1/evp_asn1.c",
            "openssl-1.0.0e/crypto/asn1/x_info.c",
            "openssl-1.0.0e/crypto/asn1/asn1_lib.c",
            "openssl-1.0.0e/crypto/asn1/x_x509a.c",
            "openssl-1.0.0e/crypto/asn1/x_algor.c",
            "openssl-1.0.0e/crypto/asn1/tasn_typ.c",
            "openssl-1.0.0e/crypto/asn1/d2i_pr.c",
            "openssl-1.0.0e/crypto/asn1/a_sign.c",
            "openssl-1.0.0e/crypto/asn1/a_bitstr.c",
            "openssl-1.0.0e/crypto/asn1/t_x509a.c",
            "openssl-1.0.0e/crypto/asn1/tasn_new.c",
            "openssl-1.0.0e/crypto/asn1/tasn_utl.c",
            "openssl-1.0.0e/crypto/asn1/asn1_gen.c",
            "openssl-1.0.0e/crypto/asn1/a_octet.c",
            "openssl-1.0.0e/crypto/asn1/x_pkey.c",
            "openssl-1.0.0e/crypto/asn1/asn_moid.c",
            "openssl-1.0.0e/crypto/asn1/t_req.c",
            "openssl-1.0.0e/crypto/asn1/a_d2i_fp.c",
            "openssl-1.0.0e/crypto/asn1/x_attrib.c",
            "openssl-1.0.0e/crypto/asn1/a_enum.c",
            "openssl-1.0.0e/crypto/asn1/a_strex.c",
            "openssl-1.0.0e/crypto/asn1/a_mbstr.c",
            "openssl-1.0.0e/crypto/asn1/f_enum.c",
            "openssl-1.0.0e/crypto/asn1/x_spki.c",
            "openssl-1.0.0e/crypto/asn1/x_req.c",
            "openssl-1.0.0e/crypto/bn/bn_exp.c",
            "openssl-1.0.0e/crypto/bn/bn_recp.c",
            "openssl-1.0.0e/crypto/bn/bn_const.c",
            "openssl-1.0.0e/crypto/bn/bn_sqr.c",
            "openssl-1.0.0e/crypto/bn/bn_mul.c",
            "openssl-1.0.0e/crypto/bn/bn_word.c",
            "openssl-1.0.0e/crypto/bn/bn_div.c",
            "openssl-1.0.0e/crypto/bn/bn_lib.c",
            "openssl-1.0.0e/crypto/bn/bn_rand.c",
            "openssl-1.0.0e/crypto/bn/bn_sqrt.c",
            "openssl-1.0.0e/crypto/bn/bn_gcd.c",
            "openssl-1.0.0e/crypto/bn/bn_nist.c",
            "openssl-1.0.0e/crypto/bn/bn_add.c",
            "openssl-1.0.0e/crypto/bn/bn_prime.c",
            "openssl-1.0.0e/crypto/bn/bn_exp2.c",
            "openssl-1.0.0e/crypto/bn/bn_gf2m.c",
            "openssl-1.0.0e/crypto/bn/bn_depr.c",
            "openssl-1.0.0e/crypto/bn/bn_mpi.c",
            "openssl-1.0.0e/crypto/bn/bn_kron.c",
            "openssl-1.0.0e/crypto/bn/bn_mont.c",
            "openssl-1.0.0e/crypto/bn/bn_asm.c",
            "openssl-1.0.0e/crypto/bn/bn_print.c",
            "openssl-1.0.0e/crypto/bn/bn_blind.c",
            "openssl-1.0.0e/crypto/bn/bn_err.c",
            "openssl-1.0.0e/crypto/bn/bn_shift.c",
            "openssl-1.0.0e/crypto/bn/bn_ctx.c",
            "openssl-1.0.0e/crypto/bn/bn_mod.c",
            "openssl-1.0.0e/crypto/ts/ts_asn1.c",
            "openssl-1.0.0e/crypto/ts/ts_verify_ctx.c",
            "openssl-1.0.0e/crypto/ts/ts_req_utils.c",
            "openssl-1.0.0e/crypto/ts/ts_err.c",
            "openssl-1.0.0e/crypto/ts/ts_conf.c",
            "openssl-1.0.0e/crypto/ts/ts_rsp_print.c",
            "openssl-1.0.0e/crypto/ts/ts_lib.c",
            "openssl-1.0.0e/crypto/ts/ts_rsp_sign.c",
            "openssl-1.0.0e/crypto/ts/ts_rsp_verify.c",
            "openssl-1.0.0e/crypto/ts/ts_rsp_utils.c",
            "openssl-1.0.0e/crypto/ts/ts_req_print.c",
            "openssl-1.0.0e/crypto/camellia/cmll_ecb.c",
            "openssl-1.0.0e/crypto/camellia/cmll_misc.c",
            "openssl-1.0.0e/crypto/camellia/cmll_ofb.c",
            "openssl-1.0.0e/crypto/camellia/cmll_cfb.c",
            "openssl-1.0.0e/crypto/camellia/cmll_cbc.c",
            "openssl-1.0.0e/crypto/camellia/cmll_ctr.c",
            "openssl-1.0.0e/crypto/camellia/camellia.c",
            "openssl-1.0.0e/crypto/pkcs12/p12_crt.c",
            "openssl-1.0.0e/crypto/pkcs12/pk12err.c",
            "openssl-1.0.0e/crypto/pkcs12/p12_decr.c",
            "openssl-1.0.0e/crypto/pkcs12/p12_utl.c",
            "openssl-1.0.0e/crypto/pkcs12/p12_init.c",
            "openssl-1.0.0e/crypto/pkcs12/p12_npas.c",
            "openssl-1.0.0e/crypto/pkcs12/p12_asn.c",
            "openssl-1.0.0e/crypto/pkcs12/p12_kiss.c",
            "openssl-1.0.0e/crypto/pkcs12/p12_mutl.c",
            "openssl-1.0.0e/crypto/pkcs12/p12_crpt.c",
            "openssl-1.0.0e/crypto/pkcs12/p12_add.c",
            "openssl-1.0.0e/crypto/pkcs12/p12_attr.c",
            "openssl-1.0.0e/crypto/pkcs12/p12_p8d.c",
            "openssl-1.0.0e/crypto/pkcs12/p12_p8e.c",
            "openssl-1.0.0e/crypto/pkcs12/p12_key.c",
            "openssl-1.0.0e/crypto/x509/x509_att.c",
            "openssl-1.0.0e/crypto/x509/by_file.c",
            "openssl-1.0.0e/crypto/x509/x509spki.c",
            "openssl-1.0.0e/crypto/x509/x509cset.c",
            "openssl-1.0.0e/crypto/x509/x509rset.c",
            "openssl-1.0.0e/crypto/x509/x_all.c",
            "openssl-1.0.0e/crypto/x509/x509_lu.c",
            "openssl-1.0.0e/crypto/x509/by_dir.c",
            "openssl-1.0.0e/crypto/x509/x509_req.c",
            "openssl-1.0.0e/crypto/x509/x509_r2x.c",
            "openssl-1.0.0e/crypto/x509/x509_trs.c",
            "openssl-1.0.0e/crypto/x509/x509_cmp.c",
            "openssl-1.0.0e/crypto/x509/x509_obj.c",
            "openssl-1.0.0e/crypto/x509/x509name.c",
            "openssl-1.0.0e/crypto/x509/x509_set.c",
            "openssl-1.0.0e/crypto/x509/x509_err.c",
            "openssl-1.0.0e/crypto/x509/x509_vfy.c",
            "openssl-1.0.0e/crypto/x509/x509_def.c",
            "openssl-1.0.0e/crypto/x509/x509type.c",
            "openssl-1.0.0e/crypto/x509/x509_vpm.c",
            "openssl-1.0.0e/crypto/x509/x509_txt.c",
            "openssl-1.0.0e/crypto/x509/x509_v3.c",
            "openssl-1.0.0e/crypto/x509/x509_d2.c",
            "openssl-1.0.0e/crypto/x509/x509_ext.c",
            "openssl-1.0.0e/crypto/idea/i_cbc.c",
            "openssl-1.0.0e/crypto/idea/i_ofb64.c",
            "openssl-1.0.0e/crypto/idea/i_skey.c",
            "openssl-1.0.0e/crypto/idea/i_ecb.c",
            "openssl-1.0.0e/crypto/idea/i_cfb64.c",
            "openssl-1.0.0e/engines/e_nuron.c",
            "openssl-1.0.0e/engines/e_4758cca.c",
            "openssl-1.0.0e/engines/e_atalla.c",
            "openssl-1.0.0e/engines/e_gmp.c",
            "openssl-1.0.0e/engines/e_sureware.c",
            "openssl-1.0.0e/engines/e_ubsec.c",
            "openssl-1.0.0e/engines/e_capi.c",
            "openssl-1.0.0e/engines/ccgost/gosthash.c",
            "openssl-1.0.0e/engines/ccgost/gost_ctl.c",
            "openssl-1.0.0e/engines/ccgost/gost_asn1.c",
            "openssl-1.0.0e/engines/ccgost/gost2001_keyx.c",
            "openssl-1.0.0e/engines/ccgost/gost_md.c",
            "openssl-1.0.0e/engines/ccgost/e_gost_err.c",
            "openssl-1.0.0e/engines/ccgost/gost_eng.c",
            "openssl-1.0.0e/engines/ccgost/gost_crypt.c",
            "openssl-1.0.0e/engines/ccgost/gost2001.c",
            "openssl-1.0.0e/engines/ccgost/gost_pmeth.c",
            "openssl-1.0.0e/engines/ccgost/gost89.c",
            "openssl-1.0.0e/engines/ccgost/gost_params.c",
            "openssl-1.0.0e/engines/ccgost/gost94_keyx.c",
            "openssl-1.0.0e/engines/ccgost/gost_sign.c",
            "openssl-1.0.0e/engines/ccgost/gost_keywrap.c",
            "openssl-1.0.0e/engines/ccgost/gost_ameth.c",
            "openssl-1.0.0e/engines/e_chil.c",
            "openssl-1.0.0e/engines/e_padlock.c",
            "openssl-1.0.0e/engines/e_aep.c",
            "openssl-1.0.0e/engines/e_cswift.c",

            ],
    local_include_dirs: [
            "core/include", 
            ".", "core/adb", 
            "openssl-1.0.0e/include", 
            "openssl-1.0.0e", 
            "openssl-1.0.0e/crypto", 
            "openssl-1.0.0e/crypto/evp", 
            "openssl-1.0.0e/crypto/asn1"
            ],
    shared_libs: ["libz"],
    cflags: ["-Wno-error",
            "-DADB_HOST=1",
            "-DHAVE_FORKEXEC=1",
            "-DHAVE_SYMLINKS",
            "-DHAVE_TERMIO_H",
            "-DOPENSSL_THREADS",
            "-DOPENSSL_NO_GMP",
            "-DOPENSSL_NO_JPAKE",
            "-DOPENSSL_NO_MD2",
            "-DOPENSSL_NO_RC5",
            "-DOPENSSL_NO_RFC3779",
            "-DOPENSSL_NO_STORE",
            "-DOPENSSL_NO_INLINE_ASM"
            ],
    recovery_available: true,
}

直接把adb源码中core目录和openssl目录放到android源码system/core/adbhost(添加的工程目录)目录下,编译时有少部分错误,直接修改源码改正,或能修改编译选项搞定都行,看大家心情。

接着在init.rc中添加服务,我最开始时使用的是android的aosp源码编译的qemu版本,直接修改system/core/rootdir/init.rc,至于其他平台的,按目标平台的来。

添加

service adbhost /system/bin/adbhost server nodaemon
    user root
    group root log readproc
    seclabel u:r:init:s0
    disabled

on property:sys.boot_completed=1

下添加

    start adbhost

至此修改完毕,make -j32

编译完成后就可以自行验证了。

注:由于android系统自身包涵adb device端server,已经占用默认的5037端口,可能影响host端server启动失败,可以把默认端口修改为4037(也可以改别的,看大家心情)。

作为一个老鸟程序员,实在不甘心前面ssl库的函数BIO_f_base64没找到的错误没解决,而将整个openssl编译进去。于是花点时间继续折腾。

android中使用的ssl库源码在external/boringssl目录,据说是openssl的一个分支,搜索源码,发现源码中有BIO_f_base64的实现,在文件src/decrepit/bio/base64_bio.c中,搜索了编译配置(该工程源码配置在sources.bp中),发现没有编译该文件,于是加上,修改如下:

// Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// This file is created by generate_build_files.py. Do not edit manually.

cc_defaults {
    name: "libcrypto_sources",
    srcs: [
        "err_data.c",
        "src/crypto/asn1/a_bitstr.c",
        "src/crypto/asn1/a_bool.c",
        "src/crypto/asn1/a_d2i_fp.c",
        "src/crypto/asn1/a_dup.c",
        "src/crypto/asn1/a_enum.c",
        "src/crypto/asn1/a_gentm.c",
        "src/crypto/asn1/a_i2d_fp.c",
        "src/crypto/asn1/a_int.c",
        "src/crypto/asn1/a_mbstr.c",
        "src/crypto/asn1/a_object.c",
        "src/crypto/asn1/a_octet.c",
        "src/crypto/asn1/a_print.c",
        "src/crypto/asn1/a_strnid.c",
        "src/crypto/asn1/a_time.c",
        "src/crypto/asn1/a_type.c",
        "src/crypto/asn1/a_utctm.c",
        "src/crypto/asn1/a_utf8.c",
        "src/crypto/asn1/asn1_lib.c",
        "src/crypto/asn1/asn1_par.c",
        "src/crypto/asn1/asn_pack.c",
        "src/crypto/asn1/f_enum.c",
        "src/crypto/asn1/f_int.c",
        "src/crypto/asn1/f_string.c",
        "src/crypto/asn1/tasn_dec.c",
        "src/crypto/asn1/tasn_enc.c",
        "src/crypto/asn1/tasn_fre.c",
        "src/crypto/asn1/tasn_new.c",
        "src/crypto/asn1/tasn_typ.c",
        "src/crypto/asn1/tasn_utl.c",
        "src/crypto/asn1/time_support.c",
        "src/crypto/base64/base64.c",
        "src/crypto/bio/bio.c",
        "src/decrepit/bio/base64_bio.c",
        "src/crypto/bio/bio_mem.c",
        "src/crypto/bio/connect.c",
        "src/crypto/bio/fd.c",
        "src/crypto/bio/file.c",
        "src/crypto/bio/hexdump.c",
        "src/crypto/bio/pair.c",
        "src/crypto/bio/printf.c",
        "src/crypto/bio/socket.c",
        "src/crypto/bio/socket_helper.c",
        "src/crypto/blake2/blake2.c",
        "src/crypto/bn_extra/bn_asn1.c",
        "src/crypto/bn_extra/convert.c",
        "src/crypto/buf/buf.c",
        "src/crypto/bytestring/asn1_compat.c",
        "src/crypto/bytestring/ber.c",
        "src/crypto/bytestring/cbb.c",
        "src/crypto/bytestring/cbs.c",
        "src/crypto/bytestring/unicode.c",
        "src/crypto/chacha/chacha.c",
        "src/crypto/cipher_extra/cipher_extra.c",
        "src/crypto/cipher_extra/derive_key.c",
        "src/crypto/cipher_extra/e_aesccm.c",
        "src/crypto/cipher_extra/e_aesctrhmac.c",
        "src/crypto/cipher_extra/e_aesgcmsiv.c",
        "src/crypto/cipher_extra/e_chacha20poly1305.c",
        "src/crypto/cipher_extra/e_null.c",
        "src/crypto/cipher_extra/e_rc2.c",
        "src/crypto/cipher_extra/e_rc4.c",
        "src/crypto/cipher_extra/e_tls.c",
        "src/crypto/cipher_extra/tls_cbc.c",
        "src/crypto/cmac/cmac.c",
        "src/crypto/conf/conf.c",
        "src/crypto/cpu-aarch64-fuchsia.c",
        "src/crypto/cpu-aarch64-linux.c",
        "src/crypto/cpu-aarch64-win.c",
        "src/crypto/cpu-arm-linux.c",
        "src/crypto/cpu-arm.c",
        "src/crypto/cpu-intel.c",
        "src/crypto/cpu-ppc64le.c",
        "src/crypto/crypto.c",
        "src/crypto/curve25519/curve25519.c",
        "src/crypto/curve25519/spake25519.c",
        "src/crypto/dh_extra/dh_asn1.c",
        "src/crypto/dh_extra/params.c",
        "src/crypto/digest_extra/digest_extra.c",
        "src/crypto/dsa/dsa.c",
        "src/crypto/dsa/dsa_asn1.c",
        "src/crypto/ec_extra/ec_asn1.c",
        "src/crypto/ec_extra/ec_derive.c",
        "src/crypto/ec_extra/hash_to_curve.c",
        "src/crypto/ecdh_extra/ecdh_extra.c",
        "src/crypto/ecdsa_extra/ecdsa_asn1.c",
        "src/crypto/engine/engine.c",
        "src/crypto/err/err.c",
        "src/crypto/evp/digestsign.c",
        "src/crypto/evp/evp.c",
        "src/crypto/evp/evp_asn1.c",
        "src/crypto/evp/evp_ctx.c",
        "src/crypto/evp/p_dsa_asn1.c",
        "src/crypto/evp/p_ec.c",
        "src/crypto/evp/p_ec_asn1.c",
        "src/crypto/evp/p_ed25519.c",
        "src/crypto/evp/p_ed25519_asn1.c",
        "src/crypto/evp/p_rsa.c",
        "src/crypto/evp/p_rsa_asn1.c",
        "src/crypto/evp/p_x25519.c",
        "src/crypto/evp/p_x25519_asn1.c",
        "src/crypto/evp/pbkdf.c",
        "src/crypto/evp/print.c",
        "src/crypto/evp/scrypt.c",
        "src/crypto/evp/sign.c",
        "src/crypto/ex_data.c",
        "src/crypto/fipsmodule/fips_shared_support.c",
        "src/crypto/fipsmodule/is_fips.c",
        "src/crypto/hkdf/hkdf.c",
        "src/crypto/hpke/hpke.c",
        "src/crypto/hrss/hrss.c",
        "src/crypto/lhash/lhash.c",
        "src/crypto/mem.c",
        "src/crypto/obj/obj.c",
        "src/crypto/obj/obj_xref.c",
        "src/crypto/pem/pem_all.c",
        "src/crypto/pem/pem_info.c",
        "src/crypto/pem/pem_lib.c",
        "src/crypto/pem/pem_oth.c",
        "src/crypto/pem/pem_pk8.c",
        "src/crypto/pem/pem_pkey.c",
        "src/crypto/pem/pem_x509.c",
        "src/crypto/pem/pem_xaux.c",
        "src/crypto/pkcs7/pkcs7.c",
        "src/crypto/pkcs7/pkcs7_x509.c",
        "src/crypto/pkcs8/p5_pbev2.c",
        "src/crypto/pkcs8/pkcs8.c",
        "src/crypto/pkcs8/pkcs8_x509.c",
        "src/crypto/poly1305/poly1305.c",
        "src/crypto/poly1305/poly1305_arm.c",
        "src/crypto/poly1305/poly1305_vec.c",
        "src/crypto/pool/pool.c",
        "src/crypto/rand_extra/deterministic.c",
        "src/crypto/rand_extra/forkunsafe.c",
        "src/crypto/rand_extra/fuchsia.c",
        "src/crypto/rand_extra/passive.c",
        "src/crypto/rand_extra/rand_extra.c",
        "src/crypto/rand_extra/windows.c",
        "src/crypto/rc4/rc4.c",
        "src/crypto/refcount_c11.c",
        "src/crypto/refcount_lock.c",
        "src/crypto/rsa_extra/rsa_asn1.c",
        "src/crypto/rsa_extra/rsa_print.c",
        "src/crypto/siphash/siphash.c",
        "src/crypto/stack/stack.c",
        "src/crypto/thread.c",
        "src/crypto/thread_none.c",
        "src/crypto/thread_pthread.c",
        "src/crypto/thread_win.c",
        "src/crypto/trust_token/pmbtoken.c",
        "src/crypto/trust_token/trust_token.c",
        "src/crypto/trust_token/voprf.c",
        "src/crypto/x509/a_digest.c",
        "src/crypto/x509/a_sign.c",
        "src/crypto/x509/a_strex.c",
        "src/crypto/x509/a_verify.c",
        "src/crypto/x509/algorithm.c",
        "src/crypto/x509/asn1_gen.c",
        "src/crypto/x509/by_dir.c",
        "src/crypto/x509/by_file.c",
        "src/crypto/x509/i2d_pr.c",
        "src/crypto/x509/rsa_pss.c",
        "src/crypto/x509/t_crl.c",
        "src/crypto/x509/t_req.c",
        "src/crypto/x509/t_x509.c",
        "src/crypto/x509/t_x509a.c",
        "src/crypto/x509/x509.c",
        "src/crypto/x509/x509_att.c",
        "src/crypto/x509/x509_cmp.c",
        "src/crypto/x509/x509_d2.c",
        "src/crypto/x509/x509_def.c",
        "src/crypto/x509/x509_ext.c",
        "src/crypto/x509/x509_lu.c",
        "src/crypto/x509/x509_obj.c",
        "src/crypto/x509/x509_r2x.c",
        "src/crypto/x509/x509_req.c",
        "src/crypto/x509/x509_set.c",
        "src/crypto/x509/x509_trs.c",
        "src/crypto/x509/x509_txt.c",
        "src/crypto/x509/x509_v3.c",
        "src/crypto/x509/x509_vfy.c",
        "src/crypto/x509/x509_vpm.c",
        "src/crypto/x509/x509cset.c",
        "src/crypto/x509/x509name.c",
        "src/crypto/x509/x509rset.c",
        "src/crypto/x509/x509spki.c",
        "src/crypto/x509/x_algor.c",
        "src/crypto/x509/x_all.c",
        "src/crypto/x509/x_attrib.c",
        "src/crypto/x509/x_crl.c",
        "src/crypto/x509/x_exten.c",
        "src/crypto/x509/x_info.c",
        "src/crypto/x509/x_name.c",
        "src/crypto/x509/x_pkey.c",
        "src/crypto/x509/x_pubkey.c",
        "src/crypto/x509/x_req.c",
        "src/crypto/x509/x_sig.c",
        "src/crypto/x509/x_spki.c",
        "src/crypto/x509/x_val.c",
        "src/crypto/x509/x_x509.c",
        "src/crypto/x509/x_x509a.c",
        "src/crypto/x509v3/pcy_cache.c",
        "src/crypto/x509v3/pcy_data.c",
        "src/crypto/x509v3/pcy_lib.c",
        "src/crypto/x509v3/pcy_map.c",
        "src/crypto/x509v3/pcy_node.c",
        "src/crypto/x509v3/pcy_tree.c",
        "src/crypto/x509v3/v3_akey.c",
        "src/crypto/x509v3/v3_akeya.c",
        "src/crypto/x509v3/v3_alt.c",
        "src/crypto/x509v3/v3_bcons.c",
        "src/crypto/x509v3/v3_bitst.c",
        "src/crypto/x509v3/v3_conf.c",
        "src/crypto/x509v3/v3_cpols.c",
        "src/crypto/x509v3/v3_crld.c",
        "src/crypto/x509v3/v3_enum.c",
        "src/crypto/x509v3/v3_extku.c",
        "src/crypto/x509v3/v3_genn.c",
        "src/crypto/x509v3/v3_ia5.c",
        "src/crypto/x509v3/v3_info.c",
        "src/crypto/x509v3/v3_int.c",
        "src/crypto/x509v3/v3_lib.c",
        "src/crypto/x509v3/v3_ncons.c",
        "src/crypto/x509v3/v3_ocsp.c",
        "src/crypto/x509v3/v3_pci.c",
        "src/crypto/x509v3/v3_pcia.c",
        "src/crypto/x509v3/v3_pcons.c",
        "src/crypto/x509v3/v3_pmaps.c",
        "src/crypto/x509v3/v3_prn.c",
        "src/crypto/x509v3/v3_purp.c",
        "src/crypto/x509v3/v3_skey.c",
        "src/crypto/x509v3/v3_utl.c",
    ],
    target: {
        linux_arm64: {
            srcs: [
                "linux-aarch64/crypto/chacha/chacha-armv8.S",
                "linux-aarch64/crypto/test/trampoline-armv8.S",
            ],
        },
        linux_arm: {
            srcs: [
                "linux-arm/crypto/chacha/chacha-armv4.S",
                "linux-arm/crypto/test/trampoline-armv4.S",
                "src/crypto/curve25519/asm/x25519-asm-arm.S",
                "src/crypto/poly1305/poly1305_arm_asm.S",
            ],
        },
        linux_x86: {
            srcs: [
                "linux-x86/crypto/chacha/chacha-x86.S",
                "linux-x86/crypto/test/trampoline-x86.S",
            ],
        },
        linux_x86_64: {
            srcs: [
                "linux-x86_64/crypto/chacha/chacha-x86_64.S",
                "linux-x86_64/crypto/cipher_extra/aes128gcmsiv-x86_64.S",
                "linux-x86_64/crypto/cipher_extra/chacha20_poly1305_x86_64.S",
                "linux-x86_64/crypto/test/trampoline-x86_64.S",
                "src/crypto/hrss/asm/poly_rq_mul.S",
            ],
        },
    },
}

cc_defaults {
    name: "libcrypto_bcm_sources",
    srcs: [
        "src/crypto/fipsmodule/bcm.c",
    ],
    target: {
        linux_arm64: {
            srcs: [
                "linux-aarch64/crypto/fipsmodule/aesv8-armx64.S",
                "linux-aarch64/crypto/fipsmodule/armv8-mont.S",
                "linux-aarch64/crypto/fipsmodule/ghash-neon-armv8.S",
                "linux-aarch64/crypto/fipsmodule/ghashv8-armx64.S",
                "linux-aarch64/crypto/fipsmodule/sha1-armv8.S",
                "linux-aarch64/crypto/fipsmodule/sha256-armv8.S",
                "linux-aarch64/crypto/fipsmodule/sha512-armv8.S",
                "linux-aarch64/crypto/fipsmodule/vpaes-armv8.S",
            ],
        },
        linux_arm: {
            srcs: [
                "linux-arm/crypto/fipsmodule/aesv8-armx32.S",
                "linux-arm/crypto/fipsmodule/armv4-mont.S",
                "linux-arm/crypto/fipsmodule/bsaes-armv7.S",
                "linux-arm/crypto/fipsmodule/ghash-armv4.S",
                "linux-arm/crypto/fipsmodule/ghashv8-armx32.S",
                "linux-arm/crypto/fipsmodule/sha1-armv4-large.S",
                "linux-arm/crypto/fipsmodule/sha256-armv4.S",
                "linux-arm/crypto/fipsmodule/sha512-armv4.S",
                "linux-arm/crypto/fipsmodule/vpaes-armv7.S",
            ],
        },
        linux_x86: {
            srcs: [
                "linux-x86/crypto/fipsmodule/aesni-x86.S",
                "linux-x86/crypto/fipsmodule/bn-586.S",
                "linux-x86/crypto/fipsmodule/co-586.S",
                "linux-x86/crypto/fipsmodule/ghash-ssse3-x86.S",
                "linux-x86/crypto/fipsmodule/ghash-x86.S",
                "linux-x86/crypto/fipsmodule/md5-586.S",
                "linux-x86/crypto/fipsmodule/sha1-586.S",
                "linux-x86/crypto/fipsmodule/sha256-586.S",
                "linux-x86/crypto/fipsmodule/sha512-586.S",
                "linux-x86/crypto/fipsmodule/vpaes-x86.S",
                "linux-x86/crypto/fipsmodule/x86-mont.S",
            ],
        },
        linux_x86_64: {
            srcs: [
                "linux-x86_64/crypto/fipsmodule/aesni-gcm-x86_64.S",
                "linux-x86_64/crypto/fipsmodule/aesni-x86_64.S",
                "linux-x86_64/crypto/fipsmodule/ghash-ssse3-x86_64.S",
                "linux-x86_64/crypto/fipsmodule/ghash-x86_64.S",
                "linux-x86_64/crypto/fipsmodule/md5-x86_64.S",
                "linux-x86_64/crypto/fipsmodule/p256-x86_64-asm.S",
                "linux-x86_64/crypto/fipsmodule/p256_beeu-x86_64-asm.S",
                "linux-x86_64/crypto/fipsmodule/rdrand-x86_64.S",
                "linux-x86_64/crypto/fipsmodule/rsaz-avx2.S",
                "linux-x86_64/crypto/fipsmodule/sha1-x86_64.S",
                "linux-x86_64/crypto/fipsmodule/sha256-x86_64.S",
                "linux-x86_64/crypto/fipsmodule/sha512-x86_64.S",
                "linux-x86_64/crypto/fipsmodule/vpaes-x86_64.S",
                "linux-x86_64/crypto/fipsmodule/x86_64-mont.S",
                "linux-x86_64/crypto/fipsmodule/x86_64-mont5.S",
            ],
        },
    },
}

cc_defaults {
    name: "libssl_sources",
    srcs: [
        "src/ssl/bio_ssl.cc",
        "src/ssl/d1_both.cc",
        "src/ssl/d1_lib.cc",
        "src/ssl/d1_pkt.cc",
        "src/ssl/d1_srtp.cc",
        "src/ssl/dtls_method.cc",
        "src/ssl/dtls_record.cc",
        "src/ssl/handoff.cc",
        "src/ssl/handshake.cc",
        "src/ssl/handshake_client.cc",
        "src/ssl/handshake_server.cc",
        "src/ssl/s3_both.cc",
        "src/ssl/s3_lib.cc",
        "src/ssl/s3_pkt.cc",
        "src/ssl/ssl_aead_ctx.cc",
        "src/ssl/ssl_asn1.cc",
        "src/ssl/ssl_buffer.cc",
        "src/ssl/ssl_cert.cc",
        "src/ssl/ssl_cipher.cc",
        "src/ssl/ssl_file.cc",
        "src/ssl/ssl_key_share.cc",
        "src/ssl/ssl_lib.cc",
        "src/ssl/ssl_privkey.cc",
        "src/ssl/ssl_session.cc",
        "src/ssl/ssl_stat.cc",
        "src/ssl/ssl_transcript.cc",
        "src/ssl/ssl_versions.cc",
        "src/ssl/ssl_x509.cc",
        "src/ssl/t1_enc.cc",
        "src/ssl/t1_lib.cc",
        "src/ssl/tls13_both.cc",
        "src/ssl/tls13_client.cc",
        "src/ssl/tls13_enc.cc",
        "src/ssl/tls13_server.cc",
        "src/ssl/tls_method.cc",
        "src/ssl/tls_record.cc",
    ],
}

cc_defaults {
    name: "bssl_sources",
    srcs: [
        "src/tool/args.cc",
        "src/tool/ciphers.cc",
        "src/tool/client.cc",
        "src/tool/const.cc",
        "src/tool/digest.cc",
        "src/tool/fd.cc",
        "src/tool/file.cc",
        "src/tool/generate_ed25519.cc",
        "src/tool/genrsa.cc",
        "src/tool/pkcs12.cc",
        "src/tool/rand.cc",
        "src/tool/server.cc",
        "src/tool/sign.cc",
        "src/tool/speed.cc",
        "src/tool/tool.cc",
        "src/tool/transport_common.cc",
    ],
}

cc_defaults {
    name: "boringssl_test_support_sources",
    srcs: [
        "src/crypto/test/file_test.cc",
        "src/crypto/test/malloc.cc",
        "src/crypto/test/test_util.cc",
        "src/crypto/test/wycheproof_util.cc",
    ],
}

cc_defaults {
    name: "boringssl_crypto_test_sources",
    srcs: [
        "crypto_test_data.cc",
        "src/crypto/abi_self_test.cc",
        "src/crypto/asn1/asn1_test.cc",
        "src/crypto/base64/base64_test.cc",
        "src/crypto/bio/bio_test.cc",
        "src/crypto/blake2/blake2_test.cc",
        "src/crypto/buf/buf_test.cc",
        "src/crypto/bytestring/bytestring_test.cc",
        "src/crypto/chacha/chacha_test.cc",
        "src/crypto/cipher_extra/aead_test.cc",
        "src/crypto/cipher_extra/cipher_test.cc",
        "src/crypto/cmac/cmac_test.cc",
        "src/crypto/compiler_test.cc",
        "src/crypto/constant_time_test.cc",
        "src/crypto/cpu-arm-linux_test.cc",
        "src/crypto/crypto_test.cc",
        "src/crypto/curve25519/ed25519_test.cc",
        "src/crypto/curve25519/spake25519_test.cc",
        "src/crypto/curve25519/x25519_test.cc",
        "src/crypto/dh_extra/dh_test.cc",
        "src/crypto/digest_extra/digest_test.cc",
        "src/crypto/dsa/dsa_test.cc",
        "src/crypto/ecdh_extra/ecdh_test.cc",
        "src/crypto/err/err_test.cc",
        "src/crypto/evp/evp_extra_test.cc",
        "src/crypto/evp/evp_test.cc",
        "src/crypto/evp/pbkdf_test.cc",
        "src/crypto/evp/scrypt_test.cc",
        "src/crypto/fipsmodule/aes/aes_test.cc",
        "src/crypto/fipsmodule/bn/bn_test.cc",
        "src/crypto/fipsmodule/ec/ec_test.cc",
        "src/crypto/fipsmodule/ec/p256-x86_64_test.cc",
        "src/crypto/fipsmodule/ecdsa/ecdsa_test.cc",
        "src/crypto/fipsmodule/md5/md5_test.cc",
        "src/crypto/fipsmodule/modes/gcm_test.cc",
        "src/crypto/fipsmodule/rand/ctrdrbg_test.cc",
        "src/crypto/fipsmodule/rand/fork_detect_test.cc",
        "src/crypto/fipsmodule/sha/sha_test.cc",
        "src/crypto/hkdf/hkdf_test.cc",
        "src/crypto/hmac_extra/hmac_test.cc",
        "src/crypto/hpke/hpke_test.cc",
        "src/crypto/hrss/hrss_test.cc",
        "src/crypto/impl_dispatch_test.cc",
        "src/crypto/lhash/lhash_test.cc",
        "src/crypto/obj/obj_test.cc",
        "src/crypto/pem/pem_test.cc",
        "src/crypto/pkcs7/pkcs7_test.cc",
        "src/crypto/pkcs8/pkcs12_test.cc",
        "src/crypto/pkcs8/pkcs8_test.cc",
        "src/crypto/poly1305/poly1305_test.cc",
        "src/crypto/pool/pool_test.cc",
        "src/crypto/rand_extra/rand_test.cc",
        "src/crypto/refcount_test.cc",
        "src/crypto/rsa_extra/rsa_test.cc",
        "src/crypto/self_test.cc",
        "src/crypto/siphash/siphash_test.cc",
        "src/crypto/stack/stack_test.cc",
        "src/crypto/test/abi_test.cc",
        "src/crypto/test/file_test_gtest.cc",
        "src/crypto/test/gtest_main.cc",
        "src/crypto/thread_test.cc",
        "src/crypto/trust_token/trust_token_test.cc",
        "src/crypto/x509/x509_test.cc",
        "src/crypto/x509/x509_time_test.cc",
        "src/crypto/x509v3/tab_test.cc",
        "src/crypto/x509v3/v3name_test.cc",
    ],
}

cc_defaults {
    name: "boringssl_ssl_test_sources",
    srcs: [
        "src/crypto/test/abi_test.cc",
        "src/crypto/test/gtest_main.cc",
        "src/ssl/span_test.cc",
        "src/ssl/ssl_c_test.c",
        "src/ssl/ssl_test.cc",
    ],
}

结果编译出错,提示如下:

error: Please update ABI references with: $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py  -l libcrypto

按照提示执行:

python3 development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libcrypto

这一步执行挺久,再把之前添加的openssl相关配置去掉,system/core/adbhost/Android.bp

// Copyright 2013 The Android Open Source Project

package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

cc_binary {
    name: "adbhost",
    srcs: [
            "core/adb/adb.c",
            "core/adb/adb_client.c",
            "core/adb/adb_auth_host.c",
            "core/adb/commandline.c",
            "core/adb/console.c",
            "core/adb/file_sync_client.c",
            "core/adb/fdevent.c",
            "core/adb/get_my_path_linux.c",
            "core/adb/services.c",
            "core/adb/sockets.c",
            "core/adb/transport.c",
            "core/adb/transport_local.c",
            "core/adb/transport_usb.c",
            "core/adb/usb_linux.c",
            "core/adb/usb_vendors.c",
            "core/adb/utils.c",

            "core/libcutils/abort_socket.c",
            "core/libcutils/socket_inaddr_any_server.c",
            "core/libcutils/socket_local_client.c",
            "core/libcutils/socket_local_server.c",
            "core/libcutils/socket_loopback_client.c",
            "core/libcutils/socket_loopback_server.c",
            "core/libcutils/socket_network_client.c",
            "core/libcutils/list.c",
            "core/libcutils/load_file.c",

            "core/libzipfile/centraldir.c",
            "core/libzipfile/zipfile.c",


            ],
    local_include_dirs: [
            "core/include", 
            ".", "core/adb", 
            ],
    shared_libs: ["libz", "libssl", "libcrypto"],
    cflags: ["-Wno-error",
            "-DADB_HOST=1",
            "-DHAVE_FORKEXEC=1",
            "-DHAVE_SYMLINKS",
            "-DHAVE_TERMIO_H",
            ],
    recovery_available: true,
}

编译完美通过,可以进行测试了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值