[Q] Deleting system file in terminal causes reboot

Search This thread

heather1209

Senior Member
May 5, 2011
84
8
Hello all,

I'm trying to delete a system file using the Android terminal (as my end goal is to put it in a run shell task in Tasker) and it either reboots my phone or just doesn't delete.

Long story short, I'm using the Weak Sauce root method, but I do not have S-Off as I like how easy it is to undo the Weak Sauce root alone. This means, of course, I don't have immediate RW access to system. So here's what I've done:

Code:
# mount -o rw,remount -t yaffs2 /dev/block/mmcblk0p46 /system
# busybox rm -f /system/media/audio/ui/camera_click.ogg
# mount -o ro,remount -t yaffs2 /dev/block/mmcblk0p46 /system

When I do the first and last commands alone, the system mounts as RW and RO correctly, confirmed with # mount|grep system. But that middle command is the problem. Sometimes nothing will happen, other times my phone will reboot. I've also tried adding the following before the rm command with no success:
Code:
# chmod 777 /system/media/audio/ui/camera_click.ogg

I AM able to delete the file manually through ES File Explorer when mounted RW. But it comes back after I restart my phone, hence why I want this command to be used in Tasker.

What am I doing wrong?

PS: as for the "why" of deleting the shutter sound file, I take screenshots sometimes and the sound drives me nuts. I've tried removing the ogg file from the camera apk, but that didn't work after a reboot. I also tried replacing the ogg file with a silent one, but no success there either as the real one reloads itself when I restart.
 

ashyx

Inactive Recognized Contributor
Oct 14, 2012
15,055
9,943
If the file is coming back then you don't have proper write access to system and the file isn't actually being deleted which Is why it appears to come back.
Try using root explorer instead or do it through TWRP. Make system RW then just move or rename the file rather than delete it. If you have proper write access it will stick.
 

SmiLey497

Senior Member
May 7, 2009
945
375
SF, CA - NYC
I'm trying to do it from the terminal so I can eventually put it into Tasker. I can delete it successfully with ES File Explorer, so no need for recovery. I just need some way to get it to work through the terminal.

It comes back when you reboot. Your system is not writable you need to S-OFF. get system RW kernel, or delete through recovery.
 

Top Liked Posts