Android Can't delete files from Kodi
#1
Hello,
I have an FTV 1 with the latest OS 5 and latest Kodi.
For some reason, I cannot delete files from any connected usb device.
Any easy solution?
Reply
#2
There is a Kodi setting in Settings->Media settings->General->'Allow file renaming and deletion'. I think you have to change to 'Advanced' or 'Expert' settings for it to appear though.
Reply
#3
This is already on.
It is not the problem...
Reply
#4
Then I would suggest turning on debug, try to delete a file, then check the kodi log for errors.
Reply
#5
android is strict about file permissions. reading files is easy. deleting won't work unless they are in a special kodi folder. details should be somewhere on the forum i cant remember the details.
Reply
#6
(2017-03-19, 22:40)LRa Wrote: This is already on.
It is not the problem...
if you are on MM, then the problem is KODI (by design) and there's nothing you can do about it. Use some other file manager that will ask for permission.
Reply
#7
(2017-03-20, 12:50)Pantsenu Wrote: android is strict about file permissions. reading files is easy. deleting won't work unless they are in a special kodi folder. details should be somewhere on the forum i cant remember the details.

I just found this:
http://forum.kodi.tv/showthread.php?tid=265372

"Use adbFire:

1. Connect to your device
2. Press ADB Shell

At the prompt "shell@sloane:/$" enter
mkdir -p /storage/usbdisk/Android/data/org.xbmc.kodi

Then change the paths for download to /storage/usbdisk/Android/data/org.xbmc.kodi/files."


But what does change the paths for download means? Where is this?
Reply
#8
(2017-03-20, 13:08)kinggo Wrote: if you are on MM, then the problem is KODI (by design) and there's nothing you can do about it. Use some other file manager that will ask for permission.

Nothing to do with Kodi, by design or otherwise, this is strictly an Android permissions issue.

(2017-03-21, 07:12)LRa Wrote: Then change the paths for download to /storage/usbdisk/Android/data/org.xbmc.kodi/files."

But what does change the paths for download means? Where is this?

On Android, at least since Android 6.x, apps only have permission to write to their own folder unless they ask for permission to write to other folders or to the root of external drives. In Kodis case, it does not ask for permission therefore the only folder that it can write too is /your_drive/Android/data/org.xbmc.kodi/ you can skip the files folder, or create another folder in org.xbmc.kodi.

This path is on your external storage. Once you attach the storage Android create the path /Android/data/ then after, and only after you launch an app after attaching the storage, the apps folder gets created.
Forum Rules (wiki) | Banned add-ons (wiki) | Wiki (wiki) | Quick start guide (wiki)
Reply
#9
(2017-03-21, 07:42)Tinwarble Wrote: This path is on your external storage. Once you attach the storage Android create the path /Android/data/ then after, and only after you launch an app after attaching the storage, the apps folder gets created.

So I create the path (/storage/usbdisk/Android/data/org.xbmc.kodi) via ADB with the usb drive attached, then I just launch Kodi?
Reply
#10
No, it should get created automatically, as I described in the previous post.
Forum Rules (wiki) | Banned add-ons (wiki) | Wiki (wiki) | Quick start guide (wiki)
Reply
#11
(2017-03-21, 07:42)Tinwarble Wrote: Nothing to do with Kodi, by design or otherwise, this is strictly an Android permissions issue.


On Android, at least since Android 6.x, apps only have permission to write to their own folder unless they ask for permission to write to other folders or to the root of external drives. In Kodis case, it does not ask for permission therefore the only folder that it can write too is /your_drive/Android/data/org.xbmc.kodi/ you can skip the [b]files folder, or create another folder in org.xbmc.kodi.
But it could ask. Just like other apps do. So how is this not by design? I'm not questioning the team reasons behind this but it's not strictly android thing (agree on the fact that their constant perrmission changes and external storage treatment is a mess) since there's an option to ask for and set the permission.
Reply
#12
Because it requires going out of Kodi to acquire permission, so it is strictly an Android thing. This is why it's not being developed.

Though it is different with Android 7.x, so I can't say if it will ever be possible. But that doesn't help with Android 6.x.
Forum Rules (wiki) | Banned add-ons (wiki) | Wiki (wiki) | Quick start guide (wiki)
Reply
#13
Once. Never bothered me with any other app. While the benefitis are always there later on.
Reply
#14
So I found myself on this ancient thread because I'm experiencing the same problem, years later in 2023.

¡Continue reading for the fix!

I have an external drive plugged into my router which adds it on my network as either a uPNP device or a Windows SMB device.

On my Nvidia Shield Pro in Kodi 20.2 with my external drive added as uPNP I can delete files within Kodi NO PROBLEM

On my regular Nvidia Shield I CANNOT delete files on my external drive added as uPNP within Kodi 20.2 (external apps to Kodi work fine). (Yes, the 'allow deletion of files' checkbox is checked) However 'delete' simply doesn't come up on the sub-menu like it does on the other Shield Pro.

The fix?

I added the external drive within Kodi as SMB!!! Not uPNP and now low and behold I can once again delete files no problem.

Why in the hell I can do it via uPNP on the Pro and not the regular is beyond me, but it could be Android version thing I'm not sure, but it's an easy workaround.

I only wanted to share this for anyone finding this thread in future with the same problem! Stream on!
Reply

Logout Mark Read Team Forum Stats Members Help
Can't delete files from Kodi0