Skip to content

Commit

Permalink
Release 3.4.0-0
Browse files Browse the repository at this point in the history
  • Loading branch information
nift4 committed Sep 24, 2023
1 parent 8ac8f7b commit 1aec7ce
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 59 deletions.
6 changes: 2 additions & 4 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
- Update microG to 0.2.28 & FakeStore to 0.2.0
- Fix session installer (now enabled by default)
- Fix real PS not copied early enough
- Refactor
- Update microG to 0.2.29 & FakeStore to 0.2.1
- Code cleanup & better workaround for framework shooting MagiskManager
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ In short: this is the cleanest option to install microG and just be done with it

UnifiedNlp, which is bundled with GmsCore, if installed as an user app doesn't work on Android 7 and newer without [an additional patch](https://github.com/microg/android_packages_apps_UnifiedNlp/blob/master/patches/android_frameworks_base-N.patch). An another solution to the above problem is to install the app as a privileged system app. However, this way is not perfect, due to those kind of apps being wiped after an OTA update. Therefore, I'm creating this module to help simplify the installation of microG with working network-based location. Aditionally, this module forces UnifiedNlp support even when no NLP provider is configured in your ROM. And GsfProxy needs to be an system app for some third-party apps.

Currently, GmsCore 0.2.28, GsfProxy 0.1.0, FakeStore 0.2.0 and MapsV1 0.1.0 are bundled in the module.
Currently, GmsCore 0.2.29, GsfProxy 0.1.0, FakeStore 0.2.1 and MapsV1 0.1.0 are bundled in the module.

**Note**: Install this module before installing any GMS-dependent apps, as well as do not disable it after installing such apps, unless you know what you're doing.

Expand Down
65 changes: 17 additions & 48 deletions customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,67 +6,36 @@ if [ -n "$MMM_EXT_SUPPORT" ]; then
else
mmm_exec() { true; }
fi

if ! $BOOTMODE; then
abort "- ERROR: Installation via recovery is NOT supported."
fi
mmm_exec setSupportLink "https://github.com/nift4/microg_installer_revived/issues"
session_installer_supported=true

pm_install() {
mmm_exec showLoading
newretval=1
tmplocapk=/data/local/tmp/microg_revived_TMP_DELETE_ME.apk
cp "$2" "$tmplocapk"
$session_installer_supported && 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" base "$tmplocapk"
if [ $? -eq 0 ]; then
pm install-commit "$session"
newretval=$?
else
pm install-abandon "$session"
echo "- SBI fail, please report bug"
fi
fi
fi
fi
if [ ! $newretval -eq 0 ]; then
pm install --dont-kill "$1" "$2"
newretval=$?
fi
rm "$tmplocapk"
mmm_exec hideLoading
return $newretval
}

if [ -f /data/adb/Phonesky.apk ]; then
ui_print "- Found real Play Store"
real_ps=true
cp /data/adb/Phonesky.apk "$MODPATH/system/priv-app/Phonesky/Phonesky.apk"
else
real_ps=false
ui_print "- Real Play Store not found, using Fake Store"
fi

ui_print "- Installing microG GmsCore"
pm_install "-g" "$MODPATH/system/priv-app/GmsCore/GmsCore.apk"

if $real_ps; then
ui_print "- Installing real Play Store"
cp /data/adb/Phonesky.apk "$MODPATH/system/priv-app/Phonesky/Phonesky.apk"
else
ui_print "- Real Play Store not found, installing Fake Store"
fi
# If the real Play Store is already installed, don't install it again since
# it will result in an error if real Play Store is not patched and has
# already auto-updated itself
if [ ! $(pm list packages | grep com.android.vending) ]; then
pm_install "" "$MODPATH/system/priv-app/Phonesky/Phonesky.apk"
mmm_exec showLoading
pm install "$MODPATH/system/priv-app/Phonesky/Phonesky.apk"
mmm_exec hideLoading
fi

pm grant com.google.android.gms android.permission.FAKE_PACKAGE_SIGNATURE 2>/dev/null
pm grant com.android.vending android.permission.FAKE_PACKAGE_SIGNATURE 2>/dev/null

ui_print "- Installing microG GmsCore"
# If we install GmsCore update, Magisk Manager will be killed
# that's because Magisk Manager creates classloader of GmsCore in SSL provider
# so if GmsCore gets killed, Magisk Manager gets killed by framework as well
# if we just dont kill GmsCore, it's fine. we use --dont-kill for that
# however thats only intended for split APKs and google enforced that
# it stopped working after https://github.com/aosp-mirror/platform_frameworks_base/commit/93c2c2a292ea8695038afdd044bcb51e2e366780
# keep it here for legacy while i think of a better solution
# (workaround this by installing gmscore as last step)
mmm_exec showLoading
pm install --dont-kill -g "$MODPATH/system/priv-app/GmsCore/GmsCore.apk"
mmm_exec hideLoading
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=microg_installer
name=microG Installer Revived
version=Revived 3.3.2-0
versionCode=30320
version=Revived 3.4.0-0
versionCode=30400
author=nift4
description=Install microG GmsCore, GsfProxy, FakeStore (or Play Store if you want so) and MapsV1 to /system/
updateJson=https://raw.github.com/nift4/microg_installer_revived/master/update.json
Expand Down
Binary file modified system/priv-app/GmsCore/GmsCore.apk
Binary file not shown.
Binary file modified system/priv-app/Phonesky/Phonesky.apk
Binary file not shown.
8 changes: 4 additions & 4 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "Revived 3.3.2-0",
"versionCode": 30320,
"zipUrl": "https://github.com/nift4/microg_installer_revived/releases/download/v3.3.2-0/microG_Installer_Revived.zip",
"changelog": "https://github.com/nift4/microg_installer_revived/raw/v3.3.2-0/CHANGELOG"
"version": "Revived 3.4.0-0",
"versionCode": 30400,
"zipUrl": "https://github.com/nift4/microg_installer_revived/releases/download/v3.4.0-0/microG_Installer_Revived.zip",
"changelog": "https://github.com/nift4/microg_installer_revived/raw/v3.4.0-0/CHANGELOG"
}

0 comments on commit 1aec7ce

Please sign in to comment.