Android: AdbCommandRejectedException getting properties for device

  • Post author:
  • Post last modified:November 13, 2024
  • Reading time:2 mins read

Problem

From Android Studio, the connection to the device for debugging was not getting established. The ADB logs gave the repeated error,

PropertyFetcher: AdbCommandRejectedException getting properties for device ????????????: insufficient permissions for device

Solution

  1. As described in the documentation, Using Hardware Devices, a file /etc/udev/rules.d/51-android.rules was created.
  2. Using the lsusb -v command, the vendor id (idVendor) and product id (idProduct) were found.
  3. For Micromax Canvas Unite 2 (A106), the following line was added to the file, /etc/udev/rules.d/51-android.rules,
    SUBSYSTEM==”usb”, ATTR{idVendor}==”0c45″, ATTR{idProduct}==”64ad”, MODE=”0666″, GROUP=”plugdev”
  4. The device was disconnected from the PC. On the device, choosing Settings -> Developer option, gives a list of options. Among these, Revoke USB debugging authorization was clicked. When the device is reconnected to PC using the USB, it shows the dialog, Allow USB debugging? Click OK.This solved the problem and the debug connection with the device was established.

Karunesh Johri

Software developer, working with C and Linux.