DuckDuckGo and Google search `"inotifywait" "adb"`.
Could execute Termux binary, but I prefer avoiding to do so.
[dstmath/inotifywait-for-Android](https://github.com/dstmath/inotifywait-for-Android) has 121 stars and last commit was 9 years ago.
DuckDuckGo and Google search *adb push chown*.
```bash
chown shell.shell inotifywait
```
does not return anything and does not help, source: [the Stack Overflow answer 14084617](https://stackoverflow.com/a/14084617).
ld: cannot find inotifywait: No such file or directory
lld inotifywait
Output:
lld is a generic driver.
Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld (WebAssembly) instead
ld `which inotifywait`
ld: warning: cannot find entry symbol _start; not setting start address
lld `which inotifywait`
Output:
lld is a generic driver.
Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld (WebAssembly) instead
apt install -y ldd
Output:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
ldd
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 1844 B of archives.
After this operation, 45.1 kB of additional disk space will be used.
Get:1 https://grimler.se/termux/termux-main stable/main aarch64 ldd aarch64 0.3 [1844 B]
Fetched 1844 B in 0s (4663 B/s)
Selecting previously unselected package ldd.
(Reading database ... 104813 files and directories currently installed.)
Preparing to unpack .../archives/ldd_0.3_aarch64.deb ...
Unpacking ldd (0.3) ...
Setting up ldd (0.3) ...
ldd inotifywait
Output:
readelf: Error: '/data/data/com.termux/files/home/inotifywait': No such file
readelf: Error: '/data/data/com.termux/files/home/inotifywait': No such file
```bash
adb shell 'hostname && echo a && \
hostname && echo b'
```
<details>
<summary>Output:</summary>
```
localhost
a
localhost
b
```
</details>
<details>
<summary>Bash script:</summary>
```bash
adb shell '
hostname && echo a && \
hostname && echo b
'
```
</details>
<details>
<summary>Output:</summary>
```
localhost
a
localhost
b
```
</details>
<details>
<summary>Bash script:</summary>
```bash
adb shell '
cd /data/local/tmp/
LD_LIBRARY_PATH=. ./inotifywait -e CLOSE /sdcard/DCIM/Camera/
'
```
</details>
works fine on my Fairphone 4 own LineageOS 22.2 Termux.
I confirm that the execution flag is kept on `adb push`.
```
command-not-found
```
```
command-not-found: command not found
```
```
dpkg -L command-not-found
```
<details>
<summary>Output:</summary>
```
/.
/data
/data/data
/data/data/com.termux
/data/data/com.termux/files
/data/data/com.termux/files/usr
/data/data/com.termux/files/usr/libexec
/data/data/com.termux/files/usr/libexec/termux
/data/data/com.termux/files/usr/libexec/termux/command-not-found
/data/data/com.termux/files/usr/share
/data/data/com.termux/files/usr/share/doc
/data/data/com.termux/files/usr/share/doc/command-not-found
/data/data/com.termux/files/usr/share/doc/command-not-found/copyright
```
</details>
```bash
$PREFIX/libexec/termux/command-not-found inotifywait
```
<details>
<summary>Output:</summary>
```
The program inotifywait is not installed. Install it by executing:
pkg install inotify-tools
```
</details>
DuckDuckGo search *Termux mirrors*.
[termux/termux-packages/wiki/Mirrors/74f5c2abe11397d4b25f0c445425c6c7d917c36b](https://github.com/termux/termux-packages/wiki/Mirrors/74f5c2abe11397d4b25f0c445425c6c7d917c36b)
I just read *Info for mirror maintainers* section.
-R|--raw-extract <deb> <directory>
Extract control info and files.
--ctrl-tarfile <deb> Output control tarfile.
dpkg-deb -R inotify-tools_4.25.9.0_aarch64.deb
Output:
dpkg-deb: error: --raw-extract needs a target directory.
Perhaps you should be using dpkg --install ?
Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --help for help about installing and deinstalling packages.
tar -xvf libc++_28c-1_aarch64.deb data/data/com.termux/files/usr/lib/libc++_shared.so
Output:
tar: This does not look like a tar archive
tar: Skipping to next header
tar: data/data/com.termux/files/usr/lib/libc++_shared.so: Not found in archive
tar: Exiting with failure status due to previous errors
No matter if prefix with / or ./.
DuckDuckGo and Google search Linux extract given file from .xz.
[The Unix Stack Exchange answer 61464](https://unix.stackexchange.com/a/61464):
```
tar -xvf libc++_28c-1_aarch64.deb data/data/com.termux/files/usr/lib/libc++_shared.so
```
<details>
<summary>Output:</summary>
```
tar: This does not look like a tar archive
tar: Skipping to next header
tar: data/data/com.termux/files/usr/lib/libc++_shared.so: Not found in archive
tar: Exiting with failure status due to previous errors
```
</details>
No matter if prefix with `/` or `./`.
DuckDuckGo and Google search *Linux extract given file from .xz*.
libc++_28c-1_aarch64.deb: Debian binary package (format 2.0), with control.tar.xz/, data compression xz
DuckDuckGo search Linux extract single file from .deb.
dpkg-deb --help | grep -i extract
Output:
-e|--control <deb> [<directory>] Extract control info.
-x|--extract <deb> <directory> Extract files.
-X|--vextract <deb> <directory> Extract & list files.
-R|--raw-extract <deb> <directory>
Extract control info and files.
unpacked using 'dpkg-deb --extract' will be incorrectly installed !
dpkg --fsys-tarfile libc++_28c-1_aarch64.deb | tar --strip-components=7 x ./data/data/com.termux/files/usr/lib/libc++_shared.so
Output:
tar: You must specify one of the '-Acdtrux', '--delete' or '--test-label' options
Try 'tar --help' or 'tar --usage' for more information.
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
dpkg-deb: error: --fsys-tarfile needs a .deb filename argument
Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --help for help about installing and deinstalling packages.
/dev/stdin: empty
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 284k 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (23) Failure writing output to destination, passed 16052 returned 0
curl https://packages.termux.dev/apt/termux-main/pool/main/libc/libc++/libc++_28c-1_aarch64.deb | dpkg --fsys-tarfile - | tar xO ./data/data/com.termux/files/usr/lib/$FILE > $FILE
Output:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 284k 100 284k 0 0 942k 0 --:--:-- --:--:-- --:--:-- 940k
works as wanted.
```bash
FILE=libc++_shared.so
dpkg --fsys-tarfile libc++_28c-1_aarch64.deb | tar xO ./data/data/com.termux/files/usr/lib/$FILE > $FILE
```
does not return anything and works as wanted.
```bash
curl https://packages.termux.dev/apt/termux-main/pool/main/libc/libc++/libc++_28c-1_aarch64.deb | dpkg --fsys-tarfile | file -
```
<details>
<summary>Output:</summary>
```
dpkg-deb: error: --fsys-tarfile needs a .deb filename argument
Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --help for help about installing and deinstalling packages.
/dev/stdin: empty
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 284k 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (23) Failure writing output to destination, passed 16052 returned 0
```
</details>
```bash
curl https://packages.termux.dev/apt/termux-main/pool/main/libc/libc++/libc++_28c-1_aarch64.deb | dpkg --fsys-tarfile - | tar xO ./data/data/com.termux/files/usr/lib/$FILE > $FILE
```
<details>
<summary>Output:</summary>
```
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 284k 100 284k 0 0 942k 0 --:--:-- --:--:-- --:--:-- 940k
```
</details>
works as wanted.
To ease process may want to leverage Termux install from ADB. However, it involves adb root which does not seem safe, could just copy to /data/local/tmp/, then unroot.
To ease process may want to leverage Termux install from ADB. However, it involves `adb root` which does not seem safe, could just copy to `/data/local/tmp/`, then unroot.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
DuckDuckGo and Google search
"inotifywait" "adb".Could execute Termux binary, but I prefer avoiding to do so.
dstmath/inotifywait-for-Android has 121 stars and last commit was 9 years ago.
Maybe can
adb pushTermuxinotifywait:On Termux:
Output:
On my Linux Mint 22.2 Cinnamon Framework 13:
DuckDuckGo and Google search adb push chown.
does not return anything and does not help, source: the Stack Overflow answer 14084617.
DuckDuckGo and Google search adb push as shell and adb chown shell.
The Stack Overflow answer 37781988:
does not return anything and does not help.
DuckDuckGo and Google search adb push executable.
The Android Stack Exchange answer 45564:
I am fine using a temporary folder.
Output:
Output:
On Termux:
Output:
Output:
Output:
Output:
Output:
Output:
DuckDuckGo and Google search Linux specify .so to executable.
The Server Fault answer 279069:
does not return anything.
The Server Fault answer 699902:
If proceed similarly with
libc++_shared.so.I uninstalled Termux on Samsung Galaxy A53 to avoid bias.
Output:
Output:
Attachments are based on my Fairphone 4 own LineageOS 22.2 Termux.
Being able to retrieve them by download would be nice.
Output:
It helps the issue:
Output:
Bash script:
Output:
Bash script:
works fine on my Fairphone 4 own LineageOS 22.2 Termux.
I confirm that the execution flag is kept on
adb push.Output:
Output:
DuckDuckGo search Termux mirrors.
termux/termux-packages/wiki/Mirrors/74f5c2abe11397d4b25f0c445425c6c7d917c36b
I just read Info for mirror maintainers section.
https://packages.termux.dev/apt/termux-main/pool/main/i/inotify-tools/
https://packages.termux.dev/apt/termux-main/pool/main/i/inotify-tools/inotify-tools_4.25.9.0_aarch64.deb
DuckDuckGo and Google search Decompress .deb.
The Unix Stack Exchange answer 138190:
Output:
Output:
does not return anything.
Output:
Wikipedia: Termux (1316517983) correctly denotes
termux.devas Website.does not return anything, same for
libinotifytools.so.https://packages.termux.dev/apt/termux-main/pool/main/libc/libc++/libc++_28c-1_aarch64.deb
Output:
Same with
libc++_shared.so.I would like my setup to resist reboots for #29.
I checked that:
Output:
/data/local/tmp/my_fileis still present after a reboot on my Debian 13 GNOME laptop Virtual Machine Manager LineageOS 22.2 virtual machine.The Unix Stack Exchange answer 61464:
Output:
No matter if prefix with
/or./.DuckDuckGo and Google search Linux extract given file from .xz.
DuckDuckGo search Linux extract single file from .deb.
Output:
The Ask Ubuntu answer 6022:
Output:
Output:
Output:
Output:
Output:
Source: the Stack Overflow answer 845601
works, but is quite unsatisfying.
Google search tar extract in current folder.
does not return anything and works as wanted.
Output:
Output:
works as wanted.
Output:
Bash script:
Bash script:
Bash script:
DuckDuckGo and Google search Linux command to escape regex and re.escape Bash equivalent.
Could cache on disk or RAM URLs to avoid redundant calls as currently due to
inotify-tools, but it is quite unclear how to do so.To ease process may want to leverage Termux install from ADB. However, it involves
adb rootwhich does not seem safe, could just copy to/data/local/tmp/, then unroot.Bash script:
Output:
shell:does not work as wanted.If proceed in
adb shellit works as wanted.With indentation get:
hanging.