[HOWTO] Replace the screen unlock sound

17 posts
Thanks Meter: 6
By ThisThing, Junior Member on 25th July 2013, 06:54 PM
Post Reply Email Thread
Most UI sounds can be found and replaced simply in /system/media/audio/ui, but not so with the screen unlock sound. Replacing it is rather more involved. I'll assume some familiarity with using adb to move files around and rename them.

Tools you need: WinRAR, adb, zipalign


Create new unlock sounds named "lens_flare_unlock.ogg" and "lens_flare_tap.ogg". These can be oggs or mp3s but the files must be named exactly as stated with the .ogg extension.

Copy /system/framework/framework-res.apk to your computer and make a backup copy.

Rename your working copy to framework-res.zip

Double-click to open the file in WinRAR.

In WinRAR navigate to res/raw. You should see the files to be replaced.

Drag your replacement files into WinRAR and (here's the important part) in the Compression Method drop-down choose "Store".

Hit OK in WinRAR. Make sure the Size and Packed columns are the same for the replaced files. If they aren't you didn't choose 'Store' as the compression method.

Close WinRAR.

zipalign the file with this command: "zipalign 4 framework-res.zip framework-res.apk.mod"

Reboot the phone into recovery and plug it in. See this thread to get adb working.

Mount /system.

Use adb to push framework-res.apk.mod to /system/framework.

In /system/framework rename framework-res.apk (the original) to framework-res.apk.orig (so you have a convenient backup.)

Rename framework-res.apk.mod to framework-res.apk

chmod 644 framework-res.apk

Reboot and you should be good.

If your boot gets stuck after the T-Mobile animation something has gone wrong. To recover, reboot to recovery and use adb to rename framework-res.apk to framework-res.apk.mod and rename framework-res.apk.orig to framework-res.apk

If someone can tells us how to add files uncompressed using 7zip or Winzip that would be great. I used WinRAR because it's what I had.
You can also try replacing framework-res.apk using this method but I haven't.
The Following 4 Users Say Thank You to ThisThing For This Useful Post: [ View ] Gift ThisThing Ad-Free
16th September 2013, 02:07 AM |#2  
Junior Member
Thanks Meter: 1
thank you! ive been trying to figure this out! now if only I coudl find a way to change the actual lens flare to the lightning ive been seeing on youtube.
16th September 2013, 02:43 AM |#3  
Thanks Meter: 0
Originally Posted by Synergy-7

thank you! ive been trying to figure this out! now if only I coudl find a way to change the actual lens flare to the lightning ive been seeing on youtube.

flash this if you are on touchwiz...doesnt matter what rom or version you are on...its just images that will push to the framework

Lightening Lockscreen
The Following User Says Thank You to For This Useful Post: [ View ] Gift Ad-Free
5th October 2013, 10:30 PM |#4  
JORDVN's Avatar
Senior Member
Flag Las Vegas
Thanks Meter: 68
Donate to Me
How would I go about replacing the key press tone for my device? Currently it's the stock water droplet sound. Would I need adb since it is a system file? Or is there another method that would allow me to override this?

Sent from my SGH-M919 using xda app-developers app
13th October 2013, 01:17 AM |#5  
mrdreamers's Avatar
Senior Member
Flag Texas
Thanks Meter: 60
Donate to Me
cant you just replace the ogg files and that would be that??
btw how do you get the file to your computer and back?
22nd October 2013, 11:09 PM |#6  
spacecowboy618's Avatar
Senior Member
Flag St. Louis, MO
Thanks Meter: 72
Man this seems tough

Sent from my SGH-M919 using XDA Premium 4 mobile app
28th October 2013, 01:34 AM |#7  
Thanks Meter: 0
Post Reply Subscribe to Thread


Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes