• 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
     

  • 相关阅读:
    由GEE生成逐月MODIS的NDVI影像
    农业温室智能监控系统方案,实现农业自动化的最后一步
    【SQL Server】入门教程-基础篇(完结)
    uni-app 从0 到 1 制作一个项目,收藏等于学会
    力扣:119. 杨辉三角 II(Python3)
    用控件当画笔获得bitmap代码记录
    anchor box --学习笔记
    针对CSP-J/S的每日一练:Day7
    太速科技-基于Xilinx Kintex-7 FPGA K7 XC7K325T PCIeX8 四路光纤卡
    加粗,倾斜,删除线,下划线
  • 原文地址:https://blog.csdn.net/junwua/article/details/126021838