-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In-app purchase support #309
Comments
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. |
@acsway878787: The best way to get the problem fixed is to post a logcat when the problem happens. |
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).
|
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. |
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. |
@mar-v-in did you have a chance to have a look at my logcat yet? |
@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. |
I'd like to see this resolved so I added $5 to Bountysource |
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:
This problem was not present in older Play Stores afair so you might as well be able to just downgrade it. |
@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. |
@ShapeShifter499 I can't help you there, I never used original Play Store. |
@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? |
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 |
That's to much work every time I want to update microG, or when there is a Google Play Store update, or even when I want to update my ROM. "Modify the operating system to allow Play Store to do this method call" -- This seems like the best way, maybe it can be added to the set of patches already in use. But I'm just pulling things out of thin air at this point, I don't have much knowledge past this point. |
@ShapeShifter499 this modification would be about reducing android's security by punching a hole in it's security system. I will not write or support such a patch. The best solution IMHO would be a Xposed module, but I won't be the one to create it. |
@mar-v-in thanks for that solution! I re-signed microG GmsCore and Play Store with the same (debug) signature and modified Play Store Manifest for correct fake signature: et voila. It's working. I test-bought that 0,10 € Piano app Google is currently offering. The only thing I notices so far is that my only installed paid app on my Moto X Play (Flux Substratum Theme) needed to be re-installed to verify the purchase process. Haven't tested on my Tablet yet, where I have a few paid games installed. Maybe all paid apps need a re-installation if not coming from a clean flash, but that's only a one-timer. If someone wants to give it a try: Install at your own risk, Play Store TOS violation, bla, bla. [The strange thing is: on TouchWiz ROMs (atlest Marshmallow, haven't tested Nougat) Samsung has made so many changes to the framework files that in-app-purchases work just perfect with only patching framework files using tingle/haystack. Also Maps is auto-granted permission to accounts, unlike on other ROMs where you manually have to allow it, else it won't find the account.] |
I added 10 $ to the bounty for native solution, btw. |
Nanolx, do i just have to install the two apks you linked for it to work properly or do I need to do something else? If I need to do womething else, then could you tell me the steps? |
@Ningyoplug install them the same way you did with the original ones, so usually both in /system/priv-app/ |
@Nanolx trying to install your gmscore but it tells me "the package appears to be corrupt" |
@Ningyoplug move it manually into /system/priv-app/ replacing the original file and reboot. The solution with the debug-signed apks is a bit tricky. |
@Nanolx I don't even have a Phonesky folder in priv-app.... and Play Store keeps giving me "server error" and idk how to fix it. |
@Ningyoplug Dunno, you can either try my whole project, checkout http://www.github.com/Nanolx/NanoMod, be sure to read all of README. I uploaded a snapshot zip: https://www.androidfilehost.com/?fid=745425885120721657 In case you wanna try, be sure to move any further discussion to the NanoMod repository (as it's not related to microG). Or wait for someone to add native (in-)app-purchase support to microG. |
@Nanolx I tried your package, same issue. |
I even tried uninstalling and reinstalling problem apps |
Clear PlayStore data. Might give that a try, else please a logcar in the other git repo. |
I created a new snapshot of my Magisk Module. Many internal changes, especially now possible for example to only populate microG (see part "Alter Installation" in the README).
Edit: beta 3 with installer changes. |
OK 92. I will try 81.Thanks. |
@ale5000-git how to disable play store auto update? |
It would be really nice if 'more google api's' would be supported. |
I am having big trouble with Yatse. A kodi remote. Currently the best way to get it running is the Google Play store license API. Any plans or ideas for 2019? |
Licenses and their validation are part of what you do as part of a purchase contract with Google, thus validation only works with Play Store and this won't change. Basically any license validation outside from verified Google data could be misused and is in most countries illegal anyway. Some apps like Titanium or Tasker allow for license verification without Play Store, but that's only a minority of apps and each does it in a different way. In your particular case I don't know about Yatse, but as an alternative Kore is available on F-Droid. |
So, since I provide a Play Store that works for (in-)app-purchases with microG since over a year now, I guess I can claim those 15$? For those curious:
And this issue can be closed as "fixed externally"? |
my 2 cents: sounds legit. . . |
How you have updated the Apps? @Nanolx |
@Nanolx |
Did you grant fake package signature pemission? Does your device pass SafetyNet?
Am 18. April 2019 21:48:26 MESZ schrieb coxtor <notifications@github.com>:
…
@Nanolx
Hi, I am coming from a clean install on lineage 16.0 Magisk + Nanodroid
+ Nanodroid Repository using your modified Play Store. All appears to
work fine however, I can not download any of my purchased items, even
though I can see them in my purchase history in the same app.
Furthermore Applications using in app purchases do not recognize
purchased in app purchases. However, if I attempt to purchase the item
again, I get a toast message that I already own the item. This message
does not unlock the items functionality though. The Logcat does not
show any failures just many reauths.
Any advise?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#309 (comment)
--
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
|
Wow - that was a simple fix. I enabled SafteyNet in the settings app as you suggested and it started to work. 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? |
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 |
@Nanolx External workarounds doesn't seem to be valid fixes in my opinion. |
Nobody will re-implement Google's license validation and purchase API. That would be a clear TOS violation, may even be considered illegal in some countries.
Am 17. September 2019 17:06:36 MESZ schrieb "Martin Dünkelmann" <notifications@github.com>:
…
@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.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#309 (comment)
--
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
|
But your play store hack is a license violation either. That's sad, since that's the only issue for me to switch to microG forever. |
But not replicating any API. All I do is giving PS fake signature permission, all functional code is unchanged, all APIs are official, including access to them.
So yes it's a TOS violation, but not as critical and potentially "piracy" (wtf is illegal duplication verbally linked to pirates??) allowing re-implentation of the license validation API.
Am 17. September 2019 18:15:07 MESZ schrieb "Martin Dünkelmann" <notifications@github.com>:
…But your play store hack is a license violation either.
So this issue can't ever get fixed (external).
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#309 (comment)
--
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
|
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) :( |
Initial experimental support for in app billing (purchases and subscriptions) landed in master. |
What about a new nightly for testing please? |
The commit for reference: d4d7713 How does that work? Do you still need the Play Store installed to facilitate the purchase? |
You need latest version (0.3.1) of microG Services and microG Companion. |
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?
The text was updated successfully, but these errors were encountered: