Comments (4)
Does this work?
dev._service(b'install', b'<package.apk>')
from adb_shell.
Hello. I'm trying the next on a Quest 2 using macOS:
result = device._service(
b"install",
b"/Users/ulysess/Documents/test/test.apk",
)
I get the next issue (running with both sudo or not):
Traceback (most recent call last):
File "/Users/ulysess/Documents/sc/test_adb/.venv/lib/python3.9/site-packages/adb_shell/transport/usb_transport.py", line 283, in bulk_read
return bytes(self._transport.bulkRead(self._read_endpoint, numbytes, timeout=self._timeout_ms(transport_timeout_s)))
File "/Users/ulysess/Documents/sc/test_adb/.venv/lib/python3.9/site-packages/usb1/__init__.py", line 1412, in bulkRead
transferred = self._bulkTransfer(endpoint, data, length, timeout)
File "/Users/ulysess/Documents/sc/test_adb/.venv/lib/python3.9/site-packages/usb1/__init__.py", line 1358, in _bulkTransfer
mayRaiseUSBError(libusb1.libusb_bulk_transfer(
File "/Users/ulysess/Documents/sc/test_adb/.venv/lib/python3.9/site-packages/usb1/__init__.py", line 127, in mayRaiseUSBError
__raiseUSBError(value)
File "/Users/ulysess/Documents/sc/test_adb/.venv/lib/python3.9/site-packages/usb1/__init__.py", line 119, in raiseUSBError
raise __STATUS_TO_EXCEPTION_DICT.get(value, __USBError)(value)
usb1.USBErrorTimeout: LIBUSB_ERROR_TIMEOUT [-7]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/ulysess/Documents/sc/test_adb/main.py", line 235, in <module>
main()
File "/Users/ulysess/Documents/sc/test_adb/main.py", line 203, in main
install_apk(args.install, destination_full_path)
File "/Users/ulysess/Documents/sc/test_adb/main.py", line 164, in install_apk
result = device._service(
File "/Users/ulysess/Documents/sc/test_adb/.venv/lib/python3.9/site-packages/adb_shell/adb_device.py", line 710, in _service
return b''.join(self._streaming_command(service, command, transport_timeout_s, read_timeout_s, timeout_s)).decode('utf8', _DECODE_ERRORS)
File "/Users/ulysess/Documents/sc/test_adb/.venv/lib/python3.9/site-packages/adb_shell/adb_device.py", line 1288, in _streaming_command
adb_info = self._open(b'%s:%s' % (service, command), transport_timeout_s, read_timeout_s, timeout_s)
File "/Users/ulysess/Documents/sc/test_adb/.venv/lib/python3.9/site-packages/adb_shell/adb_device.py", line 1186, in _open
_, adb_info.remote_id, _, _ = self._io_manager.read([constants.OKAY], adb_info)
File "/Users/ulysess/Documents/sc/test_adb/.venv/lib/python3.9/site-packages/adb_shell/adb_device.py", line 339, in read
cmd, arg0, arg1, data = self._read_packet_from_device(adb_info)
File "/Users/ulysess/Documents/sc/test_adb/.venv/lib/python3.9/site-packages/adb_shell/adb_device.py", line 486, in _read_packet_from_device
msg = self._read_bytes_from_device(constants.MESSAGE_SIZE, adb_info)
File "/Users/ulysess/Documents/sc/test_adb/.venv/lib/python3.9/site-packages/adb_shell/adb_device.py", line 442, in _read_bytes_from_device
temp = self._transport.bulk_read(length, adb_info.transport_timeout_s)
File "/Users/ulysess/Documents/sc/test_adb/.venv/lib/python3.9/site-packages/adb_shell/transport/usb_transport.py", line 285, in bulk_read
raise exceptions.UsbReadFailedError('Could not receive data from %s (timeout %sms)' % (self.usb_info, self._timeout_ms(transport_timeout_s)), e)
adb_shell.exceptions.UsbReadFailedError: Could not receive data from first 1WMHH812AS9999 (timeout 10000ms): LIBUSB_ERROR_TIMEOUT [-7]
The log I get: messages.log
from adb_shell.
@jmcerrejon @JeffLIrion I worked around the issue by pushing the apk myself and doing a shell pm install command.....
So for now my workaround works, i just thought it would be a nice feature to have in this otherwise very nice and useful package.
from adb_shell.
Yeah, that's the way to proceed now, but It's a great feature to take into account. 😉
from adb_shell.
Related Issues (20)
- 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
- 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?
- Executing commands in background (&) does not work HOT 2
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.