Hello I need help with SD card permissions [#19887]

Report bugs & feature requests for MediaMonkey for Android and learn about the newest beta build.

Moderator: Gurus

KthugS
Posts: 29
Joined: Thu Jan 12, 2023 7:07 pm

Hello I need help with SD card permissions [#19887]

Post by KthugS »

This is a screenshot when the MMA library folder is applied correctly.
Image

But it changes like the screenshot below.
ImageImageImageImage
ImageImage
In this state, files cannot be deleted, and permissions cannot be granted to other folders as well as to the root of the sd card.

After 1073 update
The previous version also worked correctly for some time after initial setup, so I decided to keep an eye on it.
Then I tried deleting the file again and canceled it before the deletion was complete.
At this point, the same problem as before occurred again.

So I reset everything again and
After running the app for the first time, I decided to report all the setting process.

"E:\My Music"
"F:\My Music"
-This is my PC library path

"\<Folder>\<Filename>"
-MMW5 synchronization path setting.

Therefore, files are saved in "SD Card/My Music/" when synchronizing.

Image
I gave permission to these two folders and moved on to the next step.

ImageImage
Unable to grant permission to SD card root
Could not grant permission to My Music folder as well

Image
I couldn't do anything here, so I touched skip and moved on to the next step.

ImageImage
Image
Here, delete "SD card (all)" by clicking the trash can icon
Added "My Music" folder.
And after some time it goes back to "SD card (all)" status.

Synchronization in "SD card (all)" state works.
As set above, to the "My Music" folder.

However, tracks cannot be deleted in MMA in "SD card (all)" state.
It asks to grant permission to the "My Music" folder.
To grant permission, I need to remove "SD card (all)" first and add "My Music" folder to library
This will take a lot of time.
And eventually after some time it will revert back to "SD card (all)" status.

To delete files from "SD card (all)" status
1. Synchronization setting so that files deleted from the server are also deleted from the device.
2. Manually delete the files using another file explorer and rescan the MMA library.
These are the two.
I've been using 1 so far

However, a new problem has just been discovered.
Sync attempts to delete all files on the device.
All files, not files deleted from the PC, are the targets.
And I can't get out of "SD card (all)" status.
Image

Could it be that the folder name is "My Music" rather than "Music" contributing to this problem?

The "MediaMonkey" folder in the internal storage was granted permission at the beginning of app execution, but the "Music" and "Movie" folders were not granted permission.
But it exists in the library list.

Also, the "MediaMonkey" folder exists on the sd card, and the timestamp of the "storageinfo.xml" file is being changed.
And I also gave the folder permission at the beginning of the app execution.
However, it has not been added to the MMA library.
There was only one "SD card (all)"

Am I too old-fashioned?
MTP was tolerable because it could be replaced with Wi-Fi, but the SD card permission problem really hurts my head.
Why does Google make me an insignificant being who doesn't even allow me to manage files on my device?
Peke
Posts: 17446
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Hello I need help with SD card permissions.

Post by Peke »

Hi,
Can you try this:
1. make sure device is unplugged
2. start MM5
3. go to Device and Services
4. find device SD card profile -> Delete it
5. Make sure MMA is closed on Device (clean reboot usually do that)
6. Delete /Mediamonkey/ folder from SDcard and also delete "/Android/data/com.ventismedia.android.mediamonkey/" from SDcard
8. Make sure Music folder exist on SDcard
7. Start MMA and it should ask you for access
8. After that you should be able to sync normally, but you need to set sync profile again on PC
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
KthugS
Posts: 29
Joined: Thu Jan 12, 2023 7:07 pm

Re: Hello I need help with SD card permissions.

Post by KthugS »

did all the work
I confirmed that "ventismedia.android.mediamonkey" was definitely deleted using a file explorer that could access "/Android/data/", and I also checked several other things.

Synchronization started.
MediaMonkey is downloading files that already exist on the SD card.
And the duplicate files like "(filename)_1.ext" that I reported before were recreated.

Image
As shown in this screen, when MMA is initially executed
Adding random library folders fails.
The internal storage has several folders for each, but
In this state, the SD card cannot designate an arbitrary folder.
rusty
Posts: 8393
Joined: Tue Apr 29, 2003 3:39 am
Location: Montreal, Canada

Re: Hello I need help with SD card permissions.

Post by rusty »

fyi, we're able to replicate and are tracking the issue at https://www.ventismedia.com/mantis/view.php?id=19887

As a workaround, if you follow Peke's steps and _use the default sync mask_ (/Music instead of /My Music) doesn't it work correctly?

-Rusty
KthugS
Posts: 29
Joined: Thu Jan 12, 2023 7:07 pm

Re: Hello I need help with SD card permissions.

Post by KthugS »

Everything is the same as before except for changing the name of the My Music folder on the sd card to Music.
ImageImage
SD card folders are listed and "GRANT" button works
Below is a screenshot from a few days ago.
ImageImage
it's really weird
The music and movie folders even existed on the sd card before.
But it wasn't on the list and I couldn't add any other folders either.

Library scan is taking a really long time.
I'll test the rest later.
rusty
Posts: 8393
Joined: Tue Apr 29, 2003 3:39 am
Location: Montreal, Canada

Re: Hello I need help with SD card permissions.

Post by rusty »

OK let me know...

Based on my testing, it's the '/My Music' (non-default root folder) that's causing the problem. I expect that if you revert to the default sync settings, it'll work for you.

-Rusty
KthugS
Posts: 29
Joined: Thu Jan 12, 2023 7:07 pm

Re: Hello I need help with SD card permissions.

Post by KthugS »

ImageImage
After the library scan was complete, another library scan was started. This one took relatively little time.


ImageImage
After this I started syncing and 1000 files were downloaded.

In most cases, files that already existed on the sd card were re-downloaded and duplicate files were created.
"MediaMonkey Storage/Video" is listed.
But "MediaMonkey Storage/Video" wasn't manually added by me.


ImageImage
Then I started synchronizing again and 3000 files were downloaded.
Likewise, these are all created as duplicate files.

ImageImage
There are about 4000 duplicates.

ImageImage
Some songs ignore the original file and only show duplicate files in MediaMonkey.

ImageImage
Some songs without duplicate files are displayed like this in MediaMonkey.

The total number of tracks in the MediaMonkey library is displayed as "31013".
And actually there are "32676" tracks on the sd card including duplicate files.
The target number of tracks that should exist on the sd card is "28613".
There were 14 tracks that should have been downloaded in this sync.
28599 + 14 = 28613
But about 4,000 songs have increased.

So far, the "SD card (all)" item has not been created.
Deleting files in mma works fine without permission issues.
This is satisfactory.

However, it is more troublesome to face the problem of creating duplicate files that I thought was solved.

Synchronization worked fine until just a few days ago.
I should have just stayed that way :D
KthugS
Posts: 29
Joined: Thu Jan 12, 2023 7:07 pm

Re: Hello I need help with SD card permissions.

Post by KthugS »

When synchronization was attempted again, a copy of the copy was created
(filename)_2.ext

And I thought the copy creation problem was solved in the last mma build, but I think I was wrong.
I was repeating the process below.
I completely deleted mm5 and reinstalled it.
MMA also deleted all related folders and reinstalled it in its initial state.
I also deleted all the duplicate files on the sd card.
And I set mmw and mma and started Wi-Fi sync.
Once the copy was created, the above process was repeated.
I'll keep repeating the process this time and let you know the results.

And since changing the library folder from "\My Music" to "\Music"
On initial run I was able to give permissions to the folder and it didn't change to "SD card(all)".
I tried syncing 3 times, canceled 1 time in the middle, and restarted mma and the device several times, but "SD card(all)" did not appear in the library folder list.
I also didn't find any issues like asking for permissions when trying to delete a file.

And I have a few questions
Why does library scan take so long after mma initial run?
It takes so long that it feels similar to the time it takes to download those files to an SD card via Wi-Fi sync.
And I don't remember exactly, but I've seen album art thumbnails in "/Android/data/com.ventismedia.android.mediamonkey/" or other paths.
The capacity of that folder is hundreds of megabytes, almost 1 gigabyte. Is this a normal situation?
Sync Album Art, Extract, Save to Folder These options were not used.
KthugS
Posts: 29
Joined: Thu Jan 12, 2023 7:07 pm

Re: Hello I need help with SD card permissions.

Post by KthugS »

  • "SD card(all)"
    After changing the library folder to "Music" instead of "My Music", the "SD card(all)" problem did not occur.
    In addition, there was no permission problem that could not delete the file.
    Until now.
  • "Duplicate files created"
    My personal opinion is that there seems to be an unknown problem in the process of scanning the library and creating the db file.
    There are a few things I noticed when scanning the library.

    1. I couldn't add a folder like "My Music" during the setting process after running mma for the first time.
    So I skipped that screen and entered the main screen without adding any folders.
    Even though I didn't add any library folder, the library scan was in progress and started adding music to mma.
    Could it be because it was in the "SD card(all)" state?

    2. After deciding to use the "Music" folder, I was able to add a library folder on the mma first run screen, and likewise, the library scan started immediately upon entering the main screen.
    However, in the scan progress bar, the name of the playlist file that exists in a folder that has not been added to the library is observed.
    Image
    It is a file in the internal storage and is located in a folder that has not been added to the mma library.
    It wasn't something like "internal storage(all)".

    - Will mma scan folders I haven't added to the library?
    The playlist is not subject to MediaMonkey synchronization and this file was created by another media player.

    3. "Scanning the library is incredibly slow"
    I think the scanning time may vary depending on the number of tracks, but compared to other media players, scanning takes a really long time.
    Of course, since MediaMonkey is not a tool for playback only, I think the scanning method will be different, but this time it took too much time, it took more than 24 hours.
    About 20 hours of scans were performed showing progress bars and track titles.
    After the first scanning is complete, scanning begins with the full path displayed as shown in the screenshot below.
    This scanning also took several hours.
    Image

    And another scan took a relatively short time.
    Image
    Image
    The scans in the last two screenshots were repeated several times.
    After scanning for such a long time,
    When I check the total number of tracks in mma, the number is not correct.
    And in this state, synchronization was attempted.
    Duplicate files are created.

    -Currently, after resetting again, files such as playlists that are not related to MediaMonkey are removed and scanning is being performed again.
    It may be because of my mood, but I think the scanning has become faster.
    I'll be back to report the results.
KthugS
Posts: 29
Joined: Thu Jan 12, 2023 7:07 pm

Re: Hello I need help with SD card permissions.

Post by KthugS »

1. I deleted the playlist file located in a path not related to MediaMonkey and started everything over again.
  • Of course, I also deleted the "/Mediamonkey/", "/Android/data/com.ventismedia.android.mediamonkey/" folders on the internal storage and sd card.
  • It wasn't a big difference, but the scanning speed was improved.
When the first scanning was completed, I checked the number of tracks added to mma, and I saw 70000 files like this.
ImageImage
There are 28513 files that actually exist.

Anyway, after the first scan, several scans and scan completion were repeated.
I restarted mma and device several times until scanning no longer started.
I did a lot of rescanning, including manual scanning.
However, the number of tracks has not changed from 28461 anymore.
ImageImage
ImageImage
Copy creation during the sync process seems to be related to this.

2. I decided to delete all the media files on the sd card and download them again via Wi-Fi sync to get out of this Möbius strip situation.
  • Deleted all tracks through mma's menu.
    All tracks were deleted and no tracks were displayed on the mma screen.
    And I searched for the tracks that were not included in the mma library with a file explorer and deleted them.
    The folder was left untouched.
And when I go back to the mma screen
The "music" folder stayed there but mma started rejecting it again.
If "SD card(all)" exists, other folders cannot be added, and even if I remove "SD card(all)" and add another folder, it returns to "SD card(all)" again.
ImageImage
Image
  • I started wifi sync and downloaded 730GB.
  • 28513 tracks are displayed correctly in the mma library.
  • It's not a very fast wi-fi network, but it was done remarkably faster than mma initial scanning.
Now, since it is in the "SD card (all)" state again, actions such as file deletion in the mma menu are denied permission.
But now sync works perfectly fine because the device library database is created correctly.
So using a sync option like "unselected sever files" allows you to delete files without permission issues.

3. and in addition, I created a folder called [playlists] in the internal storage and put 38 playlist files in it.
  • I didn't add it to the library list, but mma seems to be scanning it.
  • mma scanned it but didn't add it to the library.
ImageImage
It seems that these things affect the slow scanning.
Or is it possible that other media players are affecting mma's slow scanning?

For now, I am satisfied and happy that the sync is working properly.
I'm talking in broken English, but I hope there's a little bit of help in solving the problem.
thank you
Peke
Posts: 17446
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Hello I need help with SD card permissions.

Post by Peke »

Hi,
Problem is that on newer Android systems you can't grant full storage permissions, but only to subfolders.

We are working on few solutions in 1074+ depends on which will work best.

Current solution is to Clear MMA and MMA PRO data and cache from APP INFO, then use Device file explorer to delete MediaMonkey folders (Internal and SDCard and then create Music, Playlists, folders on SDCard and then start MMA that will then ask you to grant acces sonly to those folders not whole SDCard.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
KthugS
Posts: 29
Joined: Thu Jan 12, 2023 7:07 pm

Re: Hello I need help with SD card permissions.

Post by KthugS »

thank you
This is a review after updating to 1074 to perform the proposed solution.

ImageImage
- grant access to all folders required by mma

ImageImage
- Scanning started right after entering the main screen.

Image
- The first scan was completed, followed soon after by the second and third scans.
- I don't know if there are any intended fixes in this build, but the scanning speed has improved considerably.
The total scanning time took over 20 hours on the previous build, but about 7 hours on the 1074.

ImageImage
- Scanning is complete and I am facing the chronic problem again.
- Library track count is incorrect.

ImageImage
- The location category temporarily displays the correct number of tracks, but only temporarily.

I don't know if it's related, but the size of the "mmstore.db" file is different in different situations.

1. When the number of tracks is not correct even after resetting and scanning several times in the previous version, and duplicate files are created when sync is attempted.
  • The file size was about 69mb.
2. After deleting all the tracks from the sd card and resetting the mma, after downloading all the tracks again with Wi-Fi sync, the number of tracks was displayed correctly and the sync worked correctly afterwards.
  • At this time, the size of the file was about 291mb.
3. And after updating to 1074
After resetting mma and completing scanning, the number of tracks is incorrect.
Also, duplicate files are created when syncing via Wi-Fi.
  • The file size at this time is about 51mb.
4. After resetting the mma, I connected the power plug to the device and left the mma scanning screen on and did not touch anything until all scanning was completed. (Except screenshots)
  • The file size at this time was about 31mb.
SD card permission request issue has not appeared yet.
The reason I'm not sure it's fixed is because I haven't been using mma long enough because of the above issues.

thank you
KthugS
Posts: 29
Joined: Thu Jan 12, 2023 7:07 pm

Re: Hello I need help with SD card permissions.

Post by KthugS »

After deleting all media files and mma data and returning mma to its initial state, all files were downloaded through Wi-Fi sync.
  • At this time, the file size of "mmstore.db" was about 290 MB.
And after a few hours, I ran mma, and it was not accurate because it was a very brief screen, but probably "Compressing Database" was displayed on the screen.
  • At this time, the size of the file has been compressed to about 37 MB.
Now, when I try Wi-Fi sync, it syncs correctly without creating duplicate files.

In the past, when I tested thousands of tracks on internal storage and SD card, there was no problem.
Is the problem caused by the large number of FLAC and MP3 files and folders?
2492 folders, 28513 media files, total size is 740 GB.
FLAC (94.5%); MP3 (5.5%); Vorbis (0.0%)

The current conclusion is that library databases created by scanning after resetting mma cannot be trusted.
The number of tracks is not displayed correctly in the library, and duplicate files are created when syncing.
Along with mma reset, the correct library database is created only when all media files in the sd card are deleted and all files are newly downloaded through Wi-Fi sync.

This is the crux of the problem, and I might have mistaken other problems caused by it for permissions issues or something.

thank you
rusty
Posts: 8393
Joined: Tue Apr 29, 2003 3:39 am
Location: Montreal, Canada

Re: Hello I need help with SD card permissions.

Post by rusty »

Thanks for all the info! We've hopefully fixed most of the issues you've experienced (we'll update the forum once it's released).

Details at: https://www.ventismedia.com/mantis/view.php?id=19887

-Rusty
rusty
Posts: 8393
Joined: Tue Apr 29, 2003 3:39 am
Location: Montreal, Canada

Re: Hello I need help with SD card permissions [#19887]

Post by rusty »

Beta build 1076 has been released! Does it solve the issue for you?

Thanks!

-Rusty
Post Reply