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.

oneplus_oos_alarm_custom
Setting per alarm custom tone on OnePlus 6

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.

https://twitter.com/gabrieal4real/status/987627879151226880

https://twitter.com/gabrieal4real/status/989088348320030720

OnePlus 6 - Change default alarm tone system-wide? from oneplus

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.

For example:

set_alarm not_a_good_alarm.ogg

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.

Tags

Kingshuk De
896 Posts

I came from a mixed background of Statistics and Computer Science. My research domains included embedded computer systems, mobile computing and delay tolerant networks in post-disaster scenarios. Apart from tinkering with gadgets or building hackintosh, I like to hop on various subreddits and forums like MyDigitalLife and XDA.

Next article View Article

[April 10: Official acknowledgement for recommended videos bug] YouTube Library tab broken and sidebar missing, users say

This story is being continuously updated…. New updates are being added at the bottom….. Original story (from 2019) follows: Incoming are reports related to two separate YouTube-related issues. The...
Apr 10, 2020 0 Min Read