Benjamin_Loison commented on issue Benjamin_Loison/adb#29 2025-11-07 23:43:46 +01:00
Emulate scrollable screenshot

Let us prefer clicking on Capture more text middle than the associated symbol.

get_middle()
{
    xpath=$1
    ui=`adb exec-out uiautomator dump /dev/tty 
Benjamin_Loison commented on issue Benjamin_Loison/adb#29 2025-11-07 22:33:34 +01:00
Emulate scrollable screenshot

Could delete the associated screenshot(s) on the device.

Benjamin_Loison commented on issue Benjamin_Loison/adb#29 2025-11-07 22:30:21 +01:00
Emulate scrollable screenshot

I edited above take_scrolling_screenshot to work fine with spaces in file name.

Benjamin_Loison commented on issue Benjamin_Loison/adb#29 2025-11-07 22:24:42 +01:00
Emulate scrollable screenshot
adb: error: failed to stat remote object '/sdcard/Pictures/Screenshots/Screenshot_20251107-211406_Permission': No such file or directory
adb pull "/sdcard/Pictures/Screenshots…
Benjamin_Loison commented on issue Benjamin_Loison/adb#29 2025-11-07 21:10:21 +01:00
Emulate scrollable screenshot
/sdcard/Pictures/Screenshots/ CLOSE_WRITE,CLOSE .pending-1763150818-Screenshot_20251107-210658_F-Droid.png
~/.bashrc:
get_middle(
Benjamin_Loison commented on issue Benjamin_Loison/adb#52 2025-11-07 20:29:38 +01:00
inotifywait
FILE=libinotifytools.so
curl https://packages.termux.dev/apt/termux-main/pool/main/i/inotify-tools/inotify-tools_4.25.9.0_aarch64.deb 
Benjamin_Loison commented on issue Benjamin_Loison/adb#52 2025-11-07 20:02:54 +01:00
inotifywait
FILE=libc++_shared.so
dpkg --fsys-tarfile libc++_28c-1_aarch64.deb 
Benjamin_Loison commented on issue Benjamin_Loison/adb#52 2025-11-07 19:53:42 +01:00
inotifywait

Google search tar extract in current folder.

Benjamin_Loison commented on issue Benjamin_Loison/adb#52 2025-11-07 19:53:25 +01:00
inotifywait
file libc++_28c-1_aarch64.deb
libc++_28c-1_aarch64.deb: Debian binary package (format 2.0), with control.tar.xz/, data compression xz

DuckDuckGo search *Linux extract…

Benjamin_Loison commented on issue Benjamin_Loison/adb#52 2025-11-07 19:39:19 +01:00
inotifywait

The Unix Stack Exchange answer 61464:

tar -xvf libc++_28c-1_aarch64.deb data/data/com.termux/files/usr/lib/libc++_shared.so
Benjamin_Loison commented on issue Benjamin_Loison/adb#52 2025-11-07 19:26:32 +01:00
inotifywait

I checked that:

adb shell touch /data/local/tmp/my_file
adb shell ls -lh /data/local/tmp/
Output:
total 4
drwxrwxrwx 3 shell shell 4.0K…
Benjamin_Loison commented on issue Benjamin_Loison/adb#52 2025-11-07 19:23:35 +01:00
inotifywait

I would like my setup to resist reboots for #29.

adb shell touch /data/local/my_file
touch: '/data/local/my_file': Permission denied
Benjamin_Loison commented on issue Benjamin_Loison/adb#29 2025-11-07 16:28:56 +01:00
Emulate scrollable screenshot

DuckDuckGo search Bash function return.

The Stack Overflow answer 17336953 helps.

Benjamin_Loison commented on issue Benjamin_Loison/adb#29 2025-11-07 15:53:30 +01:00
Emulate scrollable screenshot

\d and \\d do not work in the following.

Bash script:
REGEX="\[([0-9]+),([0-9]+)\]\[([0-9]+),([0-9]+)\]"
bounds='[12,34][56,78]'
if [[ $bounds =~…
Benjamin_Loison commented on issue Benjamin_Loison/adb#29 2025-11-07 15:25:58 +01:00
Emulate scrollable screenshot
xmlstarlet select --template --value-of '//node[@text="Screenshot"]/@bounds' input.xml
[712,415][808,434]

DuckDuckGo and Google search Linux grep to variables and…

Benjamin_Loison reopened issue Benjamin_Loison/adb#15 2025-11-07 14:40:27 +01:00
Take screenshot with a unique file name
Benjamin_Loison commented on issue Benjamin_Loison/adb#15 2025-11-07 14:40:22 +01:00
Take screenshot with a unique file name
~/.bashrc:
# Being able to no write top and bottom, but still also have common code with a `take_screenshot` function would be nice.
take_app…
Benjamin_Loison commented on issue Benjamin_Loison/adb#15 2025-11-07 14:29:21 +01:00
Take screenshot with a unique file name

Related to Benjamin-Loison/android/issues/309#issuecomment-3502576023.

Could add function to ~/.bashrc.