当前位置: 首页 > news >正文

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 Projectpackage {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 nodaemonuser rootgroup root log readprocseclabel u:r:init:s0disabled

on property:sys.boot_completed=1

下添加

    start adbhost

至此修改完毕,make -j32

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

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

相关文章:

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.getR…...

学习c#的第二天

目录 C# 基本语法 using 关键字 class 关键字 C# 中的注释 成员变量 成员函数 类的实例化 标识符 C# 关键字 C# 基本语法 C# 是一种面向对象的编程语言。在面向对象的程序设计方法中,程序由各种相互交互的对象组成。相同种类的对象通常具有相同的类型&…...

CodeWhisperer 使用经验分享

今天给大家分享一下 Amazon CodeWhisperer 编程工具(免费哦),使用这个软件后我的编码质量提升不少,给大家分享一下我的经验。希望大家支持哦。 Amazon CodeWhisperer 是亚⻢逊出品的一款基于机器学习的 AI 编程助手,可…...

数据结构与算法之美学习笔记:18 | 散列表(上):Word文档中的单词拼写检查功能是如何实现的?

目录 前言散列思想散列函数散列冲突解答开篇 前言 本节课程思维导图: Word 的单词拼写检查功能,虽然很小但却非常实用。你有没有想过,这个功能是如何实现的呢?其实啊,一点儿都不难。只要你学完今天的内容,…...

解决java发邮件错误javax.net.ssl.SSLHandshakeException: No appropriate protocol

java发送邮件时报以下错误信息: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher [com.bm6api.controller.v1.AppUserController] - sendLoginAuthCodeMail 发送登录验证码邮件 : {"code":200,"inf…...

杭电oj 2035 人见人爱A^B C语言

#include<stdio.h>void main() {int a, b, i,num;while (~scanf_s("%d%d", &a, &b) && (a ! 0 || b ! 0)){num a;for (i 1; i < b; i){num * a;num % 1000;}printf("%d\n", num);} }...

[量化投资-学习笔记017]Python+TDengine从零开始搭建量化分析平台-异常处理

一个完成的程序一定少不了对异常的处理&#xff0c;以及错误日志的输出。 在之前章节的程序中对这两部分没有进行说明,以下用两个单独的章节进行介绍。 [量化投资-学习笔记016]PythonTDengine从零开始搭建量化分析平台-日志输出 异常处理 Python 通常使用 try .. except 和防…...

Mysql中的索引与事务和B树的知识补充

索引与事务和B树的知识补充 一.索引1.概念2.作用3.使用场景4.使用 二.事务1.为什么使用事务2.事务的概念3.使用3.1脏读问题3.2不可重复读3.3 幻读问题3.4解决3.5 使用代码 三.B树的知识补充1.B树2.B树 一.索引 1.概念 索引是一种特殊的文件&#xff0c;包含着对数据表里所有记…...

2024上海国际智能驾驶技术展览会(自动驾驶展)

2024上海国际智能驾驶技术展览会 2024 Shanghai International Autonomous driving Expo 时间&#xff1a;2024年3月26-28日 地点&#xff1a;上海跨国采购会展中心 随着科技的飞速发展&#xff0c;智能驾驶已经成为了汽车行业的重要趋势。在这个时代背景下&#xff0c;汽车不…...

嵌入式Linux开发,NFS文件系统挂载

在嵌入式linix的开发中&#xff0c;经常会需要在pc端和板端互相传输文件&#xff0c;优先可选择ftp传输&#xff0c;但是有些嵌入式板端不支持&#xff0c;只能使用nfs这种方式&#xff0c;即pc端作为服务端&#xff0c;板端作为客户端&#xff0c;将pc端的某个文件夹挂载到板端…...

什么是3D建模中的“高模”和“低模”?

3D建模中什么是高多边形和低多边形&#xff1f; 高多边形建模和低多边形建模之间的主要区别正如其名称所暗示的那样&#xff1a;您是否在模型中使用大量多边形或少量多边形。 然而&#xff0c;在决定每个模型的细节和多边形级别时&#xff0c;还需要考虑其他事项。最值得注意的…...

python数据结构与算法-04_队列

队列和栈 前面讲了线性和链式结构&#xff0c;如果你顺利掌握了&#xff0c;下边的队列和栈就小菜一碟了。因为我们会用前两章讲到的东西来实现队列和栈。 之所以放到一起讲是因为这两个东西很类似&#xff0c;队列是先进先出结构(FIFO, first in first out)&#xff0c; 栈是…...

从理论到实践:深度解读BIO、NIO、AIO的优缺点及使用场景

文章目录 BIO优缺点示例代码 NIO优缺点示例代码 AIO优缺点示例代码 总结 前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家。点击跳转到网站。 BIO、NIO和AIO是Java编程语言中用于处理输入输出&#xff08;IO…...

Mysql Innodb Cluster集群搭建 - docker

Mysql Innodb Cluster集群搭建 - docker 背景搭建环境架构图3台机器如下:修改三台机器的ip域名映射如下,并重启网络使其生效部署mysql server实例通过docker启动三台mysql server实例,需要映射数据请自行更改配置加入-v启动第一台mysql-server启动第二台mysql-server启动第三…...

如何在 macOS 中删除 Time Machine 本地快照

看到这个可用82GB&#xff08;458.3MB可清除&#xff09; 顿时感觉清爽&#xff0c;之前的还是可用82GB&#xff08;65GB可清除&#xff09;&#xff0c;安装个xcode都安装不上&#xff0c;费解半天&#xff0c;怎么都解决不了这个问题&#xff0c;就是买磁盘情理软件也解决不了…...

mysql的sql_mode参数

msql修改了这个参数&#xff0c;首先mysql需要重新才能生效&#xff0c;还有就是java连接的springboot项目也需要重新启动。之前是遇到了下面的这个报错。只需要把sql_mode设置为空&#xff0c;重启mysql和服务就行 报错 In aggregated query without GROUP BY, expression #1…...

模拟业务流程+构造各种测试数据,一文带你测试效率提升80%

&#x1f4e2;专注于分享软件测试干货内容&#xff0c;欢迎点赞 &#x1f44d; 收藏 ⭐留言 &#x1f4dd; 如有错误敬请指正&#xff01;&#x1f4e2;交流讨论&#xff1a;欢迎加入我们一起学习&#xff01;&#x1f4e2;资源分享&#xff1a;耗时200小时精选的「软件测试」资…...

【linux】 Shell函数返回值

概述 return 返回 shell中通过return返回是有限制的&#xff0c;必须是数字&#xff0c;最大返回255&#xff0c;超过255&#xff0c;则从0开始计算。 通常仅返回0或1&#xff1b;0表示成功&#xff0c;1表示失败。通过echo 直接返回。 在没有return 语句&#xff0c;函数将以…...

面试:容器技术

目录 为什么需要 DevOpsDocker 是什么&#xff1f;Docker 与虚拟机有何不同&#xff1f;什么是 Docker 镜像&#xff1f;什么是 Docker 容器&#xff1f;Docker 容器有几种状态&#xff1f;解释一下 Dockerfile 的 ONBUILD 指令&#xff1f;什么是 Docker Swarm&#xff1f;如何…...

在Linux中nacos集群模式部署

一、安装 配置nacos 在Linux中建立一个nacos文件夹 mkdir nacos 把下载的压缩包拉入刚才创建好的nacos文件中 解压 tar -zxvf nacos-server-1.4.1\.tar.gz 修改配置文件 进入nacos文件中的conf文件的cluster.conf.example 修改cluster.conf.example文件 vim cluster.conf.exa…...

rknn优化教程(二)

文章目录 1. 前述2. 三方库的封装2.1 xrepo中的库2.2 xrepo之外的库2.2.1 opencv2.2.2 rknnrt2.2.3 spdlog 3. rknn_engine库 1. 前述 OK&#xff0c;开始写第二篇的内容了。这篇博客主要能写一下&#xff1a; 如何给一些三方库按照xmake方式进行封装&#xff0c;供调用如何按…...

反向工程与模型迁移:打造未来商品详情API的可持续创新体系

在电商行业蓬勃发展的当下&#xff0c;商品详情API作为连接电商平台与开发者、商家及用户的关键纽带&#xff0c;其重要性日益凸显。传统商品详情API主要聚焦于商品基本信息&#xff08;如名称、价格、库存等&#xff09;的获取与展示&#xff0c;已难以满足市场对个性化、智能…...

【Oracle APEX开发小技巧12】

有如下需求&#xff1a; 有一个问题反馈页面&#xff0c;要实现在apex页面展示能直观看到反馈时间超过7天未处理的数据&#xff0c;方便管理员及时处理反馈。 我的方法&#xff1a;直接将逻辑写在SQL中&#xff0c;这样可以直接在页面展示 完整代码&#xff1a; SELECTSF.FE…...

基于Flask实现的医疗保险欺诈识别监测模型

基于Flask实现的医疗保险欺诈识别监测模型 项目截图 项目简介 社会医疗保险是国家通过立法形式强制实施&#xff0c;由雇主和个人按一定比例缴纳保险费&#xff0c;建立社会医疗保险基金&#xff0c;支付雇员医疗费用的一种医疗保险制度&#xff0c; 它是促进社会文明和进步的…...

在 Nginx Stream 层“改写”MQTT ngx_stream_mqtt_filter_module

1、为什么要修改 CONNECT 报文&#xff1f; 多租户隔离&#xff1a;自动为接入设备追加租户前缀&#xff0c;后端按 ClientID 拆分队列。零代码鉴权&#xff1a;将入站用户名替换为 OAuth Access-Token&#xff0c;后端 Broker 统一校验。灰度发布&#xff1a;根据 IP/地理位写…...

学习STC51单片机31(芯片为STC89C52RCRC)OLED显示屏1

每日一言 生活的美好&#xff0c;总是藏在那些你咬牙坚持的日子里。 硬件&#xff1a;OLED 以后要用到OLED的时候找到这个文件 OLED的设备地址 SSD1306"SSD" 是品牌缩写&#xff0c;"1306" 是产品编号。 驱动 OLED 屏幕的 IIC 总线数据传输格式 示意图 …...

python爬虫:Newspaper3k 的详细使用(好用的新闻网站文章抓取和解析的Python库)

更多内容请见: 爬虫和逆向教程-专栏介绍和目录 文章目录 一、Newspaper3k 概述1.1 Newspaper3k 介绍1.2 主要功能1.3 典型应用场景1.4 安装二、基本用法2.2 提取单篇文章的内容2.2 处理多篇文档三、高级选项3.1 自定义配置3.2 分析文章情感四、实战案例4.1 构建新闻摘要聚合器…...

智能仓储的未来:自动化、AI与数据分析如何重塑物流中心

当仓库学会“思考”&#xff0c;物流的终极形态正在诞生 想象这样的场景&#xff1a; 凌晨3点&#xff0c;某物流中心灯火通明却空无一人。AGV机器人集群根据实时订单动态规划路径&#xff1b;AI视觉系统在0.1秒内扫描包裹信息&#xff1b;数字孪生平台正模拟次日峰值流量压力…...

3-11单元格区域边界定位(End属性)学习笔记

返回一个Range 对象&#xff0c;只读。该对象代表包含源区域的区域上端下端左端右端的最后一个单元格。等同于按键 End 向上键(End(xlUp))、End向下键(End(xlDown))、End向左键(End(xlToLeft)End向右键(End(xlToRight)) 注意&#xff1a;它移动的位置必须是相连的有内容的单元格…...

Redis的发布订阅模式与专业的 MQ(如 Kafka, RabbitMQ)相比,优缺点是什么?适用于哪些场景?

Redis 的发布订阅&#xff08;Pub/Sub&#xff09;模式与专业的 MQ&#xff08;Message Queue&#xff09;如 Kafka、RabbitMQ 进行比较&#xff0c;核心的权衡点在于&#xff1a;简单与速度 vs. 可靠与功能。 下面我们详细展开对比。 Redis Pub/Sub 的核心特点 它是一个发后…...