Here’s how to set custom alarm tone on OnePlus phones
OnePlus maintains two distinct flavors of operating systems for its consumers. The global version of their phones run OxygenOS, whereas the Chinese variant comes with HydrogenOS onboard without any Google services.
OxygenOS gives users a close to stock Android (AOSP) experience with numerous handy options and customizations. The skin is not heavy or full of inconsistencies like most other Chinese OEMs (MIUI from Xiaomi or EMUI from Huawei), but it is not free from glitches either.
It may sound little weird, but OxygenOS doesn’t give users a choice to select their own alarm tone to set it as system-wide default! Allow me to rephrase, the default clock app or similar third party apps provide an option to modify alarm tone per alarm, but when creating a new alarm in the app or with Google Assistant, it will always do so with the default tone (‘Spring’), and this can be understandably annoying.
Despite it being in AOSP since Marshmallow or Nougat, for some reason there is no such option to change the alarm tone in the OOS Settings UI, even in their current Pie releases. For reference, from shell the relevant field is settings get system alarm_alert in the database.
@OnePlus_Support I've been meaning to ask this, when I set my alarm from the Clock app, it usually rings the tone I set(e.g. Ripple), but when I set it through Ok Google, it usually sets the Spring as my tone and I don't know how to fix it.
— Daniel Jayarajan (@gabrieal4real) April 21, 2018
Also, I went to change my ringtone just now and increased the volume of alarm tone and it didn't ring the alarm tone i set, but the spring tone rang out.
— Daniel Jayarajan (@gabrieal4real) April 25, 2018
Inspecting further, it looks like the issue is model agnostic, and present in all versions of OxygenOS. The initial value of the default alarm tone in /data/system/users/CURRENT_USER_NUMBER/settings_system.xml is the ‘Spring’ one, populated from /system/build.prop, and, in a nutshell, OnePlus just doesn’t make it easy to change it from the default.
One extreme solution is to remount system partition (/system) after unlocking bootloader and/or rooting and manually replace the default alarm tone audio file with the choice of your own, but the whole procedure is way hectic.
Recognized developer osm0sis came up with an elegant solution for the issue which doesn’t touch /system. The small shell script just needs to be invoked from an elevated root or ADB shell which updates the Settings database (falling back to directly changing the appropriate XML) with the user supplied choice of alarm name.
P.S. If the terms like ‘ADB’ or ‘root shell’ sound alien to you, then please give this a read first.
As this solution still needs to call the content and settings commands from shell, elevated rights are mandatory. Running the script directly on the phone with a terminal emulator was broken earlier, but should now be fixed as well.
The solution works fine on every OnePlus phone running OxygenOS, even the newest OP6T running Android Pie. It is also possible to use external apps like this one or most file managers to edit the Settings database or set alarm/ring/notification tones, respectively, but those are out of scope of this article.
P.S. After writing the initial draft, we contacted osm0sis to check if everything’s technically correct. We like to thank him for his ‘mild rewording and touchups’. 🤓
Have you noticed the limitation before? Let us know by commenting below.
PiunikaWeb is a unique initiative that mainly focuses on investigative journalism. This means we do a lot of hard work to come up with news stories that are either ‘exclusive,’ ‘breaking,’ or ‘curated’ in nature. Perhaps that’s the reason our work has been picked by the likes of Forbes, Foxnews, Gizmodo, TechCrunch, Engadget, The Verge, Macrumors, and more. Do take a tour of our website to get a feel of our work. And if you like what we do, stay connected with us on Twitter (@PiunikaWeb) and other social media channels to receive timely updates on stories we publish.