yeriomin / YalpStore

Download apks from Google Play Store
GNU General Public License v2.0
2.39k stars 260 forks source link

Corrupted Duolingo APK? #532

Closed Rudloff closed 6 years ago

Rudloff commented 6 years ago

Expected behavior When installing Duolingo (com.duolingo) from Yalp, it should work correctly.

Actual behavior The installed app seems corrupted. It is displayed with the default Android icon in the launcher and when I launch it, it crashes immediately:

09-30 16:46:13.053 10570 10570 D AndroidRuntime: Shutting down VM
09-30 16:46:13.054 10570 10570 E AndroidRuntime: FATAL EXCEPTION: main
09-30 16:46:13.054 10570 10570 E AndroidRuntime: Process: com.duolingo, PID: 10570
09-30 16:46:13.054 10570 10570 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider com.crashlytics.android.CrashlyticsInitProvider: android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f08015a
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at android.app.ActivityThread.installProvider(ActivityThread.java:5865)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at android.app.ActivityThread.installContentProviders(ActivityThread.java:5454)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5393)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at android.app.ActivityThread.-wrap2(ActivityThread.java)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1546)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:154)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6128)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
09-30 16:46:13.054 10570 10570 E AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f08015a
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at android.content.res.ResourcesImpl.getResourcePackageName(ResourcesImpl.java:236)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at android.content.res.Resources.getResourcePackageName(Resources.java:1916)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at io.fabric.sdk.android.services.common.CommonUtils.n(CommonUtils.java:767)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at io.fabric.sdk.android.services.common.CommonUtils.a(CommonUtils.java:517)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at io.fabric.sdk.android.services.common.CommonUtils.a(CommonUtils.java:498)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at io.fabric.sdk.android.services.common.m.a(FirebaseInfo.java:52)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at com.crashlytics.android.CrashlyticsInitProvider.onCreate(CrashlyticsInitProvider.java:1073)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at android.content.ContentProvider.attachInfo(ContentProvider.java:1751)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at android.content.ContentProvider.attachInfo(ContentProvider.java:1726)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    at android.app.ActivityThread.installProvider(ActivityThread.java:5862)
09-30 16:46:13.054 10570 10570 E AndroidRuntime:    ... 10 more
09-30 16:46:13.057  2718  4294 W ActivityManager:   Force finishing activity com.duolingo/.app.LoginActivity
09-30 16:46:13.061  2718  4294 D ActivityTrigger: ActivityTrigger activityPauseTrigger 
09-30 16:46:13.065  2718  4294 W ActivityManager:   Force finishing activity com.duolingo/.app.LoginActivity

It used to work correctly a few weeks/months ago. I tried to install it on another device with Play Store and it worked correctly.

Steps to reproduce

  1. Install com.duolingo with Yalp.
  2. Launch it.

Your setup Yalp Store 0.43 on a Fairphone 2 with Android 7.1.2. Delta updates are disabled.

yeriomin commented 6 years ago

Duolingo (and several other apps) is no longer distributed as a monolithic apk. I noticed this a couple of weeks ago. You can read more about split apks here.

This is a problem for several reasons:

The changes required for installing such apps are in master, but installation works only with root or privileged installation methods. Otherwise you will see a warning after download.

pgera commented 6 years ago

Is there a counterpart to the f-droid privilege extension for yalp ? Or rather, a way to register yalp as a client with the f-droid priv-esc extension at build time ? If this is not resolved upstream, it may be necessary to incorporate the privilege extension during the AOSP build process.

yeriomin commented 6 years ago

@pgera

Is there a counterpart to the f-droid privilege extension for yalp ?

No, installing Yalp Store apk into the system partition is enough. Yalp Store can self-install if your device is rooted. Or you can use the OTA zip from the releases page.

Or rather, a way to register yalp as a client with the f-droid priv-esc extension at build time ?

No. F-droid devs declined. https://gitlab.com/fdroid/privileged-extension/merge_requests/25. But you can build Yalp Store into your AOSP fork.

pgera commented 6 years ago

@yeriomin , from the other comment, this branch https://github.com/yeriomin/YalpStore/tree/fdroid-privileged-extension was the one for the privilege extension method, right ? I see that it hasn't been updated recently. Is it still possible to bring it up to date with master ? On the f-droid side, the the priv-ext page has some more details and documentation on creating it for other apps. I can give things a try in my rom build. Alternatively, I can also just whitelist yalp in the main fpe app in the rom build since I'm building it anyway.