1

After i scp an audio file to my android devices alarms/notifications/ringtones sdcard folders, the file itself is named correctly, but the settings menu for selecting alarms/notifications/ringtones may or may not show a completely different name. I have used 'sdcard refresh' tested, and then rebooted to check again every time I have copied the files.

I do not see any metadata that might contain a name.

I have converted mp3 files to ogg with ffmpeg specifically to discard any hidden metadata, yet it still happens.

caveat: I have renamed these files on the source machine, ie: PRIOR to copying them to the target device, so that I can more easily find them among the endless list of useless stock-android sounds. But somehow android is ignoring this in some cases, and not in others.

Do I need a specific tool to force the name-metadata that I want? Do I need to clear some android database that may be clinging to the original filename and not accepting the new, despite deleting them on the device, rebooting, copying them again, and rebooting before checking again.

Android version: 9

at left:files on pc, with original names - at right: filenames after being renamed, then converted to .ogg on source machine, then scp'd to the target device

image above:

  • at left:files on pc, with original names
  • at right: filenames after being renamed on source machine (PC) and scp'd to the target device

delete all files on device sdcard 'Alarms' folder, power down, power up, scp renamed files to target device, power down, power up, check sound settings for Alarms - vis: this image

image above:

  • delete all files on device sdcard 'Alarms' folder
  • power down, power up (previously i had been rebooting, but thought i should try actually powering down for a moment and then back on again - no difference)
  • scp renamed files to target device
  • power down, power up
  • check sound settings for Alarms

For coompleteness, or general interest: the script that converts non-ogg to ogg and copied them to the scp target:

scp-hostPath-fileList.sh

#!/bin/bash

hostpath="$1" #phoneXI:/storage/emulated/0/Ringtones/ shift for input in "$@"; do [[ ! -f "$input" ]] && continue exportName="${input%.}.ogg" [[ "$input" != "$exportName" ]] && ffmpeg-bar -i "$input" -c:a libvorbis -y "$exportName" </dev/null string+="&quot;${exportName}&quot; " msg+="${exportName##/}\n" done cmd="scp $string $hostpath"

echo "cmd: $cmd"

error=$(eval $cmd) [[ $? -ne 0 ]] && kdialog --title "ERROR" --passivepopup "$error" 5 || kdialog --title "OK: $hostpath" --passivepopup "$msg" 5

exit

tests

/home/user/documents/scripts/net/scp-hostPath-fileList.sh
phoneXI:/storage/emulated/0/Alarms/
/home/user/music/audio/_all-alarms-notifications-ringtones/KoganAgoraXI/Alarms/BETLOG-9000.mp3 /home/user/music/audio/_all-alarms-notifications-ringtones/KoganAgoraXI/Alarms/BETLOG-cavalryCall.mp3 /home/user/music/audio/_all-alarms-notifications-ringtones/KoganAgoraXI/Alarms/BETLOG-marioMessage.mp3 /home/user/music/audio/_all-alarms-notifications-ringtones/KoganAgoraXI/Alarms/BETLOG-marioPowerup.mp3

/home/user/documents/scripts/net/scp-hostPath-fileList.sh
phoneXI:/storage/emulated/0/Notifications/
/home/user/music/audio/_all-alarms-notifications-ringtones/KoganAgoraXI/Notifications/BETLOG-carlock.mp3 /home/user/music/audio/_all-alarms-notifications-ringtones/KoganAgoraXI/Notifications/BETLOG-drip.oga /home/user/music/audio/_all-alarms-notifications-ringtones/KoganAgoraXI/Notifications/BETLOG-wz2100-beacon.ogg

/home/user/documents/scripts/net/scp-hostPath-fileList.sh
phoneXI:/storage/emulated/0/Ringtones/
/home/user/music/audio/_all-alarms-notifications-ringtones/KoganAgoraXI/Ringtones/BETLOG-bellphone.ogg
/home/user/music/audio/_all-alarms-notifications-ringtones/KoganAgoraXI/Ringtones/BETLOG-oldphone.mp3
/home/user/music/audio/_all-alarms-notifications-ringtones/KoganAgoraXI/Ringtones/BETLOG-telegraph.mp3

BETLOG
  • 11
  • 2
  • Can you show us an example of the file name and how it appears in the list? – gronostaj Jan 08 '21 at 14:35
  • What is your Android version? In the end the media info always comes from the central database. Therefore this answer should also apply here. By renaming the files in file-system you have confused this database. Newer Android versions (9+) do usually detect such file operations automatically, but older systems require a reboot or a manually started media scan. – Robert Jan 08 '21 at 15:11
  • Original text edited - please refer. Also; i am aware of the database issue, i have been using 'sdcard refresh' and also rebooting between any change. Initially i copied some files with their original filenames, often those are fugly or not easy to find in the stock-android list, so i rename them locally, copy them to the device with scp(ssh), use sdcard refresh on the new files specifically, reboot. Some files are successfully renamed, others are not. I have tried deleting all, rebooting, copying, rebooting, which still fails. It's very unusual. – BETLOG Jan 09 '21 at 00:50

0 Answers0