android: fix apkanalyzer location

- fix SDK location: our install has 2 different versions: under
  `tools/bin/apkanalyzer` and `cmdline-tools/latest/bin/apkanalyzer`,
   but only the later is functional (trying to use the former raise
   some classpath exceptions)
- always use the SDK location, don't try to detect it: it's better to
  fail with a more explanatory "apkanalyzer: command not found" error
  than having the shell try to run a command with the wrong executable
  (`manifest …` because `$(APKANALYZER)` is empty)
This commit is contained in:
Benoit Pierre
2024-09-27 01:43:03 +02:00
committed by Martín Fernández
parent 120d418b7e
commit 35918326f0

View File

@@ -8,7 +8,7 @@ ANDROID_APK = koreader-android-$(ANDROID_ARCH)$(KODEDUG_SUFFIX)-$(ANDROID_NAME).
PHONY += run
# Tools
APKANALYZER ?= $(word 1,$(wildcard $(shell command -v apkanalyzer) $(ANDROID_SDK_ROOT)/tools/bin/apkanalyzer))
APKANALYZER ?= $(ANDROID_SDK_ROOT)/cmdline-tools/latest/bin/apkanalyzer
run: update
# get android app id