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
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
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+=""${exportName}" "
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