Skip to content

In-app purchase support #309

Closed
Closed

Description

@acsway878787

I installed Google Play store and microG service core. I found that In-app purchase sometimes worked and sometimes not. So is In-app purchase official support?

Activity

  1. mar-v-in commented on Feb 12, 2017

    @mar-v-in
    Member

    I can't test IAP so I can't support it. If it doesn't work and you find any issues in the log, you can report them here and I might try to handle them.

  2. ale5000-git commented on Feb 12, 2017

    @ale5000-git
    Member

    @acsway878787: The best way to get the problem fixed is to post a logcat when the problem happens.

  3. Nanolx commented on Mar 21, 2017

    @Nanolx
    Contributor

    Logcat between when trying to buy something. I can't get it to work with any custom ROM, though it works fine on Samsung TouchWiz. TouchWiz ROMs are granting much more permissions to system apps by default (alteast for MM, haven't tested Nougat). Though, for this test I used my lux (Moto X Play) with Ressurection Remix. Framework patched using Haystack and latest microG (0.24-79) with DroidGuard, GsfProxy, PlayStore (7.6.08.N).

    03-21 18:09:26.403  2380  3653 W ActivityManager: Unable to start service Intent { act=android.support.customtabs.action.CustomTabsService pkg=com.android.chrome } U=0: not found
    03-21 18:09:26.447  6554  6554 D AndroidRuntime: Shutting down VM
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: FATAL EXCEPTION: main
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: Process: com.android.vending, PID: 6554
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: java.lang.SecurityException: uid 10124 cannot get user data for accounts of type: com.google
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:1684)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:1637)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at android.accounts.IAccountManager$Stub$Proxy.getUserData(IAccountManager.java:887)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at android.accounts.AccountManager.getUserData(AccountManager.java:402)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at com.google.android.finsky.billing.auth.o.a(SourceFile:107)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at com.google.android.finsky.billing.auth.a.a(SourceFile:143)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at com.google.android.finsky.billing.lightpurchase.al.a(SourceFile:6940)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at com.google.android.finsky.billing.common.g.v(SourceFile:265)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at com.google.android.finsky.billing.common.g.a(SourceFile:260)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at com.google.android.finsky.billing.lightpurchase.l.a(SourceFile:34708)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at com.google.android.finsky.billing.lightpurchase.al.U(SourceFile:945)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at com.google.android.finsky.billing.lightpurchase.al.T(SourceFile:884)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at com.google.android.finsky.billing.lightpurchase.al.S(SourceFile:868)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at com.google.android.finsky.billing.lightpurchase.al.A(SourceFile:20108)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at com.google.android.finsky.billing.lightpurchase.e.j.x(SourceFile:20128)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at com.google.android.finsky.billing.lightpurchase.d.c.onClick(SourceFile:200)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at android.view.View.performClick(View.java:5637)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at android.view.View$PerformClick.run(View.java:22433)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:751)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:154)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6176)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)
    03-21 18:09:26.453  6554  6554 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:778)
    03-21 18:09:26.456  2380  4406 W ActivityManager:   Force finishing activity com.android.vending/com.google.android.finsky.billing.lightpurchase.PurchaseActivity
    03-21 18:09:26.473  2380  4406 W ActivityManager:   Force finishing activity com.android.vending/com.google.android.finsky.billing.lightpurchase.LightPurchaseFlowActivity
    03-21 18:09:26.523  2380  4406 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:877 com.android.server.am.AppErrors.crashApplicationInner:375 com.android.server.am.AppErrors.crashApplication:309 com.android.server.am.ActivityManagerService.handleApplicationCrashInner:13686 com.android.server.am.ActivityManagerService.handleApplicationCrash:13668 
    03-21 18:09:26.527  2380  4406 E ActivityManager: Sending non-protected broadcast projekt.substratum.APP_CRASHED from system 2380:system/1000 pkg android
    03-21 18:09:26.527  2380  4406 E ActivityManager: java.lang.Throwable
    03-21 18:09:26.527  2380  4406 E ActivityManager: 	at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:18106)
    03-21 18:09:26.527  2380  4406 E ActivityManager: 	at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:18695)
    03-21 18:09:26.527  2380  4406 E ActivityManager: 	at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:18786)
    03-21 18:09:26.527  2380  4406 E ActivityManager: 	at android.app.ContextImpl.sendBroadcast(ContextImpl.java:881)
    03-21 18:09:26.527  2380  4406 E ActivityManager: 	at com.android.server.am.AppErrors.crashApplicationInner(AppErrors.java:375)
    03-21 18:09:26.527  2380  4406 E ActivityManager: 	at com.android.server.am.AppErrors.crashApplication(AppErrors.java:309)
    03-21 18:09:26.527  2380  4406 E ActivityManager: 	at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:13686)
    03-21 18:09:26.527  2380  4406 E ActivityManager: 	at com.android.server.am.ActivityManagerService.handleApplicationCrash(ActivityManagerService.java:13668)
    03-21 18:09:26.527  2380  4406 E ActivityManager: 	at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:1660)
    03-21 18:09:26.527  2380  4406 E ActivityManager: 	at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2980)
    03-21 18:09:26.527  2380  4406 E ActivityManager: 	at android.os.Binder.execTransact(Binder.java:565)
    03-21 18:09:26.573  2380  2503 W BroadcastQueue: Permission Denial: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to de.amazon.mShop.android/com.amazon.mcc.crashreporter.android.CrashReportBroadcastReceiver requires android.permission.READ_LOGS due to sender android (uid 1000)
    03-21 18:09:26.574  2380  2503 W BroadcastQueue: Permission Denial: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to de.amazon.mShop.android/com.amazon.mcc.crashreporter.android.CrashReportBroadcastReceiver requires android.permission.READ_LOGS due to sender android (uid 1000)
    03-21 18:09:26.658  2380  6364 I OpenGLRenderer: Initialized EGL, version 1.4
    03-21 18:09:26.658  2380  6364 D OpenGLRenderer: Swap behavior 1
    03-21 18:09:26.974  2380  2503 W ActivityManager: Activity pause timeout for ActivityRecord{7376ff9 u0 com.android.vending/com.google.android.finsky.billing.lightpurchase.PurchaseActivity t4 f}
    03-21 18:09:28.132  2380  4406 W ActivityManager:   Force finishing activity com.android.vending/com.google.android.finsky.billing.lightpurchase.PurchaseActivity
    03-21 18:09:28.149  2380  4406 W ActivityManager:   Force finishing activity com.android.vending/com.google.android.finsky.billing.lightpurchase.LightPurchaseFlowActivity
    03-21 18:09:28.153  1566  1566 W SurfaceFlinger: couldn't log to binary event log: overflow.
    03-21 18:09:28.171  2380  4406 W ActivityManager:   Force finishing activity com.android.vending/com.google.android.finsky.activities.MainActivity
    03-21 18:09:28.247  2380  4406 E ActivityManager: Found activity ActivityRecord{c8ed575 u0 com.android.vending/com.google.android.finsky.activities.MainActivity t4 f} in proc activity list using null instead of expected ProcessRecord{e8453f1 6554:com.android.vending/u0a124}
    03-21 18:09:28.293  2380  4406 I ActivityManager: Killing 6554:com.android.vending/u0a124 (adj 100): crash
    03-21 18:09:28.301  2380  4406 D ActivityManager: cleanUpApplicationRecord -- 6554
    03-21 18:09:28.307  2380  2504 W art     : Long monitor contention with owner Binder:2380_8 (4406) at void com.android.server.am.AppErrors.crashApplicationInner(com.android.server.am.ProcessRecord, android.app.ApplicationErrorReport$CrashInfo, int, int)(AppErrors.java:385) waiters=0 in void com.android.server.am.ActivityManagerService.unregisterReceiver(android.content.IIntentReceiver) for 112ms
    03-21 18:09:28.308  2380  2504 W InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed.
    03-21 18:09:28.373  2380  4408 W ActivityManager: Unable to start service Intent { act=com.google.android.gms.measurement.START pkg=com.google.android.gms } U=0: not found
    03-21 18:09:28.375  2380  4406 W ActivityManager: Unbind failed: could not find connection for android.os.BinderProxy@5db1cb0
    
  4. Ningyoplug commented on Mar 22, 2017

    @Ningyoplug

    I'm having problems with inapp purchases as well. As soon as I press "buy" to confirm the purchase, it tells me Google Play store has stopped.

  5. ShapeShifter499 commented on Apr 1, 2017

    @ShapeShifter499

    Same issue, Google Play store has stopped. I can't make any in app purchases in Pokémon GO. No I'm not cheating, this is the standard apk from the Play store. I'll try to take a log later.

  6. Nanolx commented on Apr 1, 2017

    @Nanolx
    Contributor

    @mar-v-in did you have a chance to have a look at my logcat yet?

  7. ShapeShifter499 commented on Apr 3, 2017

    @ShapeShifter499

    @mar-v-in Here's a logcat, taken from boot all the way till I attempt a purchase in Pokemon GO and I see "Google Play Store has stopped" message.
    Pokemon_GO-In_App_Purchase-microG-logcat.txt

  8. ShapeShifter499 commented on Apr 3, 2017

    @ShapeShifter499

    I'd like to see this resolved so I added $5 to Bountysource

  9. mar-v-in commented on Apr 3, 2017

    @mar-v-in
    Member

    The problem is that Play Store tries to call a method that it is only allowed to call if Play Services and Play Store are signed with the same key. As this is not the case when using microG with original Play Store, it crashes.

    There are three solutions to this problem, one uglier than the other:

    • Sign Play Store and microG with the same key (and use signature spoofing on play store to have it look like Google signed). There won't be Play Store builds signed with the official microG key, but you can still do it yourself.
    • Modify Play Store to not do this call (possibly using Xposed).
    • Modify the operating system to allow Play Store to do this method call (possibly using Xposed).

    This problem was not present in older Play Stores afair so you might as well be able to just downgrade it.

  10. changed the title [-]In-app purchase support ?[/-] [+]In-app purchase support ? [$5][/+] on Apr 3, 2017
  11. ShapeShifter499 commented on Apr 3, 2017

    @ShapeShifter499

    @mar-v-in Which version do I try? If I try the one suggested in the "Flashable Zip by @ale5000-git", Google Play Store 5.1.11, some apps get blacklisted from downloading. I'm guessing because Google thinks my device is running too old of a Operating System due to a out of date Google Play Store.

  12. mar-v-in commented on Apr 3, 2017

    @mar-v-in
    Member

    @ShapeShifter499 I can't help you there, I never used original Play Store.

  13. ShapeShifter499 commented on Apr 3, 2017

    @ShapeShifter499

    @mar-v-in "Sign Play Store and microG with the same key" Does there need to be any changes to the current code? Or should this work right now if I attempted it? Any caveats to this?

  14. mar-v-in commented on Apr 3, 2017

    @mar-v-in
    Member

    You won't be able to update microG through F-Droid or Play Store anymore and you need to add signature spoofing the Play Store (similar to how it is done in microG), which requires some modification of Play Store's AndroidManifest.xml

  15. 40 remaining items

  16. coxtor commented on Apr 18, 2019

    @coxtor

    Wow - that was a simple fix. I enabled SafteyNet in the settings app as you suggested and it started to work.
    Thank you. At this point it might be worth mentioning that the options in the app which can be enabled are not quite clear and what their functions imply. Perhaps a label below the options would help other users?
    What would be the point of having only SafetyNet enabled or only the device registration or any other combination? I would love to contribute this information however I do not have the necessary knowledge.

    Furthermore could you elaborate on the modification you made to the play store at some point if you have time? Is there more telephoning home going on, or is this removed also? How invasive and nosy is the modified play store with microg installed?

  17. Nanolx commented on Apr 19, 2019

    @Nanolx
    Contributor

    Yes, an ordinary user may want to simply enable all device registration, GCM and SafetyNet, but there are users who don't. The wiki could be improved, yes, I had in mind to spend some time improving it, though that's not going to be soon™.

    The changes I made to the Play Store is only so that it uses signature spoofing and disabling most of it's update checks (to reduce battery drain to a minimum; else Play Store would endlessly try to update Play Services and itself, contributed by @vavun), to ensure it's signature in-system is the same as microG's else security checks will not allow (in-)app-purchases if the don't match.

    You can find the patch here, currently version 14.5.52: https://gitlab.com/Nanolx/NanoDroid/blob/master/doc/Phonesky.diff

  18. MartinX3 commented on Sep 17, 2019

    @MartinX3

    @Nanolx
    People like me who wants to use the Aurora Store are still excluded.

    External workarounds doesn't seem to be valid fixes in my opinion.

  19. Nanolx commented on Sep 17, 2019

    @Nanolx
    Contributor
  20. MartinX3 commented on Sep 17, 2019

    @MartinX3

    But your play store hack is a license violation either.
    So this issue can't ever get fixed (external).

    That's sad, since that's the only issue for me to switch to microG forever.

  21. Nanolx commented on Sep 17, 2019

    @Nanolx
    Contributor
  22. MartinX3 commented on Nov 11, 2021

    @MartinX3

    Sadly there was no update since 10 months from @Nanolx and accordingto a bug report, it won't work with LineageOS 18.1 (Android 11) :(
    So back to OpenGapps Pico :(

    https://gitlab.com/Nanolx/microg-phonesky-iap-support

  23. added this to the 0.3.1 milestone on Mar 19, 2024
  24. changed the title [-]In-app purchase support ? [$15][/-] [+]In-app purchase support[/+] on Mar 21, 2024
  25. mar-v-in commented on Mar 22, 2024

    @mar-v-in
    Member

    Initial experimental support for in app billing (purchases and subscriptions) landed in master.

  26. Atemu commented on Mar 23, 2024

    @Atemu

    The commit for reference: d4d7713

    How does that work? Do you still need the Play Store installed to facilitate the purchase?

  27. mar-v-in commented on Mar 26, 2024

    @mar-v-in
    Member

    You need latest version (0.3.1) of microG Services and microG Companion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions