Skip to content

Be able to download APK without actually installing it (notably for incompatible apps)

I looked at first page results of DuckDuckGo and Google for aurora store download without installing but have not found interesting results.

googleplaydownloader could be a workaround if I remember correctly. Maybe ClaudiuGeorgiu/PlaystoreDownloader. With the correct credentials for a not 2FA Google account with an unknown source Android id on https://www.google.com/android/uncertified in credentials.json get:

pipenv run python3 -m playstoredownloader.cli com.carrefour.fid.android
Output:
23/03/2024 19:49:00> [WARNING][playstoredownloader.playstore.util][wrapped()] Login failed, please check your credentials (retrying in 1s)
23/03/2024 19:49:01> [WARNING][playstoredownloader.playstore.util][wrapped()] Login failed, please check your credentials (retrying in 2s)

Investigating forks:

ClaudiuGeorgiu/PlaystoreDownloader/blob/master/playstoredownloader/playstore/playstore.py#L40

ClaudiuGeorgiu/PlaystoreDownloader/blob/0567dfef9342ce47fa08e772c7c24d87f535d8d6/playstoredownloader/playstore/playstore.py#L40-L47

https://raccoon.onyxbits.de/blog/needs-browser-login-workaround/

pipenv run python download.py com.carrefour.fid.android
Output:
23/03/2024 23:26:12> [ERROR][playstore.playstore.Playstore][app_details()] Error for app 'com.carrefour.fid.android': Error retrieving information from server. DF-DFERH-01
23/03/2024 23:26:12> [CRITICAL][__main__][main()] Error when downloading 'com.carrefour.fid.android': unable to get app's details

image

Thought about decompiling, removing the problematic if, recompiling and executing but the recompilation seems a difficult step as jd-gui does not perfectly decompile and there are some programming errors and if I do not consider them and run anyway I get:
Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problems: 
	Syntax error on token ".", * expected after this token
	The import java.util.Date collides with another import statement
	Syntax error on token ".", delete this token
	Preconditions cannot be resolved or is not a field
	Syntax error on token ".", delete this token
	Preconditions cannot be resolved or is not a field
	Type mismatch: cannot convert from DefaultDateTypeAdapter to TypeAdapter<Timestamp>
	Type mismatch: cannot convert from DefaultDateTypeAdapter to TypeAdapter<Timestamp>

	at RaccoonFree/com.google.gson.GsonBuilder.<init>(GsonBuilder.java:3)
	at RaccoonFree/de.onyxbits.raccoon.mockup.MockUtil.decodePawn(MockUtil.java:252)
	at RaccoonFree/de.onyxbits.raccoon.dummydroid.PlayProfileDao.loadPawn(PlayProfileDao.java:21)
	at RaccoonFree/de.onyxbits.raccoon.dummydroid.Launcher.loadPawn(Launcher.java:335)
	at RaccoonFree/de.onyxbits.raccoon.app.config.Profile.loadPawn(Profile.java:69)
	at RaccoonFree/de.onyxbits.raccoon.app.config.Profile.getLabel(Profile.java:52)
	at RaccoonFree/de.onyxbits.raccoon.app.mocking.StudioController.createPrimaryWindow(StudioController.java:212)
	at RaccoonFree/de.onyxbits.duck.ui.PrimaryWindowController.createWindow(PrimaryWindowController.java:93)
	at RaccoonFree/de.onyxbits.duck.ui.WindowController.getWindow(WindowController.java:71)
	at RaccoonFree/de.onyxbits.raccoon.app.mocking.StudioActivity.runInForeground(StudioActivity.java:23)
	at RaccoonFree/de.onyxbits.duck.ui.AbstractActivity.run(AbstractActivity.java:77)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

One purpose is to make the initial app to download APKs work, another would be to have this PlaystoreDownloader fork work.

Should investigate the actually open-source https://github.com/onyxbits/dummydroid. Note that this repository does not contain any mention about above error message about the premium condition. Well without surprise got:

image

There is no particularly interesting issue.

Note that the link I am quite fine with using above method (Test App then Uplink > Download App) looks like: https://play.googleapis.com/download/by-token/download?token=CENSORED&cpn=CENSORED

aapt dump badging com.carrefour.fid.android.apk
package: name='com.carrefour.fid.android' versionCode='1804' versionName='19.1.0' compileSdkVersion='34' compileSdkVersionCodename='14'

seems correct but a bit weird that the versionName is greater than the claimed Play Store one that is 19.0.0.

Related to Benjamin_Loison/PlaystoreDownloader/issues/1.

Got the following Aurora Store device configuration after libhoudini install (note that I was already logged in so it potentially have not changed anything):

aurora_store_waydroid_waydroid_x86_64.properties.asc

With before libhoudini install:

diff aurora_store_waydroid_waydroid_x86_64_{after,before}_libhoudini.properties
Output:
2c2
< #Sun Mar 24 13:30:22 GMT 2024
---
> #Sun Mar 24 13:34:53 GMT 2024
11c11
< Platforms=x86_64,x86,arm64-v8a,armeabi-v7a,armeabi
---
> Platforms=x86_64,x86

Does DummyDroid even accept above format? It does not even accept a format, being able to interact with Waydroid thanks to Edit > Probe device via USB or make a format converter as can paste a configuration, I guess with DummyDroid format, would be nice. As the proposed Samsung device proposed has the same SDK version as Waydroid it is quite fine.

To help DummyDroid get an appropriate APK download link.

Note that no matter if specify:

  • the Samsung device
  • the Username
  • the Password
  • Edit > - OAuth2 Token - GSF ID
Uplink > Download App leads to:
Download...

# Failure

HTTP 401 - Unauthorized
Error retrieving information from server. DF-DFERH-01

Following https://raccoon.onyxbits.de/blog/needs-browser-login-workaround/#logging-in-an-existing-raccoon-profile does not solve the issue, as is, as the software does not allow following steps without Username and Password provided, but the https://raccoon.onyxbits.de/blog/needs-browser-login-workaround/#creating-a-new-raccoon-profile approach works.

While it works for the Raccoon test and Carrefour apps, for fr.gouv.franceidentite I get:
Download...

# Failure

class org.apache.hc.client5.http.ClientProtocolException
Delivery failed, status: 2

To investigate:

https://github.com/matlink/gplaycli:

sudo apt install -y gplaycli
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python gplaycli -d com.linguee.linguee
Output:
[Errno 2] No such file or directory: '/home/benjamin/.cache/gplaycli/token'
[ERROR] Cannot retrieve email address from token dispenser

Note that if have a not open-source method giving Play Store URLs it could temporarily do the job, as I can verify that it is the latest release without being authenticated from any device.

According to my LineageOS Fairphone 4 Aurora Store (minimized):

https://play.googleapis.com/download/by-token/download?token=AOTCm0Txa26VqeB56bHbMXg9-QaUDEVa0LJeZ4IRcG3u4_I03p9tVtN-Qf2BNxxJaa85tJcDDMrgTqVX7hkHLg3pYBN0dfoC153bqVVQNCd8Oxf4nhFA29oEc4gn1gB9ldKfL3jeXitPGXvNluZwaFMJlVwx_gVSX0tjNWxRdxIO_ML-GVjU2AvoO3L6XS4T-WGLXXgq1By9PyIHwgWj9nwaaQo70In2I9stn8mQ5IF08f0AQyknUxy5o15kLMYjWJZ0RodTToFkaINAZwZTJvlqYLZ6YJrsBphj4-tlYuT-Bg4MGlSwK4_7bBrox1cUV6o-q8rcj-XXs2TknQ7_ilC0EPnaAqMQ7iNdwj506CupwBKa4nJex_j36HB-2Lhny7OVmRGewgV95mPuN61ke0lDhArds6WBFNJ9F1qEKUdEsw

redirects to (seems minimized but unsure):

https://rr1---sn-25ge7nsd.gvt1.com/play-apps-download-default/download/by-id/AF3DWBfkGpzLDiMDFxTo4XhicYUCStAldu_bYSMV_CIXaT0cwr7jm72XiYgsCcSTZEthuZzijCkhkt4gZnq29wKcQ1sCoJjEHfHlNr37DIAbPibyJah0shsfxwh2r5o1NP45N--vkpYEbiy1gsJbVxN26hi8G4S82A?ctier=L&xpc=EgVo5bjzNQ%3D%3D&initcwndbps=1476250&mh=T5&mm=31%2C26&mn=sn-25ge7nsd%2Csn-4g5e6ns6&ms=au%2Conr&mv=m&mvi=1&pl=44&expire=1711394191&ip=CENSORED&ipbits=0&sparams=expire%2Cipbits%2Cip%2Cq%3A%2Cinitcwndbps%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cctier%2Cxpc&signature=24D4DA5E102288AD946696E2A4C2823A55F78910.ABB8515B45A9AF8662B2320FE71D5D4A81E82796&key=am3

I considered:

Related to #4 and #5 (closed).

Edited by Benjamin Loison