SDL: Small helper script to reinstall an .apk with different certificate

This commit is contained in:
Sergii Pylypenko
2017-03-27 22:13:00 +03:00
parent 485d66ea25
commit d4897280f0
4 changed files with 19 additions and 5 deletions

View File

@@ -7,10 +7,10 @@ AppName="Ninslash"
AppFullName=ninslash.com
# Application version code (integer)
AppVersionCode=02220
AppVersionCode=02320
# Application user-visible version name (string)
AppVersionName="0.2.2.20"
AppVersionName="0.2.3.20"
# 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
@@ -24,7 +24,7 @@ AppDataDownloadUrl="!!Game data|data.zip"
ResetSdlConfigForThisVersion=n
# Delete application data files when upgrading (specify file/dir paths separated by spaces)
DeleteFilesOnUpgrade="libsdl-DownloadFinished-0.flag"
DeleteFilesOnUpgrade="libsdl-DownloadFinished-0.flag data"
# Here you may type readme text, which will be shown during startup. Format is:
# Text in English, use \\\\n to separate lines (that's four backslashes)^de:Text in Deutsch^ru:Text in Russian^button:Button that will open some URL:http://url-to-open/

14
reinstall-apk.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/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