The-Powder-Toy/android/install-apk.py
Tamás Bálint Misius ee2e53958a
Make android/install-apk always stale
This effectively leaves the staleness checking to adb install, as it should be done: adb has insight into the state of the system, we don't. Newer versions of android can do incremental installs too, so reinstalling the same thing is essentially free.

Also invoke android/install-apk in the debug script to make sure that the app being debugged is up to date.
2024-01-12 20:11:03 +01:00

26 lines
341 B
Python

import os
import os.path
import subprocess
import sys
(
script,
adb,
build_dir,
phony,
apk_name,
) = sys.argv
apk_path = os.path.join(build_dir, apk_name)
phony_path = os.path.join(build_dir, phony)
if os.path.exists(phony_path):
os.remove(phony_path)
if subprocess.run([
adb,
'install',
apk_path,
]).returncode:
sys.exit(1)