Android OS Forum banner
1 - 2 of 2 Posts

·
KeyKitLimeKat
Joined
·
545 Posts
Interested in changing the Stock Lock/Unlock Sounds?

We'll use the iPhone's "mechanical click" sound as an example.

Step 1: Download Files
Download the Lock.ogg and Unlock.ogg files from here: http://db.tt/h7Abk3a and unzip files.

Step 2: Open Terminal/Command Prompt
Open up a terminal or command prompt window and cd to the directory you unzipped the files to.

Step 3: Push Files
Code:
adb push Lock.ogg /data/local/<br />
adb push Unlock.ogg /data/local/
Step 3: Mount Filesystem Read/Write
Code:
adb shell mount -o remount,rw /dev/block/mtdblock3 /system
Step 4: Backup/Rename Old Files
Code:
adb shell mv /system/media/audio/ui/Lock.ogg /system/media/audio/ui/Lock.bak<br />
adb shell mv /system/media/audio/ui/Unlock.ogg /system/media/audio/ui/Unlock.bak
Step 5: Move New Files
Code:
adb shell mv /data/local/Lock.ogg /system/media/audio/ui/<br />
adb shell mv /data/local/Unlock.ogg /system/media/audio/ui/
Step 6 (Optional): Change Permissions/Owner/Group
Code:
adb shell chmod 644 /system/media/audio/ui/Lock.ogg<br />
adb shell chmod 644 /system/media/audio/ui/Unlock.ogg<br />
adb shell chown root /system/media/audio/ui/Lock.ogg<br />
adb shell chown root /system/media/audio/ui/Unlock.ogg<br />
adb shell chgrp root /system/media/audio/ui/Lock.ogg<br />
adb shell chgrp root /system/media/audio/ui/Unlock.ogg
Step 7: Mounting System Read Only
Code:
adb shell mount -o remount,ro /dev/block/mtdblock3 /system
Step 8: Enable Screen Lock Sounds
If you have not already enabled Screen lock sounds, go to Settings > Sound > Screen lock sounds and tick the checkbox

...and for those of you who like scripts to do the job, (make sure the sounds are in the same directory as the script) :wink2:
Code:
#Moving Files to Phone (/data/local/)<br />
adb push Lock.ogg /data/local/<br />
adb push Unlock.ogg /data/local/<br />
<br />
#Mounting System Read/Write<br />
adb shell mount -o remount,rw /dev/block/mtdblock3 /system<br />
<br />
#Backup/Renaming Old Lock/Unlock Sounds<br />
adb shell mv /system/media/audio/ui/Lock.ogg /system/media/audio/ui/Lock.bak<br />
adb shell mv /system/media/audio/ui/Unlock.ogg /system/media/audio/ui/Unlock.bak<br />
<br />
#Moving New Lock/Unlock Sound In<br />
adb shell mv /data/local/Lock.ogg /system/media/audio/ui/<br />
adb shell mv /data/local/Unlock.ogg /system/media/audio/ui/<br />
<br />
#Changing Permissions/Owner/Group<br />
adb shell chmod 644 /system/media/audio/ui/Lock.ogg<br />
adb shell chmod 644 /system/media/audio/ui/Unlock.ogg<br />
adb shell chown root /system/media/audio/ui/Lock.ogg<br />
adb shell chown root /system/media/audio/ui/Unlock.ogg<br />
adb shell chgrp root /system/media/audio/ui/Lock.ogg<br />
adb shell chgrp root /system/media/audio/ui/Unlock.ogg<br />
<br />
#Mounting System Read Only<br />
adb shell mount -o remount,ro /dev/block/mtdblock3 /system
 

·
KeyKitLimeKat
Joined
·
545 Posts
Discussion Starter · #2 ·
Here's how to go back to the stock Lock/Unlock Sounds (assuming you used my method above)

Step 1: Mount System Read/Write
Code:
adb shell mount -o remount,rw /dev/block/mtdblock3 /system
Step 2: Remove Modified Lock/Unlock Sounds
Code:
adb shell rm /system/media/audio/ui/Lock.ogg<br />
adb shell rm /system/media/audio/ui/Unlock.ogg
Step 3: Rename Backup Files
Code:
adb shell mv /system/media/audio/ui/Lock.bak /system/media/audio/ui/Lock.ogg<br />
adb shell mv /system/media/audio/ui/Unlock.bak /system/media/audio/ui/Unlock.ogg
Step 4: Mount System Read Only
Code:
adb shell mount -o remount,ro /dev/block/mtdblock3 /system
...and here's the All-in-One script

Code:
<br />
#Mounting System Read/Write<br />
adb shell mount -o remount,rw /dev/block/mtdblock3 /system<br />
<br />
#Remove Modified Lock/Unlock Sounds<br />
adb shell rm /system/media/audio/ui/Lock.ogg<br />
adb shell rm /system/media/audio/ui/Unlock.ogg<br />
<br />
#Rename Backup Files<br />
adb shell mv /system/media/audio/ui/Lock.bak /system/media/audio/ui/Lock.ogg<br />
adb shell mv /system/media/audio/ui/Unlock.bak /system/media/audio/ui/Unlock.ogg<br />
<br />
#Mount System Read Only<br />
adb shell mount -o remount,ro /dev/block/mtdblock3 /system
 
1 - 2 of 2 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top