pure python adb hangs at devices()
See original GitHub issueI have Python 3.7.3 64bit. I have installed pure-python-adb-0.2.6.dev0. Adb server is running on android-emulator. I can connect successfully using adb.exe But using following code :
from ppadb.client import Client
adb = Client(host='127.0.0.1', port=62001)
devices=adb.devices()
The Program seems to stuck at adb.devices()
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
ADB Method freezes with python adb.devices() - Stack Overflow
its working fine . Now this is my code to connect to bluestack with my python app: from ppadb.client import Client adb =...
Read more >pure-python-adb - PyPI
This is pure-python implementation of the ADB client. You can use it to communicate with adb server (not the adb daemon on the...
Read more >Emulator release notes - Android Developers
Fixed a long-standing issue with the Windows emulator where sub-processes, such as ADB commands, failed to start if the username had spaces in...
Read more >Frida Android Helper | Hamza's random blogposts
Enter Frida Android Helper. A command line tool written in Python and makes use of pure-python-adb to interface with the ADB server. For ......
Read more >Native support for Android TV / Android devices - #459 by sweup
using Python ADB implementation with ... line 272, in async_update_ha_state await self.async_device_update() File ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@superuser789 I know this is late, but for anyone else also trying to use the Nox emulator and ADB together, here’s what I did. The reason it hangs is because ppadb does a version check when initializing and if the versions don’t match, it will close the connection.
So the key here is to first of all make sure the Nox version of adb server is running (not any new ones that you have on disk). You can make sure the right version is running by going to
{NOX_INSTALL_DIR}/bin
and running./nox_adb kill-server
and then./nox_adb start-server
You may also need to connect adb if it doesn’t do it automatically. So while still in this folder, run
./adb connect 127.0.0.1:62001
. It should connect to the server and run./adb devices
and make sure you see a device there.Okay, now you have Nox’s version running. The next step is to go into the directory where you’ve installed ppadb, and open up
ppadb/command/host/__init__.py
and find theversion
function.Next, comment out the line that says
version = conn.receive()
and replace it withversion = "24"
(as of right now Nox is using adb version 36 (24 is 36 in HEX). Save that, and everything should work as normal.Its a quick, ugly, and dirty hack but it worked for me.
Hi @superuser789
The adb server is running on your computer and the default port should be
5037
.Thanks