- Push an supported audio file into /sdcard.
- Mark this audio as ringtone in Music Player application.
There should be some way for Android system to install different ringtones into emulator like a real phone. After all, it's not a limiting issue like hardware.
Indeed. When I was analyzing the directory structure extracted from ROM, I saw audio files in /media are placed like this,
[josh@tp14]:/tmp/ROM/temp/media/audio > ll total 16 drwxr-x--- 2 josh staff 4096 Dec 22 12:15 alarms/ drwxr-x--- 2 josh staff 4096 Dec 22 12:15 notifications/ drwxr-x--- 2 josh staff 4096 Dec 22 12:15 ringtones/ drwxr-x--- 2 josh staff 4096 Dec 22 12:15 ui/ [josh@tp14]:/tmp/ROM/temp/media/audio >It's natural for me to think if I have my /sdcard directory to imitate this, can it work? Ok, let's try. I pushed several audio files into /sdcard/media/audio/notifications.
foreach f (*) adb push $f /sdcard/media/audio/notifications endAnd then have MediaScanner to scan /sdcard directory. Voila, it works.
The phone ringtones of course can be installed in the same way. :)