Android 6.0 device not recognized by adb on Linux after reboot - linux

In Samsung Galaxy S6 Edge with Android 6.0, when the device is rebooted, phone complains that the connected computer doesn't recognize the phone and the device is not any more reachable over ADB from the connected Linux PC. The phone in fact instructs user to install proper drivers for Windows or Mac OS, but as the phone is connected to Linux host, there is no help here.
This means, that in order to continue debugging over ADB, one must manually toggle the USB mode from phone from MTP to PTP, after which phone is connected through ADB again. This makes test automation impossible, as the test scheduler needs to reboot the target device between test rounds.
With previous Android versions, rebooting the device remotely and getting ADB connection back was possible, but with Android 6.0, this became a problem. This particular device had earlier Android 5.1 and there were no problems with remote reboots.
As manually toggling of USB mode solves the problem, it might help, if this mode could be automatically toggled after reboot. So far, only solutions I have seen require device rooting and that is out of question.
Does someone have any idea, how Android 6.0 device could be automatically recognized by ADB after reboot?

The solution was after all simple: the Linux user, who starts up the adb server, needed to be added to the "plugdev" group. This group was defined in file /etc/udev/rules.d/51-android.rules with line:
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
With previous Android versions, this didn't seem to be important as we didn't have any users in that group and everything worked fine.

Related

Connect Android Studio and Wear 3.0 smartwatch via wi-fi

ADB debugging needs connection between Android Studio and Wear 3.0 smartwatch (Samsung Galaxy SW 4). How make them work together?
Switch ON Developer Mode on your Smartwatch, including A) Activation Developer Mode in Settings (in most cases push many times on Settings-> About watch -> Software -> Software Version) B) Set ON ADB Debugging C) Set ON Wi-Fi Debugging
Connect work station with Android Studio and smartwatch wear 3.0 to the same wi-fi network
Connect smartwatch via usb charger with workstation (obligatory in most cases at least once)
Send the command in Terminal - adb connect XXX.YYY.Z.A:5555, where XXX.YYY.Z.A - address of your Wi-fi - find it in settings of wifi in smartwatch or workstation
Accept the request on the smartwatch (always allow / always trust);
Check in Studio the change from No Device to your smartwatch.
Notes:
sometimes it's obligatory to turn on \ off ADB Debugging and Wi-Fi Debugging on smartwatch and try again;
sometimes the connection between smartwatch and Studio is working without USB connection at all (but mostly one time and you need to repeat "adb connect XXX.YYY.Z.A:5555";
sometimes you need smartphone in the same Wi Fi network with workstation and smartwatch, sometimes it works well without smartphone.

No USB devices detected in Android Studio 6.0.1

I used to run applications in my Redmi 3s Prime device. Usually it worked, but now it's showing as no USB devices detected.
Developer options and USB debugging is ON, but it is still not detecting. What should I do?
Please check the Android Studio "event log" information.
If the information is like "ADB server didn't ACK * failed to start daemon *", it means that other software holds the port. Referring to this can solve it.
If you cannot find log information, probably it failed to install the driver.
You may disconnect the phone from your computer, restart the mobile phone and try again.
I have a Redmi 3S and that happened to me too. I solved it by installing the correct drivers from here and MI PC Suite and connected the device.
Also in developer options, turn on "Install via USB", "USB debugging" and turn off "Verify apps over USB". If nothing works, try another USB cable or other port.
Restart PC, Restart phone, if no luck,
Try installing usb driver from this link
http://gsmusbdriver.com/xiaomi-redmi-3s
and try again
Download suitable USB Driver, ADB driver and fastboot driver for Xiaomi Redmi 3s Prime from below link and install them on your computer.
https://www.androidusbdrivers.com/xiaomi-redmi-3s-prime-usb-drivers/
After installing restart your computer.

Windows 8.1 Bluetooth searching issue

I have a windows 8.1 based lap top which supports Bluetooth.
I wrote a java based bluetooth server which gets connections from Android.
The issue is, the device sometimes get invisible(or to say not shown) on android devices.
I've tried with other laptops or Android phones, but sometimes it just doesn't get searched.
I think it's not about my java server program. Even if there's a problem with my program, it should at least be shown on the bluetooth search list of other devices.
I found a very crude solution about this issue.
Always running the 'change pc settings(not the exact name)' app of windows 8.1, and going to 'PC, devices' -> Bluetooth makes it always searchable. If I turn this off(I mean the 'change pc settings' app, not turning off bluetooth), the bluetooth cannot be found by other devices.
Why is this happening? My purpose is, bluetooth server must be turned on automatically after boot, but the reliability of the bluetooth device is failing my intention. However, since my crude solution above is temporarily solving my issue, I do not think it's a hardware issue.
So, my question is :
1) Why is this happening? And how can I mend this?
2) How can I run windows metro app through windows shell? If I can't find any other solution about this, I will have to write a batch script to always run the solution thing above.
Going to Change PC Settings>PC and devices>Bluetooth is initiating a Bluetooth device search. As a side effect, the Bluetooth is also made Discoverable (pairing mode). However, this Discoverable setting is temporary, only while the PC is searching for remote Bluetooth devices.
If you wish to keep Bluetooth Discoverable at all times, you need to check the "Allow Bluetooth devices to find this PC" button box, found in Bluetooth Settings. I found Bluetooth settings by right clicking the Bluetooth system icon. Can also be found in Devices and Printers, by right clicking the Bluetooth adapter icon.

How to connect plantronics wireless headset to windows 8

When I try to connect my plantronics wireless headset via Bluetooth to my windows 8.1, I find that the device is not visible to pair.
Hence I am not able to connect to it.
I have made the settings to enable my laptop detect the bluetooth devices. Still its not able to search.
Try to install [Broadcom Bluetooth 4.0 Driver for Windows 8.1 ] LINK=>> 1 !
At least works fine on my HP-EliteBook-8570p with stereo "BlueDio 99B" headset. After switching the headset ON the Windows connect the device automatically, and switch Audio-Stream into new-attached device. Optimal!
PS - Unfortunately it is still the Problem with Windows 8.1 + Skype( MIC-Problem) :( Windows 8 is the first OS, than not support Skype at all! ;)

FTDI chip detection issue

I'm trying to do some transactions over serial ftdi interface to an ARM based board. On windows i'm able to detect it but when from virtualbox i'm unable to detect the same.
When i connect the same board to a linux sever box, it gets detected and gives me the port /dev/ttyuSB0. Any idea why Virtualbox does not detect?
By default, your VMs in VirtualBox can't see any of your 'real' hardware. You can "move" a USB device from the host to the guest. (Appears as a disconnect from the host, then a connect to the guest), but it's an odd two-step process:
When the VM isn't running, create a USB "filter" on your device.
Then, when it's running, sometimes it grabs it, and sometimes you must click the USB icon (at the bottom of your running VM window, next to your disk/CD/mouse indicators).
Make sure you have a recent version of VirtualBox. I think before 4.x, the USB support was not included in the free version. But I can confirm it works in 4.1.

Resources