Closed Swenlon closed 3 months ago
Have you installed Termux:API too? It is a separate apk which you need for termux-usb to work. https://f-droid.org/packages/com.termux.api/
Thank you very much, the problem has been solved; After installing Termux:API, termux-usb -l can indeed scan USB devices, and termux-adb can also devices out of the device; $ termux-usb -l List of devices attached "/dev/bus/usb/001/007"
$ termux-adb devices List of devices attached WGY021B19000130 unauthorized
$ termux-adb devices List of devices attached WGY021B19000130 device
Describe the bug A clear and concise description of what the bug is.
To Reproduce termux-adb devices
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Attach output of the following commands
RUST_LOG=debug ./termux-adb
(run with debug logs enabled)pkg show android-tools
(show package info)adb version
(show adb version) $ pkg show android-tools Package: android-tools Version: 35.0.2 Maintainer: @termux Installed-Size: 12.8 MB Depends: abseil-cpp, brotli, libc++, liblz4, libprotobuf, pcres2, zlib, zstd Homepage: https://developer.android.com/ Download-Size: 2020 kB APT-Sources: https://packages-cf.termux.dev/apt/termux-main stable/main aarch64 Packages Description: Android platform tools$ pkg show termux-adb Package: termux-adb Version: 0.2.2-2 Maintainer: nohacj Installed-Size: 6250 kB Depends: brotli, libc++, liblz4, libprotobuf-tadb-core, libusb, termux-api, zlib, zstd Homepage: https://github.com/nohacj/termux-adb Download-Size: 1579 kB APT-Manually-Installed: yes APT-Sources: https://nohajc.github.io termux/extras aarch64 Packages Description: Run adb and fastboot in Termux without root permissions
$ pkg show termux-api Package: termux-api Version: 0.58.0-1 Maintainer: https://github.com/termux Installed-Size: 348 kB Depends: bash, util-linux, termux-am (>= 0.8.0) Homepage: https://wiki.termux.com/wiki/Termux:API Download-Size: 25.0 kB APT-Manual-Installed: yes APT-Sources: https://packages-cf.termux.dev/apt/termux-main stable/main aarch64 Packages Description: Termux API commands (install also the Termux:API app)
Attach contents of the following files (after running with debug logs enabled)
/data/data/com.termux/files/usr/tmp/adb.10233.log
/data/data/com.termux/files/usr/tmp/termux-adb.10233.log
Additional context $ termux-api-start Starting service: Intent { cmp=com.termux.api/.KeepAliveService } Error: Not found; no service started. $ termux-usb -l
logcat|grep -i termux 09-04 09:20:22.699 4093 4093 W bash : type=1400 audit(0.0:10566): avc: granted { execute } for name="termux-api-start" dev="mmcblk0p4" ino=137935 scontext=u:r:untrusted_app_27:s0:c106,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c106,c256,c512,c768 tclass=file app=com.termux 09-04 09:20:22.699 4093 4093 W bash : type=1400 audit(0.0:10567): avc: granted { execute } for name="termux-api-start" dev="mmcblk0p4" ino=137935 scontext=u:r:untrusted_app_27:s0:c106,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c106,c256,c512,c768 tclass=file app=com.termux 09-04 09:20:22.699 4093 4093 W bash : type=1400 audit(0.0:10568): avc: granted { execute_no_trans } for path="/data/data/com.termux/files/usr/bin/termux-api-start" dev="mmcblk0p4" ino=137935 scontext=u:r:untrusted_app_27:s0:c106,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c106,c256,c512,c768 tclass=file app=com.termux 09-04 09:20:22.699 4093 4093 W bash : type=1400 audit(0.0:10569): avc: granted { execute } for name="dash" dev="mmcblk0p4" ino=133599 scontext=u:r:untrusted_app_27:s0:c106,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c106,c256,c512,c768 tclass=file app=com.termux 09-04 09:20:22.703 4093 4093 W termux-api-star: type=1400 audit(0.0:10570): avc: granted { execute } for path="/data/data/com.termux/files/usr/bin/dash" dev="mmcblk0p4" ino=133599 scontext=u:r:untrusted_app_27:s0:c106,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c106,c256,c512,c768 tclass=file app=com.termux 09-04 09:20:23.320 4094 4094 W ziparchive: Unable to open '/data/data/com.termux/files/usr/libexec/termux-am/am.dm': No such file or directory 09-04 09:20:23.436 4094 4094 D AndroidRuntime: Calling main entry com.termux.termuxam.Am 09-04 09:20:23.451 722 1737 W ActivityManager: Unable to start service Intent { cmp=com.termux.api/.KeepAliveService } U=0: not found 09-04 09:20:29.211 4109 4109 W bash : type=1400 audit(0.0:10578): avc: granted { execute } for name="termux-usb" dev="mmcblk0p4" ino=137918 scontext=u:r:untrusted_app_27:s0:c106,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c106,c256,c512,c768 tclass=file app=com.termux 09-04 09:20:29.215 4109 4109 W bash : type=1400 audit(0.0:10579): avc: granted { execute } for name="termux-usb" dev="mmcblk0p4" ino=137918 scontext=u:r:untrusted_app_27:s0:c106,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c106,c256,c512,c768 tclass=file app=com.termux 09-04 09:20:29.215 4109 4109 W bash : type=1400 audit(0.0:10580): avc: granted { execute_no_trans } for path="/data/data/com.termux/files/usr/bin/termux-usb" dev="mmcblk0p4" ino=137918 scontext=u:r:untrusted_app_27:s0:c106,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c106,c256,c512,c768 tclass=file app=com.termux 09-04 09:20:29.215 4109 4109 W bash : type=1400 audit(0.0:10581): avc: granted { execute } for name="bash" dev="mmcblk0p4" ino=133965 scontext=u:r:untrusted_app_27:s0:c106,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c106,c256,c512,c768 tclass=file app=com.termux 09-04 09:20:29.215 4109 4109 W termux-usb: type=1400 audit(0.0:10582): avc: granted { execute } for path="/data/data/com.termux/files/usr/bin/bash" dev="mmcblk0p4" ino=133965 scontext=u:r:untrusted_app_27:s0:c106,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c106,c256,c512,c768 tclass=file app=com.termux 09-04 09:20:29.847 4111 4111 W ziparchive: Unable to open '/data/data/com.termux/files/usr/libexec/termux-am/am.dm': No such file or directory 09-04 09:20:29.962 4111 4111 D AndroidRuntime: Calling main entry com.termux.termuxam.Am