Comments (5)
FYI:
This device is rather resource constrained and is in some instances rather slow at responding to ADB commands (including when using the ADB binary directly, not involving
adb_shell
)
from adb_shell.
I admit that the timeouts are confusing, I'll see if I can clean that up. But I don't think this is a bug...
adb_shell/adb_shell/hidden_helpers.py
Lines 89 to 98 in 3b3d23f
adb_shell/adb_shell/hidden_helpers.py
Lines 134 to 139 in 3b3d23f
Also note that the hack seems to fail if the user modifies
adb_shell.constants.DEFAULT_READ_TIMEOUT_S
First of all, you shouldn't modify that -- it's supposed to be a constant, hence the constants.py
module and the all caps name.
Second, I think you would need to modify adb_shell.adb_device.constants.DEFAULT_READ_TIMEOUT_S
due to the way the imports are performed. But again, you shouldn't do this.
But most of all, you shouldn't need this workaround in the first place. Try providing all three timeout parameters to the shell()
method and see if that fixes the problem. You can use the same value for all three.
from adb_shell.
Hi Jeff,
I admit that the timeouts are confusing, I'll see if I can clean that up. But I don't think this is a bug...
adb_shell/adb_shell/hidden_helpers.py
Lines 89 to 98 in 3b3d23f
adb_shell/adb_shell/hidden_helpers.py
Lines 134 to 139 in 3b3d23f
Yes, it might just be that I misunderstood what timeout values are supposed to trump others :). I (incorrectly?) assumed that the timeouts provided to the AdbDeviceTcp
constructor and/or the connect()
call would apply for .shell()
calls if I omitted the timeout parameters when calling .shell()
.
Also note that the hack seems to fail if the user modifies
adb_shell.constants.DEFAULT_READ_TIMEOUT_S
First of all, you shouldn't modify that -- it's supposed to be a constant, hence the
constants.py
module and the all caps name.Second, I think you would need to modify
adb_shell.adb_device.constants.DEFAULT_READ_TIMEOUT_S
due to the way the imports are performed. But again, you shouldn't do this.
Yes, I realize I shouldn't be modifying these constants. I did this as a last resort because I didn't understand why the timeout I specified in the AdbDeviceTcp
constructor and connect()
call didn't come into effect.
But most of all, you shouldn't need this workaround in the first place. Try providing all three timeout parameters to the
shell()
method and see if that fixes the problem. You can use the same value for all three.
Makes sense, I'll try this out, cheers.
Thanks again,
Janus
from adb_shell.
Try providing all three timeout parameters to the
shell()
method and see if that fixes the problem. You can use the same value for all three.
Did that work?
from adb_shell.
Try providing all three timeout parameters to the
shell()
method and see if that fixes the problem. You can use the same value for all three.Did that work?
Hi Jeff,
Yes, I just verified that if I set all 3 timeouts in .shell()
to 4.0, the timeout does become 4.0 seconds as expected:
adb_shell.exceptions.TcpTimeoutException: Reading from <IP>:<PORT> timed out (4.0 seconds)
Thanks for guiding me to a cleaner solution!
Best,
Janus
from adb_shell.
Related Issues (20)
- Using pull on BytesIO object HOT 3
- Pushing large files always timeouts HOT 12
- Implement the pair command for Android 11+ devices HOT 6
- How to connect more than two devices at the same time? HOT 3
- AdbDeviceUsb not working with MacOS X due to error 'LIBUSB_ERROR_ACCESS [-3]' HOT 2
- default_transport_timeout_s is ignored HOT 1
- Add support for pulling directories HOT 2
- usb1.USBErrorAccess: LIBUSB_ERROR_ACCESS [-3] HOT 2
- adb server claims usb device: results in USBErrorBusy
- Feature request install package analog to adb install HOT 4
- get return code of shell command HOT 4
- How can I get access to the device with password to adb? HOT 5
- Add adb forward functionality
- packaging this project for Debian HOT 3
- Improvement
- Streaming Shell doesn't result in a stream ?
- usb1.USBErrorBusy: LIBUSB_ERROR_BUSY [-6] when connect to device HOT 2
- Timeout shell commands after gaining root on device
- Please avoid re-tagging
- No ability to list attached devices?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adb_shell.