nift4 / microg_installer_revived

Install microG GmsCore, GsfProxy, FakeStore (or Play Store if you want so) and MapsV1 to /system/
GNU General Public License v3.0
773 stars 42 forks source link

MicroG constantly crashes #14

Closed ghost closed 3 years ago

ghost commented 3 years ago

-------------- META -------------- Magisk version: 21.1 (Canary/Beta) official (latest) Magisk Manager version: 8.0.3 (latest) ROM: ProtonAOSP 11.3.0 running Android 11 (with the Proton 1.1 Kernel) (latest) Relevant ROM Features: No GApps, native signature spoofing support Device: Google Pixel 5 ------------- ISSUE ------------- After downloading this module I didn't experience any issues at first. However, after opening the microG app to do the self-check (even without changing any settings/permissions), microG constantly crashes (every 1-5 Minutes or so) and shows an annoying prompt on screen (microG Services Core keeps stopping). After a little investigation with adb logcat it turns out that, for some reason, Android can't find the GsmCore.apk file in its directory:

D ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar
W gle.android.gm: JIT profile information will not be recorded: profile file does not exist.
D NetworkSecurityConfig: No Network Security Config specified, using platform default
D NetworkSecurityConfig: No Network Security Config specified, using platform default
I MultiDex: VM with version 2.1.0 has multidex support
I MultiDex: Installing application
I MultiDex: VM has multidex support, MultiDex support library is disabled.
D GmsApiAvailability: As we can't know right now if the later desired feature is available, we just pretend it to be.
D ChimeraServiceProvider: onCreate
D GmsPhenotypeCfgProvider: unimplemented Method: onCreate
W ziparchive: Unable to open '/system/priv-app/GmsCore/GmsCore.apk': No such file or directory
E gle.android.gm: Failed to open APK '/system/priv-app/GmsCore/GmsCore.apk' I/O error
W ResourcesManager: failed to preload asset path '/system/priv-app/GmsCore/GmsCore.apk'
W ResourcesManager: java.io.IOException: Failed to load asset path /system/priv-app/GmsCore/GmsCore.apk
W ResourcesManager:     at android.content.res.ApkAssets.nativeLoad(Native Method)
W ResourcesManager:     at android.content.res.ApkAssets.<init>(ApkAssets.java:291)
W ResourcesManager:     at android.content.res.ApkAssets.loadFromPath(ApkAssets.java:140)
W ResourcesManager:     at android.app.ResourcesManager.loadApkAssets(ResourcesManager.java:374)
W ResourcesManager:     at android.app.ResourcesManager.access$000(ResourcesManager.java:67)
W ResourcesManager:     at android.app.ResourcesManager$ApkAssetsSupplier.load(ResourcesManager.java:146)
W ResourcesManager:     at android.app.ResourcesManager.createApkAssetsSupplierNotLocked(ResourcesManager.java:833)
W ResourcesManager:     at android.app.ResourcesManager.getResources(ResourcesManager.java:937)
W ResourcesManager:     at android.app.LoadedApk.updateApplicationInfo(LoadedApk.java:368)
W ResourcesManager:     at android.app.ActivityThread.getPackageInfo(ActivityThread.java:2354)
W ResourcesManager:     at android.app.ActivityThread.getPackageInfoNoCheck(ActivityThread.java:2317)
W ResourcesManager:     at android.app.ActivityThread.handleCreateService(ActivityThread.java:4167)
W ResourcesManager:     at android.app.ActivityThread.access$1500(ActivityThread.java:237)
W ResourcesManager:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
W ResourcesManager:     at android.os.Handler.dispatchMessage(Handler.java:106)
W ResourcesManager:     at android.os.Looper.loop(Looper.java:223)
W ResourcesManager:     at android.app.ActivityThread.main(ActivityThread.java:7660)
W ResourcesManager:     at java.lang.reflect.Method.invoke(Native Method)
W ResourcesManager:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
W ResourcesManager:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
D AndroidRuntime: Shutting down VM
E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: Process: com.google.android.gms, PID: 5939
E AndroidRuntime: java.lang.RuntimeException: Unable to create service org.microg.gms.gcm.PushRegisterService: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.content.res.Resources.addLoaders(android.content.res.loader.ResourcesLoader[])' on a null object reference
E AndroidRuntime:   at android.app.ActivityThread.handleCreateService(ActivityThread.java:4198)
E AndroidRuntime:   at android.app.ActivityThread.access$1500(ActivityThread.java:237)
E AndroidRuntime:   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
E AndroidRuntime:   at android.os.Handler.dispatchMessage(Handler.java:106)
E AndroidRuntime:   at android.os.Looper.loop(Looper.java:223)
E AndroidRuntime:   at android.app.ActivityThread.main(ActivityThread.java:7660)
E AndroidRuntime:   at java.lang.reflect.Method.invoke(Native Method)
E AndroidRuntime:   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E AndroidRuntime:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.content.res.Resources.addLoaders(android.content.res.loader.ResourcesLoader[])' on a null object reference
E AndroidRuntime:   at android.app.ActivityThread.handleCreateService(ActivityThread.java:4180)
E AndroidRuntime:   ... 8 more

Strangely, I was able to find the (supposedly non-existent) file causing the issue /system/priv-app/GmsCore/GmsCore.apk in a root adb shell. What can I do about this?

nift4 commented 3 years ago

Well, it doesn't tell you it's non-existent but about an I/O error. As my module doesn't mount the files or something, I can't do much about it. Seems to be an Magisk/ROM/Kernel bug. I can only advise you to reinstall the module or try another ROM/Kernel.

nift4 commented 3 years ago

By the way, can you test if this update works? It's not yet on the Magisk repo. https://github.com/nift4/microg_installer_revived/releases/download/1.9.0-0/microG_Installer_Revived.zip

DocSniper commented 3 years ago

Tested version 1.9.0-0 on two devices. Device is booting without problems and microg seems to work well. Thanks!

ghost commented 3 years ago

@nift4 Turns out MagiskHide automatically hides microG GMS, once I unhide it microG doesn't crash anymore (until I restart my device, as it apparently is being reapplied every reboot). The update you provided works as well as the current version from the microG repo. Thanks!