LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Android adb via usb (https://www.linuxquestions.org/questions/slackware-14/android-adb-via-usb-4175712818/)

furrymonster 05-30-2022 11:26 PM

Android adb via usb
 
Hi all,

I am trying to connect an unlocked Pixel 3 running lineageos 18.1 to my Slackware machine via usb/adb. The device previously connected (prior to upgrading to slackware 15.0), usb debugging is enabled, but I can't get the device to show up in any form. I have tried troubleshooting via adb, lsusb, and dmesg - the computer simply doesn't seem to notice the device being plugged in.
I have also tried multiple new cables (since faulty cables seem to be the #1 cause), I have tried usb-A/B vs usb-c cables, and since I also saw that sometimes usb 3.0 seems to be an issue I purchased a new usb-2 hub and tried connecting via that, but nothing. I have tried disabling xhci via kernel parameters at boot but then my keyboard stops working, so that's a non-starter also.

I realize this is unlikely to be slackware-specific, but if anyone has any thoughts/experiences, your help would be greatly appreciated! :-)

petelq 05-31-2022 05:02 AM

I think up to date systems need android-tools version at least v31 and the android udev rules. Check that these have updated with your slackware.

furrymonster 05-31-2022 10:24 PM

Thanks so much petelq! I have android-tools v31 installed, and I tried adding in the relevant udev rules also, with no luck. I think the issue is deeper because there is no dmesg output on connecting the device, hence there is nothing to even trigger udev. Thank you though - I really appreciate your suggestions!

svim 05-31-2022 11:50 PM

Since you made a reference to a USB hub, have you been trying to connect your Pixel through a hub? If so try plugging your cable directly into a USB port on your PC instead.

furrymonster 06-01-2022 09:38 PM

Hi svim, and thank you for your idea! I indeed first tried plugging it directly into the USB ports, both A/B and C. The purchase of the usb-2.0 hub was an attempt to force a connection over usb-2.0, based on some posts that seemed to suggest this might fix the problem. Alas, none of the options work. Thank you though! :-)

rokytnji 06-01-2022 10:06 PM

Maybe try a new cable? Since dmesg does not see anything.

furrymonster 06-05-2022 02:35 PM

Thanks so much, rokytnji. I have tried a number of USB A/B and C cables, including a number of high-quality brand-new ones, but no luck. Thank you for the suggestion, though. I've now also tried using other distros and other machines, and the same problem persists, so it's clearly not just Slackware. Thanks anyway! :-)

ricky_cardo 06-05-2022 04:22 PM

Thinking back there might be a USB option in the Android OS? Sorry I can't be more helpful, try toggling the different modes that the phone can emulate. I think there is mass storage, adb mode and some others... I have had problems in the past too, trying to remember what I did. Could be your phone is trying to be the host to a mass storage (ie plugging additional storage into the phone)

Tonus 06-06-2022 03:57 AM

Hi
Did you enabled "developper options" ?
You get it by selecting 7 or so times the "version number" in some submenu.

IIRC you'll find then the option to allow adb over usb.

furrymonster 06-06-2022 10:30 AM

Thank you both, ricky_cardo and Tonus!

I have tried those things (all available USB options as well as enabling developer options). Specifically, I have tried:
- Two different computers
- Two different linux distros (Slackware, Ubuntu)
- Many, many (new, high-quality) USB cables, both USB-C and USB-A/B
- Developer mode enabled
- USB debugging enabled, authorizations revoked and re-enabled
- Setting default USB configuration to File Transfer/USB tethering/MIDI/PTP/No data transfer
- Airplane mode
- Connecting over a USB-2.0 hub
- Booting the device to recovery mode, enabling adb

Regardless, I have the same outcome. The phone charges but no other recognition of being plugged in is made. That is, the computer cannot see the phone in 'adb devices', 'lsusb' or 'dmesg'. The phone doesn't see the computer either, in that it doesn't bring up the USB notification.

Thank you all for your suggestions! :-)

ctrlaltca 06-06-2022 10:45 AM

At this point, either the USB connector is faulty or the software is buggy.
You can reboot the phone in recovery mode and see if enabling adb sideload makes the phone visible via adb to the pc.
If you are brave enough, you can boot a custom recovery (TWRP or similar) and use MTP/adb from there.
If that doesn't work, it's probably a physical problem.

EDIT: sorry, i saw you already tried recovery mode, i guess LOS recovery.
EDIT2: you could use adb wifi, but iirc you first need to authorize the pc using adb via cable.

mrclisdue 06-06-2022 03:33 PM

Use an android device to download Remote ADB shell, and see if you can connect wirelessly, without usb.

At the very least it should help you determine whether ADB debugging is actually working

svim 06-06-2022 09:41 PM

I wouldn't spend too much time messing with different cables or your anything with your Pixel 3. Given that you things were apparently working out OK before and the problem only started occurring when you upgraded to Slack 15, that's an indicator you need to focus on something that changed with the newer OS. It just isn't likely that upgrading to 15 would cause a USB cable to fail nor would it reset any options in your phone.
Are you having any issues with any other external devices connecting to your PC via USB?
This is a long-shot but did you alter anything in your PC's BIOS/UEFI to do the upgrade?
It's odd that there's not even a failure notation in dmesg.

bassmadrigal 06-07-2022 05:05 PM

Have you checked the USB port of the Pixel 3? On my older Pixel 2 XL (that I have since replaced with the P5 and now P6), I would get pocket lint in the port and after enough build-up, the plug wouldn't seat all the way and charging/data connections would be intermittent. I would clear it with a needle. Some of it would be quite compacted.

ricky_cardo 06-08-2022 12:33 PM

I tested a pixel4 on slackware current:


dmesg on connection:
Code:

[123574.101304] usb 1-2: new high-speed USB device number 4 using xhci_hcd
[123574.235042] usb 1-2: New USB device found, idVendor=18d1, idProduct=4ee1, bcdDevice= 4.40
[123574.235047] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[123574.235048] usb 1-2: Product: Pixel 4 XL
[123574.235049] usb 1-2: Manufacturer: Google
[123574.235050] usb 1-2: SerialNumber: xxxxxxxxxxx



So I definitely see when connected in dmesg I would T/S that first.
( I have developer mode enabled but did not change any usb options yet)


All times are GMT -5. The time now is 12:19 AM.