Skip to content

Commit

Permalink
service.sh: microG GmsCore needs to be installed as user app for all …
Browse files Browse the repository at this point in the history
…permissions to be granted, see microg/GmsCore#1100 (comment)
  • Loading branch information
Nanolx committed Oct 18, 2020
1 parent f2403b0 commit c351493
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions data/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ run_initscripts () {
done
}

install_gmscore () {
# wait until boot completed
until [ $(getprop sys.boot_completed). = 1. ]; do sleep 1; done

if [ $(getprop ro.system.build.version.sdk) -ge 29 ]; then
# microG GmsCore needs to be installed as user app for all permissions to be granted
# see https://github.com/microg/android_packages_apps_GmsCore/issues/1100#issuecomment-711088518
if [ -f "${MODDIR}/system/priv-app/GmsCore/GmsCore.apk" ]; then
pm list packages -f | grep -q /data.*com.google.android.gms || \
pm install -r "${MODDIR}/system/app/GmsCore/GmsCore.apk" &
fi
fi
}

install_droidguardhelper () {
# wait until boot completed
until [ $(getprop sys.boot_completed). = 1. ]; do sleep 1; done
Expand Down Expand Up @@ -52,10 +66,12 @@ case ${MODULE} in
NanoDroid )
run_initscripts &
install_droidguardhelper &
install_gmscore &
;;

NanoDroid_microG )
install_droidguardhelper &
install_gmscore &
;;

NanoDroid_FDroid )
Expand Down

0 comments on commit c351493

Please # to comment.