Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adb error (error: protocol fault (couldn't read status): Invalid argument)

Tags:

android

adb

I am unable to connect to my phone using adb. I am getting the following error:

D:\softwares\Development\Android\android-sdk-windows\platform-tools>adb devices -l
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: protocol fault (couldn't read status): Invalid argument

http://s18.postimg.org/7fdc8w9dl/screenshot_97.png

Previously i am getting this error in windows 8.1 then i have installed windows 10 and error resolved but now again i am unable to connect my cellphone with adb :(.

I am getting this error even if no device is connected.

Eclipse error:

[2015-10-24 13:25:02 - ddms] Failed to initialize Monitor Thread: Unable to establish loopback connection
[2015-10-24 13:25:02 - adb] error: protocol fault (couldn't read status): Invalid argument
[2015-10-24 13:25:02 - ddms] 'D:\softwares\Development\Android\android-sdk-windows\platform-tools\adb.exe,start-server' failed -- run manually if necessary

Update: Even adb tcp is also not working so i think this is not a driver issue.

ADB traces http://s24.postimg.org/mtfdwf3id/screenshot_99.png

like image 493
H4SN Avatar asked Oct 24 '15 08:10

H4SN


8 Answers

See my answer here, for me adb port 5037 was in use, killing the process using the port resolve the issue.

like image 116
piouson Avatar answered Sep 29 '22 00:09

piouson


In your task manager, find adb.exe > right click and End Process.

solved this way for me..

like image 41
Mustafa Al Ajmi Avatar answered Sep 30 '22 00:09

Mustafa Al Ajmi


None of mentioned solutions work, seems like something wrong with windows, finally i ended up with resetting my windows 10 and issue resolved.

like image 31
H4SN Avatar answered Oct 01 '22 00:10

H4SN


In my case:

adb kill-server
adb start-server

:)

like image 20
Mauricio Porto Avatar answered Sep 28 '22 00:09

Mauricio Porto


Just Restart PC and everything mean Android Studio and your android Device its working for me

like image 20
Muhammad Natiq Avatar answered Oct 01 '22 00:10

Muhammad Natiq


As you may found in source code of ADB, something raised up this error:

     if (!ReadFdExactly(fd, buf, 4)) {
         *error = perror_str("protocol fault (couldn't read status)");
         return false;
     }

Try to export export ADB_TRACE=all

And rerun adb devices

With this env variable you will see much more info

like image 20
Laser Avatar answered Oct 02 '22 00:10

Laser


I was also getting this error so here's how I solved it. I killed the adb process and start again.

Steps:

  1. Open the Task manager (Windows);
    • You can press Ctrl+Shift+Esc and task manager will be opened.
  2. Find adb.exe and right click on it. Click the "End process" menu item;
  3. Open a command prompt and type adb start-server and it will start the adb again.
like image 44
Sampat Sharma Avatar answered Sep 29 '22 00:09

Sampat Sharma


Although not exactly the same error as the OP, I was getting a similar error in Windows:

❯ adb.exe start-server
error: protocol fault (couldn't read status): No error

This error was related to my port proxy. It seems I had setup some rules that resulted in the adb client/server not being able to communicate with each other.

I was able to solve this by resetting my portproxy settings:

netsh interface portproxy reset

And now I can start the adb server:

❯ adb.exe start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully
like image 21
badsyntax Avatar answered Sep 28 '22 00:09

badsyntax