Closed WhtUsrWrks closed 6 months ago
Hello! 👋 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing
@WhtUsrWrks can you share screenshot of the permission screen and the popup where it is asking permissions? Or better maybe attach a screen recording.
I have the same issue on my Xiaomi Redmi Note 10 Pro. I have attached a screen recording and written some device info below.
https://github.com/ankidroid/Anki-Android/assets/144927977/302d0ccc-5776-42a2-b909-928f7536cc6b
Thanks for sharing!
I'm pinning this so we don't forget it
Hello. I have the same problem with One Plus Nord 2, Android 13.
Nobody mentioned which version of the app are they running. Is the app installed from the app store, downloaded from here etc?
Version 2.6.15 from the app store. Android 13, pixel 6a
Mine says 2.16.5 and I downloaded it from Google play
On Tue 19 Sept 2023, 18:32 Marcin, < @.***> wrote:
Version 2.6.15 from the app store. Android 13, pixel 6a —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID:
DuckDuckGo removed one tracker. More https://duckduckgo.com/-QgeEDl9Nx4fz_303RIzy756cy2ouygPrWxiLMNkhxFGBgwb_pdVCbY4m2csn7ZeKEr8Bm8wsxsHbNluvb6j7RdIKr8m7SGzdwrhvYgEFEOrAIdml-udKXwcLWnCDq5vfb3SXENBz0nar-bVUiX6n55PDstjW-awIpy2Y-pGjPqFDbJ7_lt4X2efyItk7Nv5iUQhQ5t0T87uJK-Vkl2F_Niv3PSE6A_icV3FFwljMlh_vh-Uh23xXSAi10EeDdeEm0qxrQ4bahr7LGlCplV85C6b8f6EXlRnE9jffUxSaAeXkiMU9vBxigkwkMGwl_MrfHns3kySeWKxuZ6O9xqCLrQJPvTvTcMe_nbTF31b3tSnozPX-7-vW6JvV5Y8n2e75Ea_2yQPR8fHN0AOO0RA8hkEZ3_wqp54ONKd9y6Kji8Q7hUygCw20BmgbU7WP-VuaXmunlfZIBawi1Pw Report Spam https://duckduckgo.com/-QgeEDl9Nx4fz_303RIzy756cy2ouygPrWxiLMNkhxFGBgwb_pdVCbY4m2csn7ZeKEr8Bm8wsxsHbNluvb6j7RdIKr8m7SGzdwrhvYgEFEOrAIdml-udKXwcLWnCDq5vfb3SXENBz0nar-bVUiX6n55PDstjW-awIpy2Y-pGjPqFDbJ7_lt4X2efyItk7Nv5iUQhQ5t0T87uJK-Vkl2F_Niv3PSE6A_icV3FFwljMlh_vh-Uh23xXSAi10EeDdeEm0qxrQ4bahr7LGlCplV85C6b8f6EXlRnE9jffUxSaAeXkiMU9vBxigkwkMGwl_MrfHns3kySeWKxuZ6O9xqCLrQJPvTvTcMe_nbTF31b3tSnozPX-7-vW6JvV5Y8n2e75Ea_2yQPR8fHN0AOO0RA8hkEZ3_wqp54ONKd9y6Kji8Q7hUygCw20BmgbU7WP-VuaXmunlfZIBawi1Pw
Version 2.6.15 from the app store. Android 13, pixel 6a
— Reply to this email directly, view it on GitHub https://github.com/ankidroid/Anki-Android/issues/14423#issuecomment-1725899183, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZXMA7QBWT6EH6ZMQBUZS2TX3G3HJANCNFSM6AAAAAA4S7GPFM . You are receiving this because you were mentioned.Message ID: @.***>
I could enter, unintentionally. I wanted to show you the gray error message at the bottom and when I hit Delete app data, the app opened.
https://github.com/ankidroid/Anki-Android/assets/23616105/bd24a159-dedd-4376-a636-93bcefe7d7cc
Could this be the problem? This would at least explain why the system does not ask for memory access in the first place.
Three new permission is introduced with Android 13: READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, and READ_MEDIA_AUDIO. If you were using READ_EXTERNAL_STORAGE for accessing files, then you need to use one of these new permissions. If a user with Android 13 has previously granted this permission, then all is good. If not, then the permission request for READ_EXTERNAL_STORAGE will be ignored.
I experience the same running version 2.16.5 on Pixel 7 Pro with Android 13 (September 2023 update)
Launching AnkiDroid this logcat
is produced.
09-23 21:21:47.398 18391 19178 I Role : com.ichi2.anki not qualified for android.app.role.HOME due to missing RequiredComponent{mIntentFilterData=IntentFilterData{mAction='android.intent.action.MAIN', mCategories='[android.intent.category.HOME]', mDataScheme='null', mDataType='null'}, mMinTargetSdkVersion=1, mPermission='null', mQueryFlags=0, mMetaData=[]}
09-23 21:21:47.401 18391 19178 I Role : com.ichi2.anki not qualified for android.app.role.DIALER due to missing RequiredComponent{mIntentFilterData=IntentFilterData{mAction='android.intent.action.DIAL', mCategories='[]', mDataScheme='null', mDataType='null'}, mMinTargetSdkVersion=1, mPermission='null', mQueryFlags=0, mMetaData=[]}
09-23 21:21:47.404 18391 18642 I Role : com.ichi2.anki not qualified for android.app.role.SMS due to missing RequiredComponent{mIntentFilterData=IntentFilterData{mAction='android.provider.Telephony.SMS_DELIVER', mCategories='[]', mDataScheme='null', mDataType='null'}, mMinTargetSdkVersion=1, mPermission='android.permission.BROADCAST_SMS', mQueryFlags=0, mMetaData=[]}
09-23 21:21:47.406 20072 20072 E AppInfoDashboard: Package: com.ichi2.anki not found for user: 10
09-23 21:21:47.406 20072 20072 E AppInfoDashboard: Package: com.ichi2.anki not found for user: 11
09-23 21:21:47.407 1494 5310 E AppOps : Bad call made by uid 1000. Package "com.ichi2.anki" does not belong to uid -1.
09-23 21:21:47.407 1494 5310 E AppOps : noteOperation
09-23 21:21:47.407 1494 5310 E AppOps : java.lang.SecurityException: Specified package "com.ichi2.anki" under uid -1 but it is not
09-23 21:21:47.407 1494 5310 E AppOps : at com.android.server.appop.AppOpsService.verifyAndGetBypass(AppOpsService.java:4703)
09-23 21:21:47.407 1494 5310 E AppOps : at com.android.server.appop.AppOpsService.noteOperationUnchecked(AppOpsService.java:3466)
09-23 21:21:47.407 1494 5310 E AppOps : at com.android.server.appop.AppOpsService.noteOperationImpl(AppOpsService.java:3454)
09-23 21:21:47.407 1494 5310 E AppOps : at com.android.server.appop.AppOpsService.-$$Nest$mnoteOperationImpl(Unknown Source:0)
09-23 21:21:47.407 1494 5310 E AppOps : at com.android.server.appop.AppOpsService$CheckOpsDelegateDispatcher.lambda$noteOperation$4(AppOpsService.java:7662)
09-23 21:21:47.407 1494 5310 E AppOps : at com.android.server.appop.AppOpsService$CheckOpsDelegateDispatcher.$r8$lambda$oOwUoG55BBmJ6yiwhp3OAq3tQ30(Unknown Source:0)
09-23 21:21:47.407 1494 5310 E AppOps : at com.android.server.appop.AppOpsService$CheckOpsDelegateDispatcher$$ExternalSyntheticLambda3.apply(Unknown Source:32)
09-23 21:21:47.407 1494 5310 E AppOps : at com.android.server.policy.AppOpsPolicy.noteOperation(AppOpsPolicy.java:225)
09-23 21:21:47.407 1494 5310 E AppOps : at com.android.server.appop.AppOpsService$CheckOpsDelegateDispatcher.noteOperation(AppOpsService.java:7660)
09-23 21:21:47.407 1494 5310 E AppOps : at com.android.server.appop.AppOpsService.noteOperation(AppOpsService.java:3438)
09-23 21:21:47.407 1494 5310 E AppOps : at com.android.internal.app.IAppOpsService$Stub.onTransact(IAppOpsService.java:479)
09-23 21:21:47.407 1494 5310 E AppOps : at android.os.Binder.execTransactInternal(Binder.java:1309)
09-23 21:21:47.407 1494 5310 E AppOps : at android.os.Binder.execTransact(Binder.java:1268)
Dear AnkiDroid Team/Users,
I experienced the same with AnkiDroid 2.16.5 on Android 13 smartphone. Nevertheless, I was able to workaround that blocking issue by doing the following:
If I compare this situation to my initial launch of AnkiDroid (blocked by current issue), here is the main difference: First time, I was launching AnkiDroid (2.16.5) after a long period of inactivity (and multiple intermediate AnkiDroid updates), so last time I launched it, it was a version v2.x<2.16 (at that time, grant special access to all files was not yet required).
So from my own experience, and only based on it, here are my conclusions on that issue:
Hope this help.
Best regards,
I experienced this as well.
Device: Pixel 7 Pro Android version: 13 Android security update: 2023-08-05 Ankidroid version: 2.16.5
I exhibited the same symptoms as ByteCodeRoad's video, additionally looking under "...->All Permissions" and not finding Storage there either. Deleting app data as per Ezkielnet and then logging back in and syncing solved it.
when I hit Delete app data, the app opened.
Deleting app data as per Ezkielnet and then logging back in and syncing solved it.
@Ezkielnet @gregyski Thank you for sharing information about the unexpected discovery.
Just to be sure, after tapping the "Get started" in the initial screen, were you actually able to see the deck list screen? (And it was without being asked for any sort of permissions?)
(I don't have an Android 13 device so I can't try this way myself.)
when I hit Delete app data, the app opened.
Deleting app data as per Ezkielnet and then logging back in and syncing solved it.
@Ezkielnet @gregyski Thank you for sharing information about the unexpected discovery.
Just to be sure, after tapping the "Get started" in the initial screen, were you actually able to see the deck list screen? (And it was without being asked for any sort of permissions?)
(I don't have an Android 13 device so I can't try this way myself.)
Yes, I can use the application perfectly. I can't be sure if it asks for permissions afterwards because I enabled them manually.
Yes, I can use the application perfectly.
How nice. Thank you.
I can't be sure if it asks for permissions afterwards because I enabled them manually.
Which permission items did you manually enable? (Are those in the ByteCodeRoad's video?)
Which permission items did you manually enable? (Are those in the ByteCodeRoad's video?)
When I had the error I enabled all of them, but I just saw that none of them are active.
when I hit Delete app data, the app opened.
Deleting app data as per Ezkielnet and then logging back in and syncing solved it.
@Ezkielnet @gregyski Thank you for sharing information about the unexpected discovery.
Just to be sure, after tapping the "Get started" in the initial screen, were you actually able to see the deck list screen? (And it was without being asked for any sort of permissions?)
(I don't have an Android 13 device so I can't try this way myself.)
If I'm understanding the question properly, before the "fix" I'd launch the app and be taken directly to permissions without ever seeing any of the Ankidroid interface. After the "fix", for all practical purposes I was starting with a fresh installation so I had to log in and sync to get my decks back from Ankiweb. I did not, at that time, get asked for any further permissions. Note that I had, when trying to fix the issue originally, manually enabled the "Read and write to the Ankidroid database" permission so that was set as well, so while that had no impact on the original problem, I don't know if it impacted the "fix". Hope that helps.
Edit: I just checked my permissions and things again match Ezkielnet. I currently show "No permissions allowed" despite my not actually adjusting them since the "fix". The app is working normally.
So, after the "Delete app data", the prior manual permissions may be no impact or annulled, and the app works properly without requiring permissions... I think I have a better understanding of the situation. Thank you for the feedbacks.
Hi, @snowtimeglass will you be working on this? I would like to contribute.
No, I'm not. I welcome your contribution.
@srishti-R
If no one is assigned on a issue you can just comment that you are working on it and start working : )
Originally posted by @criticalAY in https://github.com/ankidroid/Anki-Android/issues/14502#issuecomment-1746660974
Strange that I am not facing any such issue in master branch.
I believe it's possible that it might be related to the Android feature that disables permissions when an app hasn't been used in a while. I know I'd been slacking and am pretty sure that feature activated on my Ankidroid install. And it might even related to some recent Android permission changes making it rather an edge case if it's a combination of the two.
I have no evidence of that, but I know when I was researching the problem to try to fix it I encountered mentions of both situations being potential causes, so I thought I'd mention it.
Please fix or help find a workaround that doesn't involve deleting data. My AnkiWeb account expired so I'm concerned with loosing all the data if I clear it
Please fix or help find a workaround that doesn't involve deleting data. My AnkiWeb account expired so I'm concerned with loosing all the data if I clear it
Either of these should work
I believe it's possible that it might be related to the Android feature that disables permissions when an app hasn't been used in a while. I know I'd been slacking and am pretty sure that feature activated on my Ankidroid install. And it might even related to some recent Android permission changes making it rather an edge case if it's a combination of the two.
I have no evidence of that, but I know when I was researching the problem to try to fix it I encountered mentions of both situations being potential causes, so I thought I'd mention it.
This would line up with what I am seeing. This happened to me just recently. I haven't used it in months. I am in the same boat as 7merlin where I do not have the decks on ankiweb anymore because of the months that I have spent away from the app. I would also like to be able to get this fixed without wiping my data.
queue-tip: I don't know how I am supposed to do your steps since I am getting this error and cannot get into the app.
Please fix or help find a workaround that doesn't involve deleting data. My AnkiWeb account expired so I'm concerned with loosing all the data if I clear it
I would also like to be able to get this fixed without wiping my data.
@7merlin @risshuu Long press the app icon > "App Info" > "Storage usage" > "Clear cache" doesn't work as another workaround?
No, it didn't help
You could try clearing the app's cache (not data) to see if that helps.
Before trying that, if you don't have any other copies of your data, you may be able to extract the data by using a file browsing app that lets you read the files stored inside AnkiDroid's folder. I'm not an Android user, so perhaps someone else here can suggest a good one.
I'm also experiencing this on a oneplus 8T. It's definitely related to permissions that are removed due to inactivity.
First tried permissions, but there's nothing more I can give.
Then tried uninstalling and installing while keeping and then removing my data.
Finally, I left the google beta tester group, and reinstalled and that fixed it.
Installing 2.16.5 not from Beta fixed it.
Full video of process: https://youtu.be/IQJwKJLohoE
dae, I've tried clearing cache, it didn't help.
Where does AnkiDroid store files? Is it somewhere on /sdcard that's accessible via ADB?
It should be accessible to ADB, but I think it's on the internal storage by default.
I've been away for a while, may need some more time to process before I dive into this one
Proposed resolution for advanced users:
❓❗️ Could an affected user try the following ADB commands:
adb shell pm grant com.ichi2.anki android.permission.WRITE_EXTERNAL_STORAGE
adb shell pm grant com.ichi2.anki android.permission.READ_EXTERNAL_STORAGE
An affected user would have:
If you're affected in another way and the command works, please let me know. If you feel you're affected but don't know how to use adb, please ask
I'm going to summarise my understanding of this issue, so we can work forward to fix/inform users of a path to resolve this.
Please correct me if I'm incorrect
Information for readers
/AnkiDroid
.
/AnkiDroid
is still accessible/AnkiDroid
is no longer accessibleMANAGE_EXTERNAL_STORAGE
MANAGE_EXTERNAL_STORAGE
allows us to regain access to /AnkiDroid
Red Herrings
Issue Prerequisites
/AnkiDroid
)?)Trigger
isExternalStorageLegacy
WRITE_EXTERNAL_STRORAGE
is removed AND the app is in 2.16Files Permission
is removed from the permissions screen once the app is updated to 2.16, so a user may not re-grant this
Outcome of the request at the top of the post
MANAGE_EXTERNAL_STORAGE
Android 13 Installed via playstore and not used in a while though i did grant the permission from the settings to no avail Version 2.16.5
I tried the adb commands and that fixed it for me @david-allison
@eumel2 Fantastic! This feedback is vital as I can't reproduce the issue
Could you list your AnkiDroid Directory in Settings - Advanced
?
Does anyone have a dummies' guide to running ADB? I've enabled usb debugging, connected to computer, installed ADB app from play store, and connected but the pc says a whole long screen of things like adb : The term 'adb' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:8 char:1
+ CategoryInfo : ObjectNotFound: (adb:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
and the app just shows that I am connected and I can see where I pasted the adb commands but hasn't done anything
There is no ADB app. ADB is a computer application which allows you to run commands on your Android via the command line/terminal
Get ADB working
Once this step is completed, running adb --version
on the command line should produce output
adb
works in the terminal/command lineandroid_sdk/platform-tools/
folder which you installed
adb devices
and see if your device is listedOnce adb devices
succeeds, you can run the command
The next stage in fixing this is determining when the bug takes place:
WRITE_EXTERNAL_STORAGE
cannot be set in 2.16WRITE_EXTERNAL_STORAGE
cannot be set in 2.16WRITE_EXTERNAL_STORAGE
can be set in 2.16WRITE_EXTERNAL_STRORAGE
if the app is inactive, with no means to reapply this permission via the Android UI/AnkiDroid
folderAn advanced user can fix this issue via ADB:
adb shell pm grant com.ichi2.anki android.permission.WRITE_EXTERNAL_STORAGE
adb shell pm grant com.ichi2.anki android.permission.READ_EXTERNAL_STORAGE
Download and use the full
version of AnkiDroid (cannot be distributed by Google Play) which requests MANAGE_EXTERNAL_STORAGE
and can access /AnkiDroid
https://github.com/ankidroid/Anki-Android/releases/latest
Reinstall AnkiDroid from the Play Store
/AnkiDroid
/Android/data/...
/AnkiDroid
folderThis is up for discussion
DIALOG_STORAGE_UNAVAILABLE_AFTER_UNINSTALL
The folder is: /storage/emulated/0/AnkiDroid Starting it just now i also got a message to migrate the storage somewhere which I postponed for now
@david-allison Thank you for putting the issue in perspective.
What do you think about the App info - Storage usage - Manage space - Delete app data
approach, which @Ezkielnet and @gregyski have reported. If I understand correctly, it won't delete the collection, and it will enable to open the app and access the /AnkiDroid
folder again, without uninstalling the Play Store app.
(Screenshot of Android 9, not 13)
@snowtimeglass I don't /think/ that would work:
I believe the issue is that Environment.isExternalStorageLegacy()
returns true BUT the user can't provide permissions to access the legacy storage. Therefore the new default directory would be unsafe unusable
Currently, a user would need to uninstall to remove legacy storage access,
DIALOG_STORAGE_UNAVAILABLE_AFTER_UNINSTALL
offers "Create a new collection" which is a less destructive version of 'Delete app data', and would fix the issue if it sets collectionPath
to the app-private directory
@david-allison
I don't /think/ that would work:
Therefore the new default directory would be unsafe
In this case, what do "not work" and "unsafe" mean specifically? You mean that the approach may make the legacy directory inaccessible?
I believe that clearing app data would mean that:
collectionPath
being the main impactcollectionPath
is set to the default, which I believe would be /AnkiDroid
(as Environment.isExternalStorageLegacy
is true
)What do[es] ... "unsafe" mean specifically?
I misspoke: I edited the comment to replace unsafe with unusable
@david-allison What do you think about the
App info - Storage usage - Manage space - Delete app data
approach, which @Ezkielnet and @gregyski have reported. If I understand correctly, it won't delete the collection, and it will enable to open the app and access the/AnkiDroid
folder again, without uninstalling the Play Store app.
If I remember correctly, Delete app data did delete my decks. But since I still had them on Ankiweb I was able to download them again.
Hi.. I hadn't used ankidroid so my Samsung Galaxy A21 removed its permissions, and I wanted to use it again today but when I open it it says "Grant storage permission", but I've granted all permissions and it still asks. I've tried u installing and reinstalling and it says the same thing. I don't seem to have a dedicated Storage Permission option in permission manager but it has permission for files and that's on... I don't know what else to change? Thank you