• recovery 调试


    Android 启动后,会先运行 bootloader。 Bootloader 会根据某些判定条件决定是否进入 recovery
    模式。 Recovery 模式会装载 recovery 分区,该分区包含 recovery.img。 Recovery.img 包含了标准
    内核(和 boot.img 中的内核相同)以及 recovery 根文件系统。
     

    开启recovery 模式下的 adb调试

    ## Troubleshooting

    ### `adb devices` doesn't show the device.

        $ adb devices
        List of devices attached

     * Ensure `adbd` is built and running.

    By default, `adbd` is always included into recovery image, as `/system/bin/adbd`. `init` starts
    `adbd` service automatically only in debuggable builds. This behavior is controlled by the recovery
    specific `/init.rc`, whose source code is at `bootable/recovery/etc/init.rc`.

    The best way to confirm a running `adbd` is by checking the serial output, which shows a service
    start log as below.

        [   18.961986] c1      1 init: starting service 'adbd'...

     * Ensure USB gadget has been enabled.

    If `adbd` service has been started but device not shown under `adb devices`, use `lsusb(8)` (on
    host) to check if the device is visible to the host.

    `bootable/recovery/etc/init.rc` disables Android USB gadget (via sysfs) as part of the `fs` action
    trigger, and will only re-enable it in debuggable builds (the `on property` rule will always run
    _after_ `on fs`).

        on fs
            write /sys/class/android_usb/android0/enable 0

        # Always start adbd on userdebug and eng builds
        on property:ro.debuggable=1
            write /sys/class/android_usb/android0/enable 1
            start adbd

    开启串口调试

     

    编译单独

    * Devices using recovery-as-boot (e.g. Pixels, which set BOARD\_USES\_RECOVERY\_AS\_BOOT)

          # After setting up environment and lunch.
          m -j bootimage
          adb reboot bootloader

          # Pixel devices don't support booting into recovery mode with `fastboot boot`.
          fastboot flash boot

          # Manually choose `Recovery mode` from bootloader menu.

    * Devices with a separate recovery image (e.g. Nexus)

          # After setting up environment and lunch.
          mm -j && m ramdisk-nodeps && m recoveryimage-nodeps
          adb reboot bootloader

          # To boot into the new recovery image without flashing the recovery partition:
          fastboot boot $ANDROID_PRODUCT_OUT/recovery.img
     

  • 相关阅读:
    来可LCWLAN-600P产品使用和常见问题说明
    尚硅谷Git笔记
    C++的缺陷和思考(一)
    【计算机视觉 | 目标检测】arxiv 计算机视觉关于目标检测的学术速递(5月26日论文合集)
    【每日一题】744. 寻找比目标字母大的最小字母
    5G边缘计算网关的功能及作用
    解决readme.md文件中粘贴的图片放到GitHub上无法显示问题
    微服务中「组件」集成
    【vue3】wacth监听,监听ref定义的数据,监听reactive定义的数据,详解踩坑点
    学习尚硅谷HTML+CSS总结
  • 原文地址:https://blog.csdn.net/junwua/article/details/126021838