1

To clear up some disk space I moved my mp3 collection from internal to external storage. My device is rooted and I was su at the time.

The files can be seen (and played) from the File Manager, but none of my music players see them.

What looked interesting was the file permissions after moving. Here's a file still on internal storage that wasn't moved.

root@kltetmo:/data/media/0/Download/mp3 # ll
-rw-rw-r--    1 1023     1023       6730901 Aug 25 16:03 fatamix_upd_start_20160824(2).mp3
root@kltetmo:/data/media/0/Download/mp3 # 

enter image description here

And here are a couple files that were moved to external storage:

root@kltetmo:/storage/sdcard1/Music/Bat for Lashes/Fur and Gold # ll                                   
-rwxrwx---    1 root     1028       5887321 Jul 16  2015 01 - Horse And I.mp3
-rwxrwx---    1 root     1028       5894753 Jul 16  2015 04 - What's A Girl To Do_.mp3

enter image description here

Moving them to external storage appears to have changed permissions. Unfortunately, chmod is not affecting the actual file permissions:

root@kltetmo:/storage/sdcard1/Music/Bat for Lashes/Fur and Gold # ll
-rwxrwx---    1 root     1028       5887321 Jul 16  2015 01 - Horse And I.mp3
-rwxrwx---    1 root     1028       5894753 Jul 16  2015 04 - What's A Girl To Do_.mp3
root@kltetmo:/storage/sdcard1/Music/Bat for Lashes/Fur and Gold # chmod 664 01\ -\ Horse\ And\ I.mp3   
root@kltetmo:/storage/sdcard1/Music/Bat for Lashes/Fur and Gold # ll                                   
-rwxrwx---    1 root     1028       5887321 Jul 16  2015 01 - Horse And I.mp3
-rwxrwx---    1 root     1028       5894753 Jul 16  2015 04 - What's A Girl To Do_.mp3

I tried moving the file back to internal storage to change permissions there. This worked until I moved the file back to external storage.. moving it definitely changed permissions to 770.

root@kltetmo:/data/media/0/Music # ll
-rwxrwx---    1 root     1028       5887321 Nov 14 18:18 batforlashes.mp3
root@kltetmo:/data/media/0/Music # chmod 644 batforlashes.mp3                                          
root@kltetmo:/data/media/0/Music # ll
-rw-r--r--    1 root     1028       5887321 Nov 14 18:18 batforlashes.mp3
root@kltetmo:/data/media/0/Music # mv batforlashes.mp3 /storage/sd                                     
sdcard0/ sdcard1/ 
forlashes.mp3 /storage/sdcard1/Music/Bat\ for\ Lashes/Fur\ and\ Gold/                                 <
root@kltetmo:/data/media/0/Music # ll
root@kltetmo:/data/media/0/Music # ll /storage/sdcard1/Music/Bat\ for\ Lashes/Fur\ and\ Gold/          
-rwxrwx---    1 root     1028       5887321 Jul 16  2015 01 - Horse And I.mp3
-rwxrwx---    1 root     1028       5894753 Jul 16  2015 04 - What's A Girl To Do_.mp3
-rwxrwx---    1 root     1028       5887321 Nov 14 18:18 batforlashes.mp3
root@kltetmo:/data/media/0/Music # 

What do I need to do to reset permissions so these files can be seen and played from my default music app?

  • 1
    IIRC, external storage uses fuse to shadow the FAT file system. FAT does not support Unix permissions and thus chmod won't do anything. – GiantTree Nov 14 '16 at 18:35
  • Thanks, so what do I need to do to allow these files to be seen by my music players? Someone suggested JoeApollo, thinking it would read the ext storage. I installed, rebooted and no dice. – a coder Nov 14 '16 at 18:37
  • This depends on how the MediaScanner is implemented. Usually, only the internal storage will be scanned. VLC, PowerAMP and other third-party players can be configured to scan external storage, though. – GiantTree Nov 14 '16 at 18:39
  • Still no dice. I moved all the files back to internal storage in hopes I could at least get back to where I was. Google's File Manager can't see any of the files or folders, and another File Manager at least shows the top level folder names, but none of the subfolders or files. If I open Terminal with su, I can see the files and they are not zero byte. They just have different ownership and permissions. – a coder Nov 14 '16 at 19:17
  • There is no single username on Android, each app has its own username and group to enforce simple (app) private file permissions and sharing files using special manifest entries. The files are owned by root and the group everybody on my device (permissions are 0660 -rw-rw---- for files and 0770 -rwxrwx--- for directories). – GiantTree Nov 14 '16 at 19:28
-2

This application fixed the issue i had like you.

  • Don't mind the "Kit Kat" part, works on lollipop aswell. – Cooderz Nov 14 '16 at 19:24
  • 1
    I'm using cyanogenmod. This app is likely only useful if you have a stock ROM. If you're running an aftermarket ROM like Cyanogenmod, then there is no reason to install this app (good aftermarket ROMs don't suffer from the problem that this app corrects). – a coder Nov 14 '16 at 19:26
  • Apart from the fact it has no effect on CM (as the problem that app fixes doesn't exist there), it would help if you could add a few more details on what that app is and what it does. Currently, your post is just a comment; with some more details it could be a useful answer for people running a stock KK ROM. So could you please edit and improve your post? – Izzy Nov 15 '16 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.