From d4897280f0656d4f21857ce1fe51c06a53507a86 Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Mon, 27 Mar 2017 22:13:00 +0300 Subject: [PATCH] SDL: Small helper script to reinstall an .apk with different certificate --- .../application/ninslash/AndroidAppSettings.cfg | 6 +++--- project/jni/application/ninslash/src | 2 +- project/jni/application/openttd/src | 2 +- reinstall-apk.sh | 14 ++++++++++++++ 4 files changed, 19 insertions(+), 5 deletions(-) create mode 100755 reinstall-apk.sh diff --git a/project/jni/application/ninslash/AndroidAppSettings.cfg b/project/jni/application/ninslash/AndroidAppSettings.cfg index 5c9f09372..9182f6f3a 100644 --- a/project/jni/application/ninslash/AndroidAppSettings.cfg +++ b/project/jni/application/ninslash/AndroidAppSettings.cfg @@ -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/ diff --git a/project/jni/application/ninslash/src b/project/jni/application/ninslash/src index 7c32fcaec..44dd3f3b5 160000 --- a/project/jni/application/ninslash/src +++ b/project/jni/application/ninslash/src @@ -1 +1 @@ -Subproject commit 7c32fcaec449ec2ee894ee5ffa46c87df213b8ca +Subproject commit 44dd3f3b599cd7ad35d5bda88e2310cb318e1b5f diff --git a/project/jni/application/openttd/src b/project/jni/application/openttd/src index 7c16f1417..a69d58e4f 160000 --- a/project/jni/application/openttd/src +++ b/project/jni/application/openttd/src @@ -1 +1 @@ -Subproject commit 7c16f1417f5999ee8fb696f76876b513cdac2383 +Subproject commit a69d58e4fe6ec5de373fcbd8cb6f0ddd67c95dc3 diff --git a/reinstall-apk.sh b/reinstall-apk.sh new file mode 100755 index 000000000..6434ba656 --- /dev/null +++ b/reinstall-apk.sh @@ -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