zoukankan      html  css  js  c++  java
  • (OK) adb 连接错误【error: device unauthorized】的解决

    --------------------------------
    adb kill-server
    adb connect 192.168.56.6
    --------------------------------
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    connected to 192.168.56.6:5555
    --------------------------------
    adb shell
    --------------------------------
    error: device unauthorized.
    This adb server's $ADB_VENDOR_KEYS is not set
    Try 'adb kill-server' if that seems wrong.
    Otherwise check for a confirmation dialog on your device.
    --------------------------------

    --------------------------------
    vim system/core/adb/daemon/main.cpp
    -------------------------------- use

        if (ALLOW_ADBD_NO_AUTH && property_get_bool("ro.adb.secure", 0) == 0) {
            auth_required = false;
        }
                        // 添加下面这行,解决【error: device unauthorized】,正式发布 android 时,要还原
            auth_required = false;
    --------------------------------

    --------------------------------
    grep "ro.kernel.qemu" -R . --exclude-dir=out --exclude-dir='.git' --exclude-dir=external --exclude-dir=cts --exclude-dir=prebuilts
    -------------------------------- look
    vim device/generic/common/init.x86.rc
    --------------------------------
    on property:debug.egl.hw=0
        setprop ro.kernel.qemu 1
    --------------------------------

    --------------------------------
    grep "debug.egl.hw" -R . --exclude-dir=out --exclude-dir='.git' --exclude-dir=external --exclude-dir=cts --exclude-dir=prebuilts
    --------------------------------
    vim device/generic/common/init.sh
    -------------------------------- use
            bootcomplete)
                    do_bootcomplete
                        // add the below line,添加这行,即可自动启动adbd,正式发布 android 时,要还原
                    set_property debug.egl.hw 0
    --------------------------------

    --------------------------------
    // vim system/core/rootdir/init.usb.rc
    vim system/core/rootdir/init.rc
    -------------------------------- use
        start console
                        // add the below line, adbd will automatically start
    # adbd is controlled via property triggers in init.<platform>.usb.rc
    service adbd /sbin/adbd --root_seclabel=u:r:su:s0
        class core
        socket adbd stream 660 system system
        disabled
        seclabel u:r:adbd:s0

    # adbd on at boot in emulator
    on property:ro.kernel.qemu=1
        start adbd
                        // 设置系统的ro.kernel.qemu属性为1,即将手机当成模拟器
    --------------------------------------------------------------------

  • 相关阅读:
    2,HTTP请求应答返回码
    1,http协议的细节部分学习
    外包人员面试南航项目功能测试中级-面试总结
    产品线上问题记录一:启动页仅记录时间未检查升级,导致不能弹出自动更新弹窗
    飞机订票-4随机删除票务
    【登录、添加、删除、查询、文本框、各种按钮/框控件、查找替换插入剪切复制粘贴】功能测试用例
    飞机订票-2登录成功脚本
    Matlab-4:追赶法(crout分解)工具箱
    <Matlab-3:追赶法(Doolittle分解)工具箱
    Matlab-2:二分法工具箱
  • 原文地址:https://www.cnblogs.com/ztguang/p/12644899.html
Copyright © 2011-2022 走看看