Create a file according to the document on the Google website./Etc/udev/rules. d/51-android.rules
# ADB protocol on passion (Nexus One) subsystem = "USB", ATTR {idvendor }== "18d1", ATTR {idproduct }== "4e12 ", mode = "0600", owner = "<username>" # fastboot protocol on passion (Nexus One) subsystem = "USB", ATTR {idvendor} = "0bb4 ", ATTR {idproduct }== "0fff", mode = "0600", owner = "<username>" # ADB protocol on Crespo/crespo4g (Nexus S) subsystem = "USB", ATTR {idvendor} = "18d1", ATTR {idproduct} = "4e22", mode = "0600 ", owner = "<username>" # fastboot protocol on Crespo/crespo4g (Nexus S) subsystem = "USB", ATTR {idvendor} = "18d1 ", ATTR {idproduct }== "4e20", mode = "0600", owner = "<username>" # ADB protocol on stingray/wingray (xoom) subsystem = "USB ", ATTR {idvendor }== "22b8", ATTR {idproduct }== "70a9", mode = "0600 ", owner = "<username>" # fastboot protocol on stingray/wingray (xoom) subsystem = "USB", ATTR {idvendor} = "18d1 ", ATTR {idproduct }== "708c", mode = "0600", owner = "<username>" # ADB protocol on maguro/Toro (Galaxy Nexus) subsystem = "USB", ATTR {idvendor} = "04e8", ATTR {idproduct} = "6860", mode = "0600 ", owner = "<username>" # fastboot protocol on maguro/Toro (Galaxy Nexus) subsystem = "USB", ATTR {idvendor} = "18d1 ", ATTR {idproduct }== "4e30", mode = "0600", owner = "<username>" # ADB protocol on Panda (pandaboard) subsystem = "USB ", ATTR {idvendor }== "0451", ATTR {idproduct }== "D101", mode = "0600 ", owner = "<username>" # fastboot protocol on Panda (pandaboard) subsystem = "USB", ATTR {idvendor }== "0451 ", ATTR {idproduct }== "d022", mode = "0600", owner = "<username>" # usbboot protocol on Panda (pandaboard) subsystem = "USB ", ATTR {idvendor }== "0451", ATTR {idproduct }== "d00f", mode = "0600 ", owner = "<username>" # usbboot protocol on Panda (pandaboard ES) subsystem = "USB", ATTR {idvendor }== "0451 ", ATTR {idproduct} = "d010", mode = "0600", owner = "<username>" # ADB protocol on grouper/tilapia (Nexus 7) subsystem = "USB", ATTR {idvendor} = "18d1", ATTR {idproduct} = "4e42", mode = "0600 ", owner = "<username>" # fastboot protocol on grouper/tilapia (Nexus 7) subsystem = "USB", ATTR {idvendor} = "18d1 ", ATTR {idproduct }== "4e40", mode = "0600", owner = "<username>" # ADB protocol on manta (Nexus 10) subsystem = "USB ", ATTR {idvendor }== "18d1", ATTR {idproduct }== "4ee2", mode = "0600 ", owner = "<username>" # fastboot protocol on manta (Nexus 10) subsystem = "USB", ATTR {idvendor }== "18d1 ", ATTR {idproduct }== "4ee0", mode = "0600", owner = "<username>"
This file can help us connect to the mobile phone in ADB mode and send the ADB command. However, if the mobile phone restarts to fastboot mode, we will find that the mobile phone cannot be connected and send the fastboot command.
The command line displays "<waiting for device>". We can view the USB
Lsusb
The usb id of Galaxy Nexus under fastboot is:
Bus 002 device 008: Id 18d1: 4e30 Google Inc.
So we just need
# Fastboot protocol on maguro/Toro (Galaxy Nexus) subsystem = "USB", ATTR {idvendor }== "18d1", ATTR {idproduct} = "4e30 ", method = "0600", owner = "<username>"
Change the mode in to 0666.
# Fastboot protocol on maguro/Toro (Galaxy Nexus) subsystem = "USB", ATTR {idvendor }== "18d1", ATTR {idproduct} = "4e30 ", method = "0666", owner = "<username>"
Run the fastboot devices command to view the device number.