简体   繁体   中英

Android phone not listed by adb devices

My USB-connected Android phone (a Redmi Note 4, not that it matters) is not being displayed by adb devices . I'm aware of this question on the subject . But in my case the odd thing is that the device is visible in Chrome devtools, and I can "Inspect" webviews. Obviously, I've set USB debugging on on the device. All my Windows USB drivers are installed properly. I've done adb kill-server && adb start-server . I've put the device into MTP/PTP USB mode. I've tried any number of combinations of cables and ports and sequences of plugging in and unplugging and turning USB debugging on and off again. The device is visible under "Portable Devices" in Device Manager.

Things were working fine up until a few days ago. I can think of nothing obvious that changed in the meantime.

After first posting this question, things started working again by accident--I cannot remember the sequence of things I did. Then just recently, the problem reared its ugly head again.

What could account for this state of affairs?

In Your case, the simple and tested solution for Xiaomi Phones .

Go to developer options , scroll down to bottom and turn of MIUI Optimization . It would then visible in your android studio.

Did you tried to add VendorID for your device ? for that please do the following: Run below on terminal to find your VENDOR ID; lsusb

    Find your phones vendor id (it will be probably without any company names) and type,

        sudo gedit ~/.android/adb_usb.ini

    and your adb_usb.ini file should look like:

    # ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
    # USE 'android update adb' TO GENERATE.
    # 1 USB VENDOR ID PER LINE.
    # ie 0x2207
    0x<Add Your Vendor ID here>

    Disconnected and reconnected device and also needed to run below commands on terminal;

        sudo adb kill-server && adb start-server

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM