opt: dynamically adjust basePath in js

This commit is contained in:
KOWX712
2025-03-21 18:57:52 +08:00
parent 530f006154
commit e704bda0f7
6 changed files with 27 additions and 19 deletions

View File

@@ -46,7 +46,7 @@ export async function fetchAppList() {
const appName = await execCommand(`
base_apk=$(pm path ${packageName} | grep "base.apk" | awk -F: '{print $2}')
[ -n "$base_apk" ] || base_apk=$(pm path ${packageName} | grep ".apk" | awk -F: '{print $2}')
${basePath}common/aapt dump badging $base_apk 2>/dev/null | grep "application-label:" | sed "s/application-label://; s/'//g"
${basePath}/common/aapt dump badging $base_apk 2>/dev/null | grep "application-label:" | sed "s/application-label://; s/'//g"
`);
return {
appName: appName.trim() || packageName,