From 9d7ee9f33f415aa78d58dad02541113e3c4d238a Mon Sep 17 00:00:00 2001 From: nift4 Date: Fri, 14 Apr 2023 13:52:57 +0200 Subject: [PATCH] session fixes for buggy roms --- customize.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/customize.sh b/customize.sh index 1d6818b..2dcdb87 100644 --- a/customize.sh +++ b/customize.sh @@ -8,19 +8,23 @@ else fi pm_install() { + tmplocapk=/data/local/tmp/microg_revived_TMP_DELETE_ME.apk which sed >/dev/null 2>&1 if [ $? -eq 0 ]; then sessionRaw=$(pm install-create --dont-kill "$1") if [ $? -eq 0 ]; then session=$(echo "$sessionRaw" | sed -E 's/.*\[(.*)\].*/\1/g') if [ $? -eq 0 ]; then - pm install-write "$session" "$1" + cp "$1" "$tmplocapk" + pm install-write "$session" "$tmplocapk" if [ $? -eq 0 ]; then pm install-commit "$session" - return $? else pm install-abandon "$session" fi + newretval=$? + rm "$tmplocapk" + return $newretval fi fi fi