Originally reported on Google Code with ID 2209
Here is a link with more details about the changes: http://www.androidcentral.com/kitkat-sdcard-changes
I've had a user report two Samsung devices that are now unable to use AnkiDroid after
they both got updated to Android 4.4.2:
Note 2 on 4.4.2, exFAT 64GB SD
Note 10 on 4.4.2, FAT 16GB SD
Also a couple screenshots that show what happens when downloading a collection or opening
an existing one.
I believe so far we have only tested 4.4.2 on Nexus devices which only have internal
storage so we never caught this.
Reported by Houssam.Salem.Au on 2014-07-24 11:59:33
Issue 2260 has been merged into this issue.
Reported by perceptualchaos2 on 2014-09-01 02:20:34
Issue 2259 has been merged into this issue.
Reported by perceptualchaos2 on 2014-09-01 02:21:28
See issue #67570. Can't write anything to external sd card.
Reported by ravip005 on 2014-11-01 15:08:40
I thought something was up. When the deck doesn't work on my phone, I usually load the
deck on the computer and check database there to make it work on my phone. This time,
that didn't work. Then I tried to copy the default AnkiDroid directory that comes with
a fresh install to my sdcard and changed the location of the deck to point to that.
Even that didn't work. I looked at issue #67570 and a project member posted the following.
When will AnkiDroid be updated to let us read and write to our decks located on our
SD cards? I guess for now, I will just settle for desktop Anki.
Hey all, in KitKat we introduced APIs that let apps read/write file in app-specific
directories on secondary storage devices, such as SD cards.
We heard loud and clear that developers wanted richer access beyond these directories,
so in Lollipop we added the new ACTION_OPEN_DOCUMENT_TREE intent. Apps can launch
this intent to pick and return a directory from any supported DocumentProvider, including
any of the shared storage supported by the device. Apps can then create, update, and
delete files and directories anywhere under the picked tree without any additional
user interaction. Just like the other document intents, apps can persist this access
across reboots.
This gives apps broad, powerful access to manage files while still involving the user
in the initial selection process. Users may choose to give your app access to a narrow
directory like “My Vacation Photos,” or they could pick the top-level of an entire
SD card; the choice is theirs.
To make it easy for developers to transition to these new APIs, there’s a new DocumentFile
support library class. It looks and feels just like a traditional java.lang.File object,
which makes it easy to adapt existing code:
http://developer.android.com/reference/android/support/v4/provider/DocumentFile.html
These new APIs aren’t just limited to shared storage; they can be used with any DocumentsProvider
that adds support for Root.FLAG_SUPPORTS_IS_CHILD, such as the advanced Vault example:
https://android.googlesource.com/platform/development/+/android-5.0.0_r2/samples/Vault/src/com/example/android/vault/VaultProvider.java#258
If you're an end user, please reach out to app developers to ask them to start using
these new APIs. With these new rich APIs in place, this issue is considered fixed.
http://code.google.com/p/android/issues/detail?id=67570
Reported by christopher.upapong on 2014-11-17 02:42:22
Thanks for the info, I wasn't aware of this new API!
Reported by perceptualchaos2 on 2014-11-17 05:39:30
I figured out a workaround and successfully moved AnkiDroid folder to external SD card
on my unrooted hTC Desire 820.
Here are the steps:
1. Find the package name of AnkiDroid apk: Since the name of current version AnkiDroid
apk is "com.ichi2.anki-2.apk", the package name is "com.ichi2.anki"
2. Go to your external SD card folder via file management app and create a folder with
the apk's package name containing an AnkiDroid sub-folder: the exact path depends on
your devices.
E.g. On my Desire 820, the path of the external SD card folder is "/storage/ext_sd/",
and after I created the folders the complete path of the AnkiDroid folder is "/storage/ext_sd/Android/data/com.ichi2.anki/AnkiDroid/"
3. Install AnkiDroid, open it, and change the storage path to the path I mentioned
above.
4. Enjoy the benefits AnkiDroid brings to you!!
Reported by hidelensman on 2014-12-01 14:02:03
^^^That seems to work... Thanks!
Reported by bryanwithay1986 on 2014-12-05 13:02:56
On a Sony Xperia Z1 manually creating the folder on the external sd-card didn't work.
You have to rename the folder on the internal storage (presumably AnkiDroid) to match
Ankidroid's package name: com.ichi2.anki and move the folder to the external sd-card
using File Commander (Default system app on Sony devices with root permissions). Afterwards
change the storage path in the settings to /storage/sdcard1/Android/data/com.ichi2.anki
Reported by chris.yereaztian on 2014-12-28 13:53:41
Issue 2588 has been merged into this issue.
Reported by perceptualchaos2 on 2015-04-23 00:02:15
Issue 2620 has been merged into this issue.
Reported by perceptualchaos2 on 2015-05-25 00:31:05
Issue 2660 has been merged into this issue.
Reported by perceptualchaos2 on 2015-06-22 01:33:12
hssm, I did what you said "/storage/NAME_SD/Android/data/com.ichi2.anki/AnkiDroid/". first it worked, but when I was syncing my collection another error appeared. Then I deleted my anki e reinstalled it, and now the path is not valid.
I tried the second method too, but didn't work.
My Android is 5.0.2.
In my old smartphone with Android JellyBean, the change of path woks normally.
Hi,
Currently my AnkiDroid collection and backup is stored on my device storage. I would like to move it to external SD card.
I was looking at the directions above but I am not able to find apk "com.ichi2.anki-2.apk" or the package name is "com.ichi2.anki".
The collection path on my phone is /sdcard/AnkiDroid.
Can I just move all the subfolders from my device storage AnkiDroid folder to newly created AnkiDroid folder in sdcard?
My Adroid version is 5.0 on Samsung Galaxy Active.
Thanks,
Sorry we can't provide support on this issue, and we strongly recommend _not_ to use external SD card. If you choose to ignore our advice then you're basically on your own, though you can probably find help on sites like forum.xda-developers.com and android.stackexchange.com
What a bunch of lazy devs to not support such a basic feature.
Just for reference, when I add an SD card, my device treats the SD card as internal storage and the internal storage as an SD card. I don't think SD cards can officially be formatted with anything that supports more characters than UCS-2, so this actually made it so that I couldn't use (without modification) a deck that had media filenames with characters in supplemental planes (i.e. extended kangxi radicals).
the one for sony xperia worked for me. Thank you very much
On a Sony Xperia Z1 manually creating the folder on the external sd-card didn't work.
You have to rename the folder on the internal storage (presumably AnkiDroid) to match
Ankidroid's package name: com.ichi2.anki and move the folder to the external sd-card
using File Commander (Default system app on Sony devices with root permissions). Afterwards
change the storage path in the settings to /storage/sdcard1/Android/data/com.ichi2.ankiReported by chris.yereaztian on 2014-12-28 13:53:41
A workaround with creating a com.ichi2.anki folder worked for me on Android 6. My path is /storage/<XXXX-XXXX>/Android/data/com.ichi2.anki/AnkiDroid/.
Anyway, ability to store app data on external SD card is quite a standard feature and lack of it may be a showstopper for using the app. One big deck will fill up whole left space on most 8GB devices forcing users to uninstall other applications. It should definitely be possible to select external storage for data.
On android 7.0, we could change the storage to "External storage" via Settings/Applications. After this change, I guess we could set the AnkiDroid directory to /storage/<XXXX-XXXX>/Android/data/com.ichi2.anki/AnkiDroid/ via "Advanced Preference" in the menu.
(I am using on Galaxy S7)
But we definitely know this way is workaround and I hope this difficulty would be changed.
Hello 👋, this issue has been opened for more than 2 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
Most helpful comment
What a bunch of lazy devs to not support such a basic feature.