Benjamin_Loison commented on issue Benjamin_Loison/adb#32 2025-06-02 19:12:06 +02:00
Set screen timeout
Benjamin_Loison commented on issue Benjamin_Loison/adb#42 2025-06-02 17:33:49 +02:00
Interact with virtual display with adb
adb shell uiautomator dump --help
UI hierchary dumped to: /sdcard/window_dump.xml
adb shell uiautomator --help
Output:
Usage…
Benjamin_Loison commented on issue Benjamin_Loison/adb#42 2025-06-02 17:26:55 +02:00
Interact with virtual display with adb
adb shell input -d 4 tap 977 707

does not need adb shell monkey.

Benjamin_Loison commented on issue Benjamin_Loison/adb#42 2025-06-02 17:25:09 +02:00
Interact with virtual display with adb
adb shell input -d keyboard tap 977 707
Output:

Exception occurred while executing '-d':
java.lang.IllegalArgumentException: Error: Invalid…
Benjamin_Loison commented on issue Benjamin_Loison/adb#42 2025-06-02 17:24:17 +02:00
Interact with virtual display with adb
adb shell input keyboard tap 977 707

does not seem helpful.

Benjamin_Loison commented on issue Benjamin_Loison/adb#42 2025-06-02 17:22:26 +02:00
Interact with virtual display with adb
adb shell input -h
Output:
Usage: input [<source>] [-d DISPLAY_ID] <command> [<arg>...]

The sources are: 
      touchnavigation
     …
Benjamin_Loison commented on issue Benjamin_Loison/adb#42 2025-06-02 17:20:44 +02:00
Interact with virtual display with adb
adb shell input tap 977 707

uses actual display even if manually used last an app on the virtual one.

Benjamin_Loison commented on issue Benjamin_Loison/adb#42 2025-06-02 17:17:00 +02:00
Interact with virtual display with adb
adb shell input text test

works as wanted after using adb shell monkey.

Benjamin_Loison commented on issue Benjamin_Loison/adb#42 2025-06-02 17:06:59 +02:00
Interact with virtual display with adb
adb shell uiautomator dump
FILE=window_dump.xml
adb pull /sdcard/$FILE
xmllint --format $FILE 
Benjamin_Loison commented on issue Benjamin_Loison/adb#42 2025-06-02 16:24:53 +02:00
Interact with virtual display with adb

adb shell uiautomator dump, tap and sending text.

Pointer location may help.

Would allow using the device at the same time as app interaction in the background, to send a Signal message…

Benjamin_Loison opened issue Benjamin_Loison/adb#42 2025-06-02 16:22:17 +02:00
Interact with virtual display with adb
Benjamin_Loison commented on issue Benjamin_Loison/linux#68 2025-06-02 15:52:12 +02:00
Change home folder without root access
import os, pwd

pwd.getpwuid(os.getuid()).pw_dir
'/mnt/homes/@LH-CENSORED/61/loison_benjamin-1000004'

Source: [the Stack Overflow answer 3085545](https://stackoverfl…

Benjamin_Loison commented on issue Benjamin_Loison/linux#68 2025-06-02 15:51:12 +02:00
Change home folder without root access
from pathlib import Path
str(Path.home())
'/scratch/loison_benjamin'
Benjamin_Loison commented on issue Benjamin_Loison/linux#68 2025-06-02 15:50:38 +02:00
Change home folder without root access
os.path.expanduser('~user')
'~user'
os.path.expanduser('~USER')
'~USER'
os.path.expanduser('~$USER')
'~$USER'
Benjamin_Loison commented on issue Benjamin_Loison/linux#68 2025-06-02 15:44:46 +02:00
Change home folder without root access
os.environ['HOME']
'/scratch/loison_benjamin'
os.exp
Output:
Traceback (most recent call last):
  File…
Benjamin_Loison commented on issue Benjamin_Loison/linux#68 2025-06-02 15:44:14 +02:00
Change home folder without root access

DuckDuckGo search Python get user home folder.

Benjamin_Loison commented on issue Benjamin_Loison/linux#68 2025-06-02 15:43:47 +02:00
Change home folder without root access

Benjamin-Loison/cpython/issues/72 helps get new home folder.

Benjamin_Loison commented on issue Benjamin_Loison/linux#68 2025-06-01 02:02:36 +02:00
Change home folder without root access

DuckDuckGo search Linux get user home folder.

The Super User answer 484280:

eval echo ~$USER
/mnt/homes/@LH-CENSORED/61/loison_benjamin…