• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Guide][nonroot] Fix AndroidQ no UI sound bugs

Search This thread

co4

Member
Dec 8, 2016
33
10
Google Pixel 2 XL
OnePlus 9
Since I originally wrote this I have found an even easier way that works 100% without root using Setting database editor so I've updated this guide to the better method.

as a few of us 2XL owners will know Google derped sounds on the factory image of Q and our nice charging sound has been replaced with a horrible Error sound (Google Bug tracker.)
after a few weeks of waiting & trying to fix the issue myself I have finally managed to figure it out...

turns out they're trying to access sounds from the WRONG location

UI sounds on factory Q image seem to trigger from /product/media/audio/ui but this directory only has boot animations, no audio as these files are actually located in /system/media/audio/ui
it's probably why upgrading from 9 to 10 keeps the audio settings but factory flashing doesn't.


https://play.google.com/store/apps/details?id=by4a.setedit22

Install the settings database editor (link above)

Code:
open a terminal app and type(or copy paste) the line below;

pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS

or using adb:
Code:
adb shell

pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS

using setedit go to the global tab and look for each of the UI audio settings, switch /product/media/audio*.* to /system/media/audio/*.*

Restart your phone to apply the settings.

  • car_dock_sound /system/media/audio/ui/Dock.ogg
  • car_undock_sound /system/media/audio/ui/Undock.ogg
  • desk_dock_sound /system/media/audio/ui/Dock.ogg
  • desk_undock_sound /system/media/audio/ui/Undock.ogg
  • lock_sound /system/media/audio/ui/Lock.ogg
  • low_battery_sound /system/media/audio/ui/LowBattery.ogg
  • trusted_sound /system/media/audio/ui/Trusted.ogg
  • unlock_sound /system/media/audio/ui/Unlock.ogg
  • wireless_charging_started_sound /system/media/audio/ui/ChargingStarted.ogg

Minor notes:
I'm unsure why the charging sound is dictated by wireless_charging setting.

I've had a report that settings revert after a few reboots, I've not had this myself and I've rebooted a lot but if it happens just reapply the changes in setedit.

You can also change the sounds to files on your system, I've not had luck pinpointing my sdcard folder but I have been able to change Lock.ogg to Dock.ogg as a test.

(/Sdcard/download didn't work)

_________( Old method )_________

This is my first write up so please bear with me

please note I'm not responsible for any messups you make doing this

it can be done on a terminal emulator, I prefer ADB shell

in order to sucessfully do this you will need HiddenSettings magisk module
Thank you skittles9823
I'm unsure if you need busybox but the module certainly looks for it
Code:
[B][COLOR="red"]adb shell[/COLOR][/B] or launch your [I]TerminalApp[/I]
taimen:/ $[B][COLOR="red"]su[/COLOR][/B]
taimen:/ [I]#[/I] [B][COLOR="red"]hidden[/COLOR][/B]

 4 - All settings

[CHOICE]:[B][COLOR="red"]4[/COLOR][/B]

 3 - Modify settings

[CHOICE]:[B][COLOR="red"]3[/COLOR][/B]

 ===== Modify Settings =====

[Search?]:[B][COLOR="Red"]wireless_charging_started_sound /system/media/audio/ui/ChargingStarted.ogg[/COLOR][/B]

press enter & reboot your phone.
That is pretty much it, hopfully the android team fix this next patch.

I'll add some notes from what I have found through tinkering


  1. you must reboot after modifying EACH setting.
  2. you can see the "=" is not added when changing the settings wireless_charging_started_sound=/system/media/audio/ui/ChargingStarted.ogg (wrong)

    wireless_charging_started_sound /system/media/audio/ui/ChargingStarted.ogg (Right)

Here are all the settings i can find

  • car_dock_sound /system/media/audio/ui/Dock.ogg
  • car_undock_sound /system/media/audio/ui/Undock.ogg
  • desk_dock_sound /system/media/audio/ui/Dock.ogg
  • desk_undock_sound /system/media/audio/ui/Undock.ogg
  • lock_sound /system/media/audio/ui/Lock.ogg (this causes an error on my phone)
  • low_battery_sound /system/media/audio/ui/LowBattery.ogg
  • trusted_sound /system/media/audio/ui/Trusted.ogg
  • unlock_sound /system/media/audio/ui/Unlock.ogg
  • wireless_charging_started_sound /system/media/audio/ui/ChargingStarted.ogg
 
Last edited:

Syxx14

New member
Apr 14, 2019
3
0
Awesome job figuring this out. Hopefully Google will fix this in the November system images since You've done all the work for them. :p
 

Nightf0x_007

Senior Member
Nov 5, 2012
619
58
Great job and thanks for it, so this works with the charging sound issue but not the locking/unlocking sound?, As for the charging sound i already have a workaround for it as i have gravitybox and edxposed installed and gravitybox have a option to change charging sound, hoepfully google will fix both in upcoming noember update
 

co4

Member
Dec 8, 2016
33
10
Google Pixel 2 XL
OnePlus 9
Great job and thanks for it, so this works with the charging sound issue but not the locking/unlocking sound?, As for the charging sound i already have a workaround for it as i have gravitybox and edxposed installed and gravitybox have a option to change charging sound, hoepfully google will fix both in upcoming noember update

I have found an even easier way that works 100% using setedit:
https://play.google.com/store/apps/details?id=by4a.setedit22

Install the app open a terminal app

pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS

Job done easier to edit :)

Out of habit I typed su to enable root before granting write permissions so if it doesn't work without enabling su try that
 

Nightf0x_007

Senior Member
Nov 5, 2012
619
58
I have found an even easier way that works 100% using setedit:
https://play.google.com/store/apps/details?id=by4a.setedit22

Install the app open a terminal app

pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS

Job done easier to edit :)

Out of habit I typed su to enable root before granting write permissions so if it doesn't work without enabling su try that

Does settings revert back after multiple reboots ? Cause this happened to me
 

tobias.agatz

Member
Apr 18, 2017
7
0
Cologne
Thank you SOOO much! :highfive: It works on my Pixel 2. Had to reset it to factory after the December update killed my Pixel launcher app. After the reset I faced this horrible charging sound and the lack of lock sounds, too.
 

ratchet26

Member
Nov 29, 2014
6
6
Vancouver
God this was driving me crazy on a warranty replacement Pixel 2. 3rd replacement and finally it boots and the battery is decent.
I don't know if I would have noticed but for having 2 phones side by side. After that, I couldn't un-hear it.
 

BFSilva

Member
Sep 13, 2010
45
7
Hi,
I've tried the first method, but I couldn't grant permissions in the Terminal app, it fails!
I don't have root.
Can anyone help?
Thank you so much
 

Mandrutz

New member
Aug 24, 2015
3
1
All these sounds work on my Pixel 1, but I get the error sound whenever I get a notification while in call. Does anybody know where I can find that sound? It's not in SetEdit.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Since I originally wrote this I have found an even easier way that works 100% without root using Setting database editor so I've updated this guide to the better method.

    as a few of us 2XL owners will know Google derped sounds on the factory image of Q and our nice charging sound has been replaced with a horrible Error sound (Google Bug tracker.)
    after a few weeks of waiting & trying to fix the issue myself I have finally managed to figure it out...

    turns out they're trying to access sounds from the WRONG location

    UI sounds on factory Q image seem to trigger from /product/media/audio/ui but this directory only has boot animations, no audio as these files are actually located in /system/media/audio/ui
    it's probably why upgrading from 9 to 10 keeps the audio settings but factory flashing doesn't.


    https://play.google.com/store/apps/details?id=by4a.setedit22

    Install the settings database editor (link above)

    Code:
    open a terminal app and type(or copy paste) the line below;
    
    pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS

    or using adb:
    Code:
    adb shell
    
    pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS

    using setedit go to the global tab and look for each of the UI audio settings, switch /product/media/audio*.* to /system/media/audio/*.*

    Restart your phone to apply the settings.

    • car_dock_sound /system/media/audio/ui/Dock.ogg
    • car_undock_sound /system/media/audio/ui/Undock.ogg
    • desk_dock_sound /system/media/audio/ui/Dock.ogg
    • desk_undock_sound /system/media/audio/ui/Undock.ogg
    • lock_sound /system/media/audio/ui/Lock.ogg
    • low_battery_sound /system/media/audio/ui/LowBattery.ogg
    • trusted_sound /system/media/audio/ui/Trusted.ogg
    • unlock_sound /system/media/audio/ui/Unlock.ogg
    • wireless_charging_started_sound /system/media/audio/ui/ChargingStarted.ogg

    Minor notes:
    I'm unsure why the charging sound is dictated by wireless_charging setting.

    I've had a report that settings revert after a few reboots, I've not had this myself and I've rebooted a lot but if it happens just reapply the changes in setedit.

    You can also change the sounds to files on your system, I've not had luck pinpointing my sdcard folder but I have been able to change Lock.ogg to Dock.ogg as a test.

    (/Sdcard/download didn't work)

    _________( Old method )_________

    This is my first write up so please bear with me

    please note I'm not responsible for any messups you make doing this

    it can be done on a terminal emulator, I prefer ADB shell

    in order to sucessfully do this you will need HiddenSettings magisk module
    Thank you skittles9823
    I'm unsure if you need busybox but the module certainly looks for it
    Code:
    [B][COLOR="red"]adb shell[/COLOR][/B] or launch your [I]TerminalApp[/I]
    taimen:/ $[B][COLOR="red"]su[/COLOR][/B]
    taimen:/ [I]#[/I] [B][COLOR="red"]hidden[/COLOR][/B]
    
     4 - All settings
    
    [CHOICE]:[B][COLOR="red"]4[/COLOR][/B]
    
     3 - Modify settings
    
    [CHOICE]:[B][COLOR="red"]3[/COLOR][/B]
    
     ===== Modify Settings =====
    
    [Search?]:[B][COLOR="Red"]wireless_charging_started_sound /system/media/audio/ui/ChargingStarted.ogg[/COLOR][/B]

    press enter & reboot your phone.
    That is pretty much it, hopfully the android team fix this next patch.

    I'll add some notes from what I have found through tinkering


    1. you must reboot after modifying EACH setting.
    2. you can see the "=" is not added when changing the settings wireless_charging_started_sound=/system/media/audio/ui/ChargingStarted.ogg (wrong)

      wireless_charging_started_sound /system/media/audio/ui/ChargingStarted.ogg (Right)

    Here are all the settings i can find

    • car_dock_sound /system/media/audio/ui/Dock.ogg
    • car_undock_sound /system/media/audio/ui/Undock.ogg
    • desk_dock_sound /system/media/audio/ui/Dock.ogg
    • desk_undock_sound /system/media/audio/ui/Undock.ogg
    • lock_sound /system/media/audio/ui/Lock.ogg (this causes an error on my phone)
    • low_battery_sound /system/media/audio/ui/LowBattery.ogg
    • trusted_sound /system/media/audio/ui/Trusted.ogg
    • unlock_sound /system/media/audio/ui/Unlock.ogg
    • wireless_charging_started_sound /system/media/audio/ui/ChargingStarted.ogg