Sunday, September 4, 2016

Android emulator add ringtone and notification sounds

The default android emulator do not come with any sounds, like ringtones or notification sounds. You can check this by going to the settings --> Sound option and see whats set for ringtone or notifications. By default, this will be set as None.

To add sounds locate mp3 file(s) you want to use and put it into a folder, for example create a  folder sounds and copy the file(s) there. you can download some from www.freesound.org if needed

Run the AVD (Android Virtual Device) manager and click edit on the AVD name you want to use. Make sure SD card option is selected and a size is provided.  About 100MB will be more than enough. Click OK to and close.

Now fire up the emulator ( by clicking start in AVD manager) and once its running, come to the command prompt. Assuming you have android tools in your path (ex: "C:\Program Files (x86)\Android\android-sdk\platform-tools\") , issue below command
adb devices

If all is well, it should show the emulator device details we are connecting to.
for example

C:\>"C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" devices
List of devices attached
emulator-5554   device

Make a note of the below folders

SD-Card
/mnt/sdcard/alarms
/mnt/sdcard/notifications
/mnt/sdcard/ringtones

Form commands like below to copy the mp3 files to your emulator where sounds is the folder where you have stored your local copy of mp3 files to be copied

C:\Users\myname\Downloads>adb push sounds /mnt/sdcard/ringtones
push: sounds/ding.mp3 -> /mnt/sdcard/ringtones/ding.mp3
1 file pushed. 0 files skipped.
584 KB/s (24912 bytes in 0.041s)

C:\Users\myname\Downloads>adb push sounds /mnt/sdcard/notifications
push: sounds/ding.mp3 -> /mnt/sdcard/notifications/ding.mp3
1 file pushed. 0 files skipped.
619 KB/s (24912 bytes in 0.039s)

Now restart your emulator, and the sounds should show up in setting. You can select the appropriate sounds now!

You may even skip the SD card and directly copy to the system folders (I haven't tested this)
Android OS System
/system/media/audio/alarms
/system/media/audio/notifications
/system/media/audio/ringtones

4 comments:

Anonymous said...

Hi, I find reading this article a joy. It is extremely helpful and interesting and very much looking forward to reading more of your work.. top android emulators

Anonymous said...

I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post. android-emulators.com

Kumar Abelard said...

Eine andere Adresse, die ich sehr gut kenne, bietet Benutzern hier Original klingeltöne: https://klingeltonekostenlos.com/

tainhacchuong24h said...

For more ringtones and cool sounds, you can visit: klingeltöne download

Turn on Windows 11 Fast Boot

If windows starting is slow, to enable windows 11 fast startup/boot,  Press Windows + R, type powercfg.cpl, and hit Enter.  This will direct...