Tiny Core Linux
Tiny Core Base => Micro Core => Topic started by: Santos on March 09, 2022, 03:59:54 PM
-
Hello
https://developer.android.com/studio/releases/platform-tools#downloads
I just recently downloaded the latest version of adb from the AOSP project page. In CorePlus with lots of extensions loaded, the binary does runs and I'm able to execute it without any issues.
However, in microcore with no extension loaded, I'm getting the -sh: ./adb: not found error. I don't know which one is the missing piece in MC.
Typing in: ldd ./adb
linux-vdso.so.1 (0x00007ffc56bf3000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f15ed6e5000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f15ed6c8000)
libm.so.6 => /lib/libm.so.6 (0x00007f15ed5a4000)
librt.so.1 => /lib/librt.so.1 (0x00007f15ed59b000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f15ed581000)
libc.so.6 => /lib/libc.so.6 (0x00007f15ed3fd000)
/lib64/ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x00007f15eddcb000)
Any advise?
Thank you.
-
Hi Santos
It's saying that adb can not be found in the current directory. Do you see it if you run this command:
ls -l a*
If it shows up, see if running this fixes it:
chmod 775 adb
-
Hello Rich
Yes, adb it is present and permissions are properly set up.
tc@box:~/Descargas/adb64/platform-tools$ ls -l a*
-rwxr-xr-x 1 tc staff 8168736 Mar 9 16:20 adb
What confuses me is that if the file is non-existing the error message is almost the same, but the 'dash' at the beginning is missing.
sh: ./adc: not found
-
Hi Santos
Do either of these commands produce a different response:
./adb --help
./adb help
Does running this first help:
hash -r
Maybe you need to start loading your extensions to see if one of them allows it to work. Openssl, tls, and python
come to mind.
-
Hi Santos
I think this type of error sometimes occurs when bash is needed but not found.
-
Hello Rich
...
./adb --help
./adb help
...
hash -r
...
I tried:
./adb help
./adb --help
On my CorePlus installation I do have output. But same error message (not found) popping up on my bare microcore install.
For the hash command, result was the same (not found message).
...
Maybe you need to start loading your extensions to see if one of them allows it to work. Openssl, tls, and python
come to mind.
I was trying to avoid going that path. Is there any "tracer" (besides ldd) so I can check on libraries interacting with the binary?
Hi Santos
I think this type of error sometimes occurs when bash is needed but not found.
bash is not present on my CorePlus install, seems like adb is not linked to it.
Thank you for your help.
-
Hi Santos
... I was trying to avoid going that path. Is there any "tracer" (besides ldd) so I can check on libraries interacting with the binary? ...
It's possible using strace might identify what was "not found" , but strace can generate a lot of output.
It's possible what's missing is not a library, but some support file provided by an extension, or an environmental
variable that gets set, or a link to a file that gets created.
-
Hello Rich
Thank you!
I'll try.
But first I'll need to read on how to use strace. I'm very positive that the man page will suffice.
-
Hi Santos
Something like this might be a start:
strace -e trace=open ./adb
-
Is a symlink /lib64 -> /lib present?
-
Hi Juanito
According to the ldd command in the original post, I think it is.
-
Hello
...
strace -e trace=open ./adb
Did it. Almost exact output. I really thought I'll be getting lots of sys calls, and such.
tc@box:~$ strace ./adb-bin/platform-tools/adb
execve("./adb-bin/platform-tools/adb", ["./adb-bin/platform-tools/adb"], 0x7fffd6bcc430 /* 19 vars */) = -1 ENOENT (No such file or directory)
strace: exec: No such file or directory
+++ exited with 1 +++
Is a symlink /lib64 -> /lib present?
It is.
***
I ended up loading extension by extension ( while loop) to check which one triggered adb to be executed. Firefox did it.
Currently, I'm loading each dep at at time to see whats the extension with the library/files, etc. that is allowing adb to run.
This is what I'm getting from strace after loading firefox and being able to run adb .
(See attachment with messy output due to script ).
-
Hello
After loading all firefox dependencies adb wasn't being executed.
The line I used to test the packages was this (ignore leading +, was getting forum error):
++while read -r line ; ++do tce-load -il $line ; ++sleep 3 ; /home/tc/bin/adb ; ++done < firefox.tcz.dep
I checked tce-load script to try to add a sleep command and a line to execute adb right after a package is loaded. But I don't know on which section of the code should I put it.
What changes can I introduce on tce-load to have a sleep and adb being tested after each package is loaded?
-
It's probably something in FF's install script then. Look in /usr/local/tce.installed/firefox after loading it (or use unsquashfs or mounting to see it without loading).
-
file /home/tc/Downloads/platform-tools/adb
/home/tc/Downloads/platform-tools/adb: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, not stripped
/home/tc/Downloads/platform-tools/adb
sh: /home/tc/Downloads/platform-tools/adb: not found
sudo ln -s /lib /lib64
/home/tc/Downloads/platform-tools/adb
Android Debug Bridge version 1.0.41
Version 33.0.0-8141338
-
@Santos: very interested to learn your discoveries here!
sharing is caring
-
Hello
Amazing!
Thank you everybody. Juanito, it worked.
Solved. :)
-
Does this work with the latest versions of ADB?
Can someone test?
I have a flip phone with a 1gB/month cellular data plan, so would be keen to know if a. This still works and b if so, find the least data intensive set of downloads to get ADB up and running!
-
@Ever
Yes, it works with the latest version.
There is nothing to download, you just need to create the symlink as @Juanito stated.
sudo ln -s /lib /lib64
Of course, you will need to have the adb binary file first, which you can get from the android project website.