Open MagTun opened 1 year ago
This issue can be reproduced on Android 12: Motorola e32(s). Exactly the same problem. The .apk from Github works correctly (AnkiDroid-2.16.2-arm64-v8a.apk)
@ApprobationBW : which version of the apk from github did you install?
TL;DR: INSTALL_FAILED_VERSION_DOWNGRADE: Downgrade detected: Update version code 21602300 is older than current 321602300
Reproduction Steps:
====
Workarounds (⚠️ causes data loss)
1.
2.
adb shell pm uninstall com.ichi2.anki
@mikehardy
versionCode
than play
(FDroid: 21602300
, Play: 321602300
)versionCode
Interesting! I just got home from traveling since July 2 (!) And FDroid distribution is my first goal for ankidroid as I get moving again.
I don't see why we can't have the full version of 2.16 use the top version code so that FDroid can install over it as we get 2.16 rolled out there. I'll look through the other related items...
For context we only just hit around 50% adoption via play store of 2.16 and the release has been a real bear to get released, so please have a little patience while we get everything releasing smoothly in all channels like 2.15...
@ApprobationBW : which version of the apk from github did you install?
AnkiDroid-2.16.2-arm64-v8a.apk (The universal version also works. This is an F-Droid specific issue that can be reproduced)
we do ABI splits using versions that are either the number 1, 2, 3 or 4 (depending on which ABI we are building) multiplied by 100000000 and added to the base version code.
So going from an ABI split to a universal build (which is what F-droid uses) will always look like a downgrade.
A quick fix would be to alter the build script in f-droid to add 400000000 to it. This is not great though, as it will just cause problems later when/if f-droid does ABI splits for ankidroid.
I submit that f-droid should do ABI splits so I think the real solution is to pursue the solution hinted at in the related issue here: https://gitlab.com/fdroid/fdroiddata/-/issues/3047
It doesn't look that hard, just adding stanzas to the script, I think?
Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Just ran into this issue with Anki 2.17. Previously installed Anki through Play Store, uninstall and keep data led to the abovementioned error when trying to install from F Droid. Reinstall through Playstore and then uninstall with "keep data" unchecked worked like mentioned in the first post. Thanks!
Checked for duplicates?
What are the steps to reproduce this bug?
After migrating my phone from Android 10 to Android 13, I had to move the Ankidroid folder from
/storage/emulated/0/AnkiDroid
tostorage/emulated/0/Android/data/com.ichi2.anki/files/AnkiDroid
but this caused several problems*. So, I decided to uninstall Anki and reinstalled it from f-droid. But I got this error:I was able to install Ankidroid from Github but I had to use the "arm64-V8A" version otherwise I also got an error "App not installed as package appears to be invalid". **
For information, when I was on Android 10, I first installed Ankidroid via the Play Store, then I used several alpha versions of the "armeabi-v7a.apk", and recently the app was automatically updated by Play Store to 2.16. On Android 10 and with Anki 2.16, I was still able to use the
/storage/emulated/0/AnkiDroid
folder It's only when I migrated to Android 13 that I had to use the app data path.In brief, I guess the version on F-droid doesn't include all the versions of the apk.
(*) For example:
storage/emulated/0/Android/data/com.ichi2.anki/files/AnkiDroid
(**)Also, it's strange that I had to use the "arm64-V8A" version as I always used the "armeabi-v7a" before for the alpha updates (I kept the same smartphone).
Expected behaviour
Being able to install AnkiDroid via F-droid
Actual behaviour
Unable to install the app (cf printscreen above).
Debug info
(Optional) Anything else you want to share?
On F-droid there is a warning "This app has features you may not like. Learn more! [...] This app promotes or depends entirely on a non-free network service".
Research