All system sounds can be found inside the /system/media
folder.
Different to the /data
partition the /system
partition can be read with normal user permissions so you can easily copy those sounds; you don't need any source code (whyever would you need code for that?).
If you'd like to get an application specific sound then open the apk as a .zip
-file and look out for the assets
and res/raw
folders.