linux下进不去adb

linux 进不去adb

cat /sys/kernel/debug/usb/devices
查看是否有adb口

首先查看adb是否被识别成串口
option
如果被识别成串口

 方法1: https://patchwork.kernel.org/project/linux-usb/patch/[email protected]/
		diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
		index 664e61f16b6a..f98943a57ff0 100644
		--- a/drivers/usb/serial/option.c
		+++ b/drivers/usb/serial/option.c
		@@ -1987,6 +1987,12 @@  static int option_probe(struct usb_serial *serial,
		if (iface_desc->bInterfaceClass == USB_CLASS_MASS_STORAGE)
			return -ENODEV;	 
		+	/* Do not bind Android Debug Bridge interfaces */
		+	if (iface_desc->bInterfaceClass == USB_CLASS_VENDOR_SPEC &&
		+		iface_desc->bInterfaceSubClass == 0x42 &&
		+		iface_desc->bInterfaceProtocol == 1)
		+		return -ENODEV;
		+
		/*
		 * Don't bind reserved interfaces (like network ones) which often have
		 * the same class/subclass/protocol as the serial interfaces.  Look at
方法2:options_id
    .driver_info = RSVD(5)

环境配置

  https://blog.csdn.net/qq_43554951/article/details/119867169
	1.cd /etc/udev/rules.d
	2.gedit 51-adb.rules (编辑rules文件,文件名随意,如gedit会自动打开一个文本,且将文本命名为51-adb.rules)
	3.在51-adb.rules文件里添加设备的PID和VID信息
	    SUBSYSTEM=="usb",ATTRS{idVendor}=="2xxx",ATTRS{idProduct}=="09xx",MODE="0666",OWNER="q"
	4.保存并关闭51-adb.rules

emulator-5554

 netstat -ano | findstr 5554
	杀掉进程taskkill /pid 进程号 /f

模块与Linux设备连接的端口是USB3.0

使用usb2.0线加载成usbfs即可

你可能感兴趣的:(usb,驱动开发)