当前位置: 首页 > 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…...

vscode里如何用git

打开vs终端执行如下&#xff1a; 1 初始化 Git 仓库&#xff08;如果尚未初始化&#xff09; git init 2 添加文件到 Git 仓库 git add . 3 使用 git commit 命令来提交你的更改。确保在提交时加上一个有用的消息。 git commit -m "备注信息" 4 …...

电脑插入多块移动硬盘后经常出现卡顿和蓝屏

当电脑在插入多块移动硬盘后频繁出现卡顿和蓝屏问题时&#xff0c;可能涉及硬件资源冲突、驱动兼容性、供电不足或系统设置等多方面原因。以下是逐步排查和解决方案&#xff1a; 1. 检查电源供电问题 问题原因&#xff1a;多块移动硬盘同时运行可能导致USB接口供电不足&#x…...

对WWDC 2025 Keynote 内容的预测

借助我们以往对苹果公司发展路径的深入研究经验&#xff0c;以及大语言模型的分析能力&#xff0c;我们系统梳理了多年来苹果 WWDC 主题演讲的规律。在 WWDC 2025 即将揭幕之际&#xff0c;我们让 ChatGPT 对今年的 Keynote 内容进行了一个初步预测&#xff0c;聊作存档。等到明…...

三体问题详解

从物理学角度&#xff0c;三体问题之所以不稳定&#xff0c;是因为三个天体在万有引力作用下相互作用&#xff0c;形成一个非线性耦合系统。我们可以从牛顿经典力学出发&#xff0c;列出具体的运动方程&#xff0c;并说明为何这个系统本质上是混沌的&#xff0c;无法得到一般解…...

学校时钟系统,标准考场时钟系统,AI亮相2025高考,赛思时钟系统为教育公平筑起“精准防线”

2025年#高考 将在近日拉开帷幕&#xff0c;#AI 监考一度冲上热搜。当AI深度融入高考&#xff0c;#时间同步 不再是辅助功能&#xff0c;而是决定AI监考系统成败的“生命线”。 AI亮相2025高考&#xff0c;40种异常行为0.5秒精准识别 2025年高考即将拉开帷幕&#xff0c;江西、…...

Xen Server服务器释放磁盘空间

disk.sh #!/bin/bashcd /run/sr-mount/e54f0646-ae11-0457-b64f-eba4673b824c # 全部虚拟机物理磁盘文件存储 a$(ls -l | awk {print $NF} | cut -d. -f1) # 使用中的虚拟机物理磁盘文件 b$(xe vm-disk-list --multiple | grep uuid | awk {print $NF})printf "%s\n"…...

七、数据库的完整性

七、数据库的完整性 主要内容 7.1 数据库的完整性概述 7.2 实体完整性 7.3 参照完整性 7.4 用户定义的完整性 7.5 触发器 7.6 SQL Server中数据库完整性的实现 7.7 小结 7.1 数据库的完整性概述 数据库完整性的含义 正确性 指数据的合法性 有效性 指数据是否属于所定…...

苹果AI眼镜:从“工具”到“社交姿态”的范式革命——重新定义AI交互入口的未来机会

在2025年的AI硬件浪潮中,苹果AI眼镜(Apple Glasses)正在引发一场关于“人机交互形态”的深度思考。它并非简单地替代AirPods或Apple Watch,而是开辟了一个全新的、日常可接受的AI入口。其核心价值不在于功能的堆叠,而在于如何通过形态设计打破社交壁垒,成为用户“全天佩戴…...

「全栈技术解析」推客小程序系统开发:从架构设计到裂变增长的完整解决方案

在移动互联网营销竞争白热化的当下&#xff0c;推客小程序系统凭借其裂变传播、精准营销等特性&#xff0c;成为企业抢占市场的利器。本文将深度解析推客小程序系统开发的核心技术与实现路径&#xff0c;助力开发者打造具有市场竞争力的营销工具。​ 一、系统核心功能架构&…...

API网关Kong的鉴权与限流:高并发场景下的核心实践

&#x1f525;「炎码工坊」技术弹药已装填&#xff01; 点击关注 → 解锁工业级干货【工具实测|项目避坑|源码燃烧指南】 引言 在微服务架构中&#xff0c;API网关承担着流量调度、安全防护和协议转换的核心职责。作为云原生时代的代表性网关&#xff0c;Kong凭借其插件化架构…...