Search code examples
androidubuntuadb

Can I connect any android device with ubuntu?


I came to know that we can use adb commands to detect android devices. But posts I read were specifically for HTC phones. So I want to know that can I connect any of my android device with ubuntu 12.x ? Or I will need to change some settings of that device? There are some local devices as well as sony xperia, about which I am thinking to buy but I want to make sure that by adb commands can I connect and use all devices equally on ubuntu or it varies from device to device?


Solution

  • Under linux no driver is needed for adb connectivity. Although a little setup is required to change the adb device file permissions to make it accessible by non-root users. Personally I use this universal udev rule which works for all android devices regardless of the manufacturer:

    ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:ff420?:*", MODE="0666"
    

    Older adb versions used to have a hardcoded VendorID whitelist. So owners of devices made by non white-listed vendors were required to add their VendorID to the ~/.android/adb_usb.ini. But this is no longer required.