This isn’t really a “hack” but it’s one of the little things in life that make it so much happier. It took me forever to figure out how to do this on my Galaxy s8. It was easy and intuitive on my Droid X years ago and I didn’t even need to search for instructions.
This doesn’t involve any code but I’m sure you’ll be glad you found the post.
Get the desired song on your phone
You can just drag files from your computer into your phone.
Mac OS X
Windows 10
Use an Audio Player
You may be able to download them using an audio player like Amazon Music.
Open the desired contact
Find your Contacts in your phone.
Tap Contacts to open it.
My wife hates me posting pix of her online, so I just found a pic of some random girl who looks just like her to respect her privacy.
In Edit mode (above), scroll down until you see View More (below).
Almost at the very bottom (see below), tap Ringtone.
This opens a list of available ringtones and indicates the current ringtone (again, “Default ringtone” in this case).
Note: The instructions I found that were closest to reality still had a couple things that didn’t match my device. Those instructions said, instead of plus sign, I should tap “Allow Storage permission > ALLOW” — all that to say your experience may vary.
In my experience, this opens a list of every music file on my phone regardless of it’s origin or location.
This opens a list of their albums or tracks.
If memory serves, you’ll return to your list of ringtones with your newly chosen ringtone selected.
Tap the Back button and return to the Contact‘s Details where you’ll also see your newly chosen Ringtone displayed.
Click Save in the bottom right (above), maybe scroll up if needed, and see that Contact‘s ringtone listed on their main Details page.