Obtainium icon indicating copy to clipboard operation
Obtainium copied to clipboard

Google Play as a Source

Open ImranR98 opened this issue 3 years ago • 16 comments

Google Play doesn't officially support APK downloads, but there are tools out there that do it using a user's credentials. Most of these are written in Python. This seems like a good one: https://github.com/rehmatworks/gplaydl

There are also Flutter plugins to run Python code. Like: https://pub.dev/packages/chaquopy

I have no idea whether any of these Google Play downloaders work, or if the Python-in-Flutter solution breaks anything. Possible issues would include storage permissions (can the Python script save files on device?) error handling, etc. Worth looking into at some point.

ImranR98 avatar Mar 02 '23 17:03 ImranR98

Possible issues would include storage permissions

Can you elaborate on why adding Play Store as a source would require Obtainium having storage permissions?

In general I think this would be a great idea for people without Google Play Services, as Aurora Store isn't getting much love nowadays, and I fear that it will eventually fall to the wayside completely.

A lot of people use Obtainium already, so having Play Store as a source would be amazing.

matchboxbananasynergy avatar Mar 08 '23 20:03 matchboxbananasynergy

Can you elaborate on why adding Play Store as a source would require Obtainium having storage permissions?

I have no clue if this is doable which is why it's labelled "Idea" instead of "Enhancement". The storage permission thing was just speculation - maybe Python code running in Flutter won't be able to store files via the normal Python API. No clue if this is the case.

ImranR98 avatar Mar 08 '23 20:03 ImranR98

Would suggest looking at https://github.com/EFForg/apkeep/ and https://github.com/EFForg/rs-google-play/tree/master/gpapi - have the user authenticate with their credentials within the app and then go from there really.

flawedworld avatar Mar 21 '23 20:03 flawedworld

have the user authenticate with their credentials

I suppose updating without credentials is out of the question? Or are credentials only needed for downloading fresh installs?

BHydden avatar May 07 '23 04:05 BHydden

Play Store requires a Google account to download from.

x86pup avatar May 07 '23 04:05 x86pup

Huh. I thought I heard somewhere you could update existing apps without logging in. But I probably misunderstood.

BHydden avatar May 07 '23 04:05 BHydden

There are workarounds for credential issue, either bypassing for simply using those provided by someone. Raccoon on Desktop and Aurora Store on Android (both open sourced) can download from Google Play. For web solutions, try https://apps.evozi.com/apk-downloader/ and https://apk.support/apk-downloader

momobobe avatar May 19 '23 15:05 momobobe

Huh. I thought I heard somewhere you could update existing apps without logging in. But I probably misunderstood.

I think this is only for "system apps" (preinstalled on phone). Although it would be amazing if there was a workaround to make Play Store think that any app is a "system app" so that it allows updating without account. Then you could install your app from another source (e.g. clone from another phone, or APKMirror if available) and keep it updated through the Play Store without needing a Google account.

eylenburg avatar Sep 05 '23 09:09 eylenburg

If you want Google Play as an apk source. Aurora Store is a good example to refer to.

ngocanhtve avatar Nov 03 '23 15:11 ngocanhtve

Aurora Store has 3 ways of account logging:

  1. Google Account
  2. Anonymous
  3. Anonymous insecure (which uses local GSF ID)

I think it's possible to analyse Aurora Store source code and implement the anonymous login (which uses a random Google Profile) and then retrieve play store apps and their metadata. Although there's a chance of rate limiting which already had been occurred quite numerous times with Aurora Store users. I believe they fixed this a couple of months ago.

If not API access, "track only" is definitely possible.

foxjaw avatar Nov 07 '23 13:11 foxjaw

For web solutions, try https://apps.evozi.com/apk-downloader/ and https://apk.support/apk-downloader

@ImranR98 apps.evozi is a good example if it can be analyzed how it does that, AFAIK its not open source.

jayb-g avatar Feb 09 '24 04:02 jayb-g

Non FOSS projects doesn't help tbh.

foxjaw avatar Feb 09 '24 05:02 foxjaw

@foxjaw I thought the point here is to try to figure out how it works(so an independent workaround can be implemented in obtanium), whether its FOSS or non-FOSS is irrelevant in that context.

jayb-g avatar Feb 10 '24 18:02 jayb-g