diff --git a/CHANGELOG b/CHANGELOG index b768693..d5d8312 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,2 +1,4 @@ -- Fix regression in 3.3.0 by disabling session installer -- Magisk crashes on certain ROMs (for example crDroid) should still be fixed, if the issue appears again, please let me know +- 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 diff --git a/README.md b/README.md index f6a3262..32e09f0 100644 --- a/README.md +++ b/README.md @@ -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.27, GsfProxy 0.1.0, FakeStore 0.1.0 and MapsV1 0.1.0 are bundled in the module. +Currently, GmsCore 0.2.28, GsfProxy 0.1.0, FakeStore 0.2.0 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. diff --git a/customize.sh b/customize.sh index e7d749c..a522e2d 100644 --- a/customize.sh +++ b/customize.sh @@ -7,9 +7,14 @@ else mmm_exec() { true; } fi -session_installer_supported=false +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" @@ -19,7 +24,7 @@ pm_install() { if [ $? -eq 0 ]; then session=$(echo "$sessionRaw" | sed -E 's/.*\[(.*)\].*/\1/g') if [ $? -eq 0 ]; then - pm install-write "$session" "$tmplocapk" + pm install-write "$session" base "$tmplocapk" if [ $? -eq 0 ]; then pm install-commit "$session" newretval=$? @@ -35,40 +40,33 @@ pm_install() { newretval=$? fi rm "$tmplocapk" - return $newretval -} - -install_phonesky() { - mmm_exec showLoading - pm_install "" "$MODPATH/system/priv-app/Phonesky/Phonesky.apk" - pm grant com.android.vending android.permission.FAKE_PACKAGE_SIGNATURE 2>/dev/null mmm_exec hideLoading + return $newretval } -if $BOOTMODE; then - mmm_exec setSupportLink "https://github.com/nift4/microg_installer_revived/issues" - - ui_print "- Installing microG GmsCore" - mmm_exec showLoading - pm_install "-g" "$MODPATH/system/priv-app/GmsCore/GmsCore.apk" - pm grant com.google.android.gms android.permission.FAKE_PACKAGE_SIGNATURE 2>/dev/null - mmm_exec hideLoading +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 - if [ -f /data/adb/Phonesky.apk ]; then - ui_print "- Installing real Play Store" - cp /data/adb/Phonesky.apk "$MODPATH/system/priv-app/Phonesky/Phonesky.apk" - # 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 - install_phonesky - fi - else - ui_print "- Real Play Store not found, installing Fake Store" - install_phonesky - 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" else - abort "- ERROR: Installation via recovery is NOT supported." + 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" 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 diff --git a/module.prop b/module.prop index a5707f0..4a23cf1 100644 --- a/module.prop +++ b/module.prop @@ -1,7 +1,7 @@ id=microg_installer name=microG Installer Revived -version=Revived 3.3.1-0 -versionCode=30310 +version=Revived 3.3.2-0 +versionCode=30320 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 diff --git a/system/etc/permissions/privapp-permissions-org.microG.xml b/system/etc/permissions/privapp-permissions-org.microG.xml index 393e05f..34a5d78 100644 --- a/system/etc/permissions/privapp-permissions-org.microG.xml +++ b/system/etc/permissions/privapp-permissions-org.microG.xml @@ -1,6 +1,11 @@ + + + + + diff --git a/system/priv-app/GmsCore/GmsCore.apk b/system/priv-app/GmsCore/GmsCore.apk index d856e88..e114410 100644 Binary files a/system/priv-app/GmsCore/GmsCore.apk and b/system/priv-app/GmsCore/GmsCore.apk differ diff --git a/system/priv-app/Phonesky/Phonesky.apk b/system/priv-app/Phonesky/Phonesky.apk index dccc909..6a11fee 100644 Binary files a/system/priv-app/Phonesky/Phonesky.apk and b/system/priv-app/Phonesky/Phonesky.apk differ diff --git a/update.json b/update.json index c78b905..c4d9074 100644 --- a/update.json +++ b/update.json @@ -1,6 +1,6 @@ { - "version": "Revived 3.3.1-0", - "versionCode": 30310, - "zipUrl": "https://github.com/nift4/microg_installer_revived/releases/download/v3.3.1-0/microG_Installer_Revived.zip", - "changelog": "https://github.com/nift4/microg_installer_revived/raw/v3.3.1-0/CHANGELOG" + "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" }