# [GUIDE] Change Lock/Unlock Sounds



## DizzyThermal (Jun 15, 2011)

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*

```
adb push Lock.ogg /data/local/<br />
adb push Unlock.ogg /data/local/
```
*Step 3: Mount Filesystem Read/Write*

```
adb shell mount -o remount,rw /dev/block/mtdblock3 /system
```
*Step 4: Backup/Rename Old Files*

```
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*

```
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*

```
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*

```
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:

```
#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
```


----------



## DizzyThermal (Jun 15, 2011)

Here's how to go back to the stock Lock/Unlock Sounds (assuming you used my method above)

*Step 1: Mount System Read/Write*

```
adb shell mount -o remount,rw /dev/block/mtdblock3 /system
```
*Step 2: Remove Modified Lock/Unlock Sounds*

```
adb shell rm /system/media/audio/ui/Lock.ogg<br />
adb shell rm /system/media/audio/ui/Unlock.ogg
```
*Step 3: Rename Backup Files*

```
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*

```
adb shell mount -o remount,ro /dev/block/mtdblock3 /system
```
...and here's the All-in-One script


```
<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
```


----------

