nohajc / termux-adb

Run adb in Termux without root permissions!
MIT License
359 stars 36 forks source link

CANNOT LINK EXECUTABLE #2

Closed imnisp closed 1 year ago

imnisp commented 1 year ago

Attempting to load termux-adb-v0.1.0-aarch64 and getting: CANNOT LINK EXECUTABLE "adb": cannot locate symbol "libusb_unref_device" referenced by "/data/data/com.termux/files/home/source/termux-adb/termux-adb-v0.1.0-aarch64/libadbhooks.so"...

termux-api/stable,now 0.57 aarch64 [installed,automatic] Termux API commands (install also the Termux:API app)

libusb/stable,now 1.0.26-1 aarch64 [installed,automatic] A C library that provides generic access to USB devices

android-tools/stable 31.0.3p1-6 aarch64 Android platform tools

$ which adb /data/data/com.termux/files/usr/bin/adb

$ /data/data/com.termux/files/usr/bin/adb version Android Debug Bridge version 1.0.41 Version 33.0.3-vanzdobz@gmail.com Installed as /data/data/com.termux/files/usr/bin/adb

Thank you for having given such quick responses!

Any thoughts?

nohajc commented 1 year ago

Could you try pkg update and pkg upgrade first? This looks like incompatible version of libusb which is a dependency of adb and termux-adb.

nohajc commented 1 year ago

Also please verify that you're using adb from the android-tools package. I know there are other versions of adb floating around which may or may not work.

nohajc commented 1 year ago

Ok, I have the same versions of termux-api and libusb. This is android-tools:

pkg show android-tools
Package: android-tools
Version: 31.0.3p1-6
Maintainer: @termux
Installed-Size: 7782 kB
Depends: libc++, libusb, pcre2, googletest, libprotobuf, brotli, zstd, liblz4
Homepage: https://developer.android.com/
Download-Size: 1369 kB
APT-Manual-Installed: yes
APT-Sources: https://grimler.se/termux/termux-main stable/main aarch64 Packages
Description: Android platform tools

Anyway, I already have an item on my TODO list which should resolve linking errors like this one. Sorry for the trouble.

nohajc commented 1 year ago

Interesting, this is what mine says:

$ adb version
Android Debug Bridge version 1.0.41
Version 31.0.3p1-android-tools
Installed as /data/data/com.termux/files/usr/bin/adb

Yours looks different even though it has the same absolute path. Not sure how that happened. I don't know when I'll have the proper fix but in the meantime you could try to reinstall android-tools and/or somehow remove this

Version 33.0.3-vanzdobz@gmail.com
nohajc commented 1 year ago

Actually, by googling the email address, it pointed me to https://github.com/rendiix/termux-adb-fastboot Is it possible you have platform-tools from that PPA? Because that's probably the reason for incompatibility.

nohajc commented 1 year ago

@imnisp Ok, I was able to reproduce your linking issue by installing adb from https://github.com/rendiix/termux-adb-fastboot. I'll work on a fix now.

imnisp commented 1 year ago

Sir, Mea Culpa. Work life has been quite busy of late. You are awesome for your willingness to assist. Thank you kindly.

nohajc commented 1 year ago

All right, here's a new release which should fix the linker error.

However, when I was testing it, I encountered a similar crash to the one which was reported in #1.

I believe it doesn't affect all devices but curiously, on my testing device, it only crashed with adb from the platform-tools package (rendiix/termux-adb-fastboot PPA) and worked fine with the official termux adb from android-tools.

Both the linker error and the crash I encountered should be fixed now.

Can you try and see if it works for you? Thanks.

nohajc commented 1 year ago

I'm closing this for inactivity. It the issue still persists, please reopen.

Damglador commented 1 month ago

Welp. I have same issue trying to run termux-adb after installing it and getting CANNOT LINK EXECUTABLE "termux-adb": cannot locate symbol "_ZN4absl12lts_2024011612log_internal10LogMessagelsIiLi0EEERS2_RKT_" referenced by "/data/data/com.termux/files/usr/lib/libprotobuf-tadb.so"... Packages are updated, termux-api is installed in termux and F-Droid

nohajc commented 1 month ago

I am aware and working on a fix. #28