adb: failed to read command: No error: 0

cinux

New Member


Messages: 3

Yesterday I tried to sideload something (Custom ROM and Magisk) onto my android device and got the error messages: adb: failed to read command: No error: 0. First I thought this was because of the package and ROM error during download process. But it's actually not, I jumped onto another machine (Running Windows 10) with the same package and ROM I was able to sideload those without any issue. After that I think the problem is somewhat relate to the android-tools-adb itself, with both from pkg and ports, it produce the same error message.
Note: The command adb devices still recognize my device every time it plugged.

Some information
FreeBSD FreeBSD 12.1-RELEASE-p10 FreeBSD 12.1-RELEASE-p10 GENERIC amd64
android-tools-adb-29.0.6_1 Android debug bridge command line tool
Dmesg
 

mickey

Aspiring Daemon

Reaction score: 195
Messages: 591

I did not have much luck with adb built from ports either, it did not even want to list or connect to my Android connected via USB. Installed the software on Windows 10 (some versions newer it seems) and it works without problems.
 
OP
C

cinux

New Member


Messages: 3

I did not have much luck with adb built from ports either, it did not even want to list or connect to my Android connected via USB. Installed the software on Windows 10 (some versions newer it seems) and it works without problems.
For me I have to start it as root if not it's not going to list my devices. But it's useless anyway because it can't perform other actions.
With every other linux distro I've used, I never had a problem with adb neither.
 

mickey

Aspiring Daemon

Reaction score: 195
Messages: 591

For me I have to start it as root if not it's not going to list my devices. But it's useless anyway because it can't perform other actions.
With every other linux distro I've used, I never had a problem with adb neither.
I cannot say with certainty, but I think I tried running it as root. Do you use USB to connect or network? Is there some USB driver needed? I think Windows required some USB driver that presumably gets installed with Samsung Smart Smitch. In the sense of "getting the job done" I momentarily gave up on using adb on FreeBSD, but in the long run I would much prefer not having to use Windows for this.
 

mickey

Aspiring Daemon

Reaction score: 195
Messages: 591

I experienced this myself, it seems there is a bug in version 1.0.41 of the client, and this causes attached devices to disconnect. You can use it wirelessly, this is how I worked around this, or downgrade adb like described in this blog post, paragraph 1.3: https://baohaojun.github.io/blog/2020/06/16/0-Android-App-development-under-FreeBSD.html.
That's odd, both FreeBSD and Windows adb identify itself as version 1.0.41, but the version of devel/android-tools-adb in ports is currently 29.0.6 whereas on Windows I got:
Code:
Android Debug Bridge version 1.0.41
Version 30.0.4-6686687
If I find the time, I will try to connect over network instead of USB, but for that I will probably have to tinker with my firewall first.
 

Maxnix

Well-Known Member

Reaction score: 214
Messages: 335

If I find the time, I will try to connect over network instead of USB, but for that I will probably have to tinker with my firewall first.
AFAIK by default adb just uses TCP port 5555, but you can use whateve you want. Just open your port of choose for TCP and you're done. :)
 
Top