mvdan / fdroidcl

F-Droid desktop client
BSD 3-Clause "New" or "Revised" License
263 stars 22 forks source link

Mismatch between download and installed apk ABI? #55

Closed lunkhub closed 1 year ago

lunkhub commented 3 years ago

With the (armv7) device attached, I used command: fdroidcl download package-name

for several apps individually, including Tor browser and Tor browser alpha. I wanted to cache the apps before updating. Device was plugged in. Confirming,

"fdroidcl download org.torproject.torbrowser" gave:

Downloading https://guardianproject.info/fdroid/repo/tor-browser-10.5a11-android-x86_64-multi.apk... not modified APK available in /home/myuser/.cache/fdroidcl/apks/tor-browser-10.5a11-android-x86_64-multi.apk

"fdroidcl download org.torproject.torbrowser_alpha" gave:

Downloading https://guardianproject.info/fdroid/repo/Orbot-16.3.3-RC-1-tor-0.4.3.6-fullperm-universal-release.apk... not modified APK available in /home/myuser/.cache/fdroidcl/apks/Orbot-16.3.3-RC-1-tor-0.4.3.6-fullperm-universal-release.apk

Then "fdcroidcl install -u" gave:

Downloading https://guardianproject.info/fdroid/repo/tor-browser-10.0.12-android-armv7-multi.apk... done Downloading https://guardianproject.info/fdroid/repo/tor-browser-10.5a11-android-armv7-multi.apk... done Installing org.torproject.torbrowser Installing org.torproject.torbrowser_alpha

I note x86_64, the one downloaded initially, is the first Available Version listed by: fdroidcl show org.torproject.torbrowser or fdroidcl show org.torproject.torbrowser_alpha For example:

Available Versions :

Version : 10.0.12 (86.1.0-Release) (2015808047)
Size    : 82104872
MinSdk  : 0
ABIs    : x86_64

Is this the correct default behavior? Expected download command response was downloading the right apk for the attached device. Is there an option to download the right device apk before running update?

mvdan commented 3 years ago

The download command does try to find apks matching a connected device, but falls back to the latest version if no device (or multiple) are connected. Perhaps that logic is buggy.

Linus789 commented 1 year ago

Might work now with https://github.com/mvdan/fdroidcl/releases/tag/v0.6.0. If not, reopen the issue.