ee2e53958a
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.
26 lines
341 B
Python
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)
|