Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio errror tryin to get an screenshot : "Unexpected error while obtaining screenshot from device: EOF"

I'm trying to get screenshots from my device from Android Studio

introducir la descripción de la imagen aquí

but i get the message

"Unexpected error while obtaining screenshot from device: EOF"

I tried unplugging my device and restarting Android Studio with no success.

¿How to solve this problem without having to restart my pc?

like image 953
Jorgesys Avatar asked Oct 26 '18 16:10

Jorgesys


2 Answers

I can confirm this bug is still present in the latest adb.exe.

The only working solution at this moment is replacing adb.exe with the last working version. You can find it inside this zip:

https://dl.google.com/android/repository/platform-tools_r28.0.0-windows.zip

Close Android Studio, then extract the file adb.exe (nothing else!) and override the faultly adb.exe at your platform-tools folder.

Default path for adb in Windows:

C:\Users\%USERNAME%\AppData\Local\Android\Sdk\platform-tools\

Finally, just open Android Studio again, and enjoy using the Screen Capture feature again.

like image 122
Blackd Avatar answered Nov 10 '22 12:11

Blackd


I have found two solutions:

At the beginning I tought that the problem would be the ADB but the ADB was running.

I) Open task manager, end the process and tried again succesfully.

enter image description here

II)

I look for the process in the Task Manager to stop the process:

introducir la descripción de la imagen aquí

and then i searched into my Android SDK folder /platform-tools/ directory for the adb.exe to start the process again.

introducir la descripción de la imagen aquí

now i can get the screenshots.

like image 25
Jorgesys Avatar answered Nov 10 '22 13:11

Jorgesys