Native Android client for Spotify, built with Jetpack Compose
Kotlin ad-freeadblockandroidjetpack-composekotlinlyricsmusic-playermusic-videomyspotispotifyspotify-adblockerspotify-clientspotify-connectspotui
Tools: playback_test.py reads only the tested app's log (logcat --uid), as another Myspoti build on the phone logs under the same tags and failed 14 scenarios of 19 with its own timeouts; myspoti-cli finds the SDK's adb when none is on the PATH, as cdp.py does
kota-zo70d473bb78a9
diff --git a/tools/myspoti-cli b/tools/myspoti-cliindex bc4f6601..10930da6 100755--- a/tools/myspoti-cli+++ b/tools/myspoti-cli@@ -32,7 +32,8 @@ import sysimport timeimport uuid-ADB = os.environ.get("ADB") or shutil.which("adb") or "adb"+# The SDK's own adb, as the other tools (cdp.py) find it, when none is on the PATH.+ADB = os.environ.get("ADB") or shutil.which("adb") or os.path.expanduser("~/android-sdk/platform-tools/adb")# The app's own wait for a hook (download-source) is 30 s.DEFAULT_TIMEOUT = 40.0diff --git a/tools/playback_test.py b/tools/playback_test.pyindex d076120f..7e6343d8 100644--- a/tools/playback_test.py+++ b/tools/playback_test.py@@ -153,7 +153,11 @@ class Log:def __init__(self):adb("logcat", "-c")self.lines = []- cmd = [ADB] + (["-s", SERIAL] if SERIAL else []) + ["logcat", "-v", "time", "-s", "Myspoti:*", "MspPlayer:*", "AndroidRuntime:E"]+ # This app's lines only: the other Myspoti builds on the phone (beta, stable, side builds)+ # log under the same tags, and a frozen one in the background failed every scenario here.+ uid = re.search(r"uid:(\d+)", adb("shell", "pm", "list", "packages", "-U", PKG, check=False))+ cmd = [ADB] + (["-s", SERIAL] if SERIAL else []) + ["logcat", "-v", "time"] + \+ ([f"--uid={uid.group(1)}"] if uid else []) + ["-s", "Myspoti:*", "MspPlayer:*", "AndroidRuntime:E"]self.proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, text=True, errors="replace")threading.Thread(target=self._read, daemon=True).start()