Release Kaleido 0.1.9 with responsive navigation and clearer show details
All checks were successful
Validate and publish Kaleido / android (push) Successful in 2m25s
All checks were successful
Validate and publish Kaleido / android (push) Successful in 2m25s
This commit is contained in:
parent
5199bb0928
commit
784921dba9
20 changed files with 271 additions and 49 deletions
|
|
@ -1,8 +1,8 @@
|
|||
"""Operate only Kaleido on an authorized streamer. Credentials stay on stdin."""
|
||||
import argparse, json, os, pathlib, subprocess, sys, time, xml.etree.ElementTree as ET
|
||||
import argparse, json, os, pathlib, shutil, subprocess, sys, time, xml.etree.ElementTree as ET
|
||||
ROOT=pathlib.Path(__file__).resolve().parents[1]
|
||||
ADB=pathlib.Path(r'C:\Users\Elijah\Desktop\platform-tools\adb.exe')
|
||||
# The onn is the default; KALEIDO_DEVICE selects the authorized Fire TV Stick (192.168.50.146:5555).
|
||||
ADB=pathlib.Path(os.environ.get('KALEIDO_ADB') or shutil.which('adb') or r'C:\Users\Elijah\Desktop\platform-tools\adb.exe')
|
||||
# The onn is the default; KALEIDO_DEVICE selects another authorized test streamer.
|
||||
DEVICE=os.environ.get('KALEIDO_DEVICE','192.168.50.195:5555')
|
||||
OUT=ROOT/'evidence/private'
|
||||
OUT.mkdir(parents=True,exist_ok=True)
|
||||
|
|
@ -11,7 +11,7 @@ def adb(*args, data=None):
|
|||
p=subprocess.run([str(ADB),'-s',DEVICE,*args],input=data,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
error=p.stderr.decode(errors='replace')
|
||||
# The TCL's network ADB link drops intermittently; reconnecting restores it.
|
||||
if p.returncode and attempt<3 and ('closed' in error or 'offline' in error):
|
||||
if p.returncode and attempt<3 and any(reason in error for reason in ('closed','offline',f"device '{DEVICE}' not found",f"no such device '{DEVICE}'")):
|
||||
subprocess.run([str(ADB),'disconnect',DEVICE],capture_output=True);time.sleep(2)
|
||||
subprocess.run([str(ADB),'connect',DEVICE],capture_output=True);time.sleep(2);continue
|
||||
# It also occasionally fails a shell command silently. Retry, except key input,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue