BiglyBT-Android
BiglyBT-Android copied to clipboard
Android TV - Folder Permissions Needed
Hi ! When I try to download a torrent that has a folder I get an error "Folder Permissions Needed". If I download another torrent without folder (just files) it works normally. BTW I did setup BiglyBT to use registered media storage which is available for writing. I can create folders using adb (connecting from home PC) and linux commands. Please help !
Details:
- Android TV (Core version 4.9.125)
- BiglyBT 1.3.4.3
Pics:
Update: After getting the red error message if I click on it it shows me a prompt asking for authorize. But when I click on authorize it shows me white rectangle, no buttons there. Pushing OK button (on remote control) does not help either.
Pics:
Actually what app is it trying to open/show after clicking on authorize ?
this is probably a duplicate of https://github.com/BiglySoftware/BiglyBT-Android/issues/248
in permission there is no setting to allow management of all files
for new android versions. that's why BiglyBT can't create folders.
As a workaround you can try to format hdd as "internal".
this is probably a duplicate of #248
in permission there is no setting to allow management of all files
for new android versions. that's why BiglyBT can't create folders.
As a workaround you can try to format hdd as "internal".
I have tried, this. If you try to format hdd as internal storage, the path doesn't show up any more in the options.
@QaisarRajput This is expected. This is how android does this. Your internal memory and external HDD will by "united" under same "path". Then you should move app's data to HDD in android settings for apps. Then if you choose app data folder (Android/data/com.biglybt.android.client/...) as storage folder - then app will always write to HDD. If you don't do that , then data will be still written first to internal flash. Or you can choose some other directory, like Download, in this case you do not need to move app to HDD, as I understand. You can eject HDD to verify that data was not written to internal flash memory, e.g. remember how much free space of flash memory you had before joining with HDD, download something, eject HDD in settings, check free space of flash memory.
good reading about internal (aka "Adoptable") storage: https://www.reddit.com/r/Android/comments/496sn3/lets_clear_up_the_confusion_regarding_storage_in/
Then if you choose app data folder (Android/data/...) as storage folder - then theoretically app will always write to hdd.
How to set save directory /storage/Disk/Movie instead internal app folder /storage/Disk/Android/data/com.biglybt.androud.client/files ?
App doesn't allow to choose another folder, not possible go up to hdd-root directory. Zidoo Z3000 Pro, Android 11, AML928x, 1.2.01_G
Please add MANAGE_EXTERNAL_STORAGE to manifest and ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION in code
@phoxerity
How to set save directory /storage/Disk/Movie instead internal app folder /storage/Disk/Android/data/com.biglybt.androud.client/files ?
have you tried to click that "arrow" in top left corner of your 2nd screenshot?
because on my device with certified android tv 11 i can choose any directory on my external hdd, like /storage/DISC_ID/Download/BiglyBT/.
~app has WRITE_EXTERNAL_STORAGE+READ_EXTERNAL_STORAGE which seems to be enough for writing to any directory on external hdd.~ https://github.com/BiglySoftware/BiglyBT-Android/blob/a55edc3d540d11386825e16aa2ae9d0269244da1/app/src/main/AndroidManifest.xml#L9 about MANAGE_EXTERNAL_STORAGE - see https://github.com/BiglySoftware/BiglyBT-Android/pull/211
but with such path i get "write permission denied" if i download torrent that has non-media files (like .txt file), ~because app lacks ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION or ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION.~ with /storage/Disk/Android/data/com.biglybt.androud.client/files it works ok, but in android 11 you can't access this directory :-D
so this is the huge blocker.
there are several similar issues about this, but for some reason devs do not participate in discussion.
have you tried to click that "arrow" in top left corner of your 2nd screenshot?
Nothing happen if click to arrow. Eventually if manually in remote client set root of disk as default directory then Bigly ask Grant permissions and after click Authorize message appeared 'No such app found'
@phoxerity
-
i missed that on your 1st screenshot it says "read only" for both your HDDs, while for me it does not say that. i choose /storage/SOME-ID and then i am able to navigate to needed folder (e.g. /storage/SOME-ID/Download/). but if i choose "biglybt private external storage" like you did - then i also can't navigate "up" via "arrow".
-
i also was wrong about MANAGE_EXTERNAL_STORAGE. it is needed to be able to download non-media files (like .txt or .srt) into "not app related" location. without MANAGE_EXTERNAL_STORAGE app can write non-media files into
Android/data/but with MANAGE_EXTERNAL_STORAGE i was able to download non-media files to arbitrary path. and i was wrong about ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION & ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION - those are just "intentions" used to open settings and does not really affect anything, it is just an usability thing.
@phoxerity
3. i managed to add MANAGE_EXTERNAL_STORAGE to apk by myself.
a. i downloaded apk from https://f-droid.org/ru/packages/com.biglybt.android.client/
b. APK Editor Studio from https://qwertycube.com/apk-editor-studio/
c. then open apk in editor and add needed permission:
note: after such edit you will have different apk signature, so it will not be possible to install it on top of original apk, so old app should be uninstalled first, which means that you will lose settings and torrents data, if data in Android/data/. so backup files first, if needed.
ideally, devs should build a separate APK with MANAGE_EXTERNAL_STORAGE and distribute it via github or via f-droid. like libretorrent bittorent client does https://gitlab.com/proninyaroslav/libretorrent/ (they also do not have MANAGE_EXTERNAL_STORAGE in google play so they provide alternative build)
So to summarize, at the moment users can:
- Modify .apk file to add MANAGE_EXTERNAL_STORAGE, see https://github.com/BiglySoftware/BiglyBT-Android/issues/250#issuecomment-2663788139
- Format HDD as internal and move BiglyBT's app data to HDD, see https://github.com/BiglySoftware/BiglyBT-Android/issues/250#issuecomment-2513965774
- Use HDD formatted as portable if your Android allows it: if you see that in BiglyBT's list of "storages" your
/storage/SOME-IDis NOT marked as "Read Only" then you should choose/storage/SOME-IDand then you will be able to navigate to needed folder (e.g./storage/SOME-ID/Download/). Do NOT choose "BiglyBT private external storage" - then you will not be able to navigate "up" via "arrow" button.
This happens to me if the files are already in the directory.
When I click the authorization button, a message appears saying that there is no suitable app.
If I delete the file from the download directory, the download will start successfully
I did what I described above in /storage/SOME-ID/Download/
open fails for '/storage/1086D38F7FC5F4DA/Download/linuxmint-22.2-cinnamon-64bit.iso', File not found: /storage/1086D38F7FC5F4DA/Download/linuxmint-22.2-cinnamon-64bit.iso: open failed: EACCES (Permission denied) (allocateFiles existing:/storage/1086D38F7FC5F4DA/Download/linuxmint-22.2-cinnamon-64bit.iso)
But if I download a torrent that has no files in the download folder, and then delete the torrent in the app without deleting the files, then when I add the torrent, the file verification will succeed.
If I stop a healthy torrent, move its files using fm to another location, and then move them back, and then start it again, the check and start will be successful. The file system on my hard drive is in ntfs format.
Basically, I want to check and download files that I haven't fully downloaded yet, but I can only start downloading by deleting the existing files. Please fix this.