SDL: helper scripts to uninstall/reinstall .apk

This commit is contained in:
Sergii Pylypenko
2017-11-01 17:42:27 +02:00
parent 212e761d33
commit b3b9730c19
6 changed files with 28 additions and 17 deletions

View File

@@ -7,10 +7,10 @@ AppName="OpenLiero"
AppFullName=open.liero.be
# Application version code (integer)
AppVersionCode=13702
AppVersionCode=13703
# Application user-visible version name (string)
AppVersionName="1.37.02"
AppVersionName="1.37.03"
# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'
# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu
@@ -255,7 +255,7 @@ APP_PLATFORM=android-21
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
# Available architectures: armeabi armeabi-v7a x86 mips arm64-v8a
MultiABI='armeabi-v7a' # x86 arm64-v8a'
MultiABI='armeabi-v7a x86 arm64-v8a'
# Optional shared libraries to compile - removing some of them will save space
# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed

View File

@@ -1,14 +0,0 @@
#!/bin/sh
[ -z "$1" ] && { echo "Specify .apk file"; exit 1; }
LOG=/tmp/reinstall-apk-$$.log
adb install -r $1 | tee $LOG
grep '^Failure' $LOG && {
adb uninstall `aapt dump badging $1 | grep 'package:' | sed "s/.*name='\([^']*\)'.*/\1/"`
adb install -r $1
}
rm -f $LOG

15
reinstallApk.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
APK="$1"
[ -z "$APK" ] && APK=project/app/build/outputs/apk/app-release.apk
LOG=/tmp/reinstall-apk-$$.log
adb install -r "$APK" | tee $LOG
grep '^Failure' $LOG && {
adb uninstall `aapt dump badging "$APK" | grep 'package:' | sed "s/.*name='\([^']*\)'.*/\1/"`
adb install -r "$APK"
}
rm -f $LOG

5
resetApkData.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
. ./AndroidAppSettings.cfg
adb shell pm clear $AppFullName

5
uninstallApk.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
. ./AndroidAppSettings.cfg
adb uninstall $AppFullName