[General Questions and Answers] rivetgun:
Hi, I'm on Android 8.1.0 Oreo, and I need some help:

The problem

I tried to use an old WAV file as my custom default notification sound. Problem is I think the format was so old (it was from a 1994 game. 22.1 khz 179 kbit/s) the system wouldn't support it maybe because It never played well but rather sorta glitched, and after some coming and going setting it and replacing it the default notification sound went silent and my Sound Settings simply won't open anymore, it just crashes every time.

The problem, besides not being able to access my Sound Settings, is that now my default notification sfx is missing. So I had to manually set something on an app-by-app basis, with the problem that Google's SMS application will only let you assign custom sfx going contact by contact which is basically impossible.

I plugged the thing into Android Studio and got some logs.

The logs

At the end of the post you can see the logcat log, the parts I considered relevant. Confirming my suspicions, in line 7 (couldn't enable line numbers in bbcode, sorry) you can see some method IsWAVADPCMFile (ADPCM is a WAV format) clearly not recognizing the format, then failing to recognize media content and below the Java VM shutting down.

Below that you can see an exception with com.android.settings.Settings$SoundSettingsActivity.

It all closes down several lines later (not shown) with a 1462 7380 I WindowManager: WIN DEATH: Window{8256fb7 u0 com.android.settings/com.android.settings.Settings}

The damn thing just crashes, not even the popup saying "Unfortunately X stopped working..." (I think there's a name for that in Android).

So what do I need

I need some way to set the default ringtone without going through SoundSettings (since I broke it). This should both give me back a default notification sound and allow me to open SoundSettings.

I tried deleting the offending file, replacing it with a compliant WAV with the exact same name and the error persists, that's why I think the ringtone gets copied somewhere else and it's no longer looking for it in the Notifications folder. I'm a daily Linux user so I thought it would be some configuration file but apparently not. I found there is something called MediaStore, some sort of SQLite where these references go.

I work professionally as a developer (not Android, though), so I'm not afraid of getting my hands a little dirty; the only thing I don't wanna do is a factory reset.

I don't think this is particularly a device problem but an Android problem, but in case it's of any use, the phone is a Blackberry keyone.

Thanks in advance.

08-27 22:12:12.182 1462 4930 E ActivityTrigger: activityResumeTrigger: not whiteListedcom.android.settings/com.android.settings.Settings$SoundSettingsActivity/27
08-27 22:12:12.186 1462 4930 I ActivityManager: screenStatusRequestTag =0
08-27 22:12:12.216 19057 24325 E ActivityThread: Failed to find provider info for com.qti.smq.qualcommFeedback.provider
08-27 22:12:12.346 1462 4930 E UserRestrictionsUtils: Unknown restriction: null
08-27 22:12:12.386 19057 19057 D SoundSettings: NO dashboard tiles for SoundSettings
08-27 22:12:12.460 595 595 E tokenserviced: Token tcl_debug.tkn not found
08-27 22:12:12.465 849 6033 E MM_OSAL : IsWAVADPCMFile: Error unknown format tag 2
08-27 22:12:12.466 849 6033 E MM_OSAL : IsWAVADPCMFile: Error unknown format tag 2
08-27 22:12:12.467 849 6033 W MediaExtractor: FAILED to autodetect media content.
08-27 22:12:12.468 852 852 E MediaExtractor: Trace connect 0x0 0xdf39a3c0
08-27 22:12:12.469 19057 19057 D AndroidRuntime: Shutting down VM
--------- beginning of crash
08-27 22:12:12.472 19057 19057 E AndroidRuntime: FATAL EXCEPTION: main
08-27 22:12:12.472 19057 19057 E AndroidRuntime: Process: com.android.settings, PID: 19057
08-27 22:12:12.472 19057 19057 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.Settings$SoundSettingsActivity}: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2821)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2899)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1625)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6558)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: Caused by: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.media.MediaMetadataRetriever.setDataSource(Native Method)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:139)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:183)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.media.Ringtone.getTitle(Ringtone.java:284)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at com.android.settings.notification.RingtonePreferenceControllerBase.updateState(RingtonePreferenceControllerBase.java:60)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at com.android.settings.dashboard.DashboardFragment.updatePreferenceStates(DashboardFragment.java:282)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at com.android.settings.dashboard.DashboardFragment.onCreate(DashboardFragment.java:96)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at com.android.settings.notification.SoundSettings.onCreate(SoundSettings.java:84)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.Fragment.performCreate(Fragment.java:2489)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1237)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.FragmentManagerImpl.addAddedFragments(FragmentManager.java:2406)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2185)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2141)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2042)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:799)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at com.android.settings.SettingsActivity.switchToFragment(SettingsActivity.java:869)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at com.android.settings.SettingsActivity.launchSettingFragment(SettingsActivity.java:515)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at com.android.settings.SettingsActivity.onCreate(SettingsActivity.java:406)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7256)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7247)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1215)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2774)
08-27 22:12:12.472 19057 19057 E AndroidRuntime: ... 9 more