Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] Deleting system file in terminal causes reboot

OP heather1209

23rd June 2014, 09:58 PM   |  #1  
OP Member
Thanks Meter: 8
 
80 posts
Join Date:Joined: May 2011
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.
24th June 2014, 03:54 AM   |  #2  
SmiLey497's Avatar
Senior Member
SF, CA - NYC
Thanks Meter: 356
 
896 posts
Join Date:Joined: May 2009
More
Delete the file in recovery using TWRP

Sent from my HTC One_M8 using Tapatalk
24th June 2014, 04:23 AM   |  #3  
OP Member
Thanks Meter: 8
 
80 posts
Join Date:Joined: May 2011
Quote:
Originally Posted by SmiLey497

Delete the file in recovery using TWRP

Sent from my HTC One_M8 using Tapatalk

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.
24th June 2014, 09:14 AM   |  #4  
Senior Member
Thanks Meter: 48
 
302 posts
Join Date:Joined: Oct 2012
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.
24th June 2014, 03:18 PM   |  #5  
SmiLey497's Avatar
Senior Member
SF, CA - NYC
Thanks Meter: 356
 
896 posts
Join Date:Joined: May 2009
More
Quote:
Originally Posted by heather1209

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.
24th June 2014, 07:05 PM   |  #6  
OP Member
Thanks Meter: 8
 
80 posts
Join Date:Joined: May 2011
Quote:
Originally Posted by SmiLey497

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

Ah, that makes sense. What's the system RW kernel you mentioned? I'm not familiar with that.
24th June 2014, 07:18 PM   |  #7  
SmiLey497's Avatar
Senior Member
SF, CA - NYC
Thanks Meter: 356
 
896 posts
Join Date:Joined: May 2009
More
Quote:
Originally Posted by heather1209

Ah, that makes sense. What's the system RW kernel you mentioned? I'm not familiar with that.

http://forum.xda-developers.com/show....php?t=2701816
The Following User Says Thank You to SmiLey497 For This Useful Post: [ View ]
24th June 2014, 07:20 PM   |  #8  
BerndM14's Avatar
Senior Member
Thanks Meter: 416
 
1,162 posts
Join Date:Joined: Apr 2014
More
Quote:
Originally Posted by heather1209

Ah, that makes sense. What's the system RW kernel you mentioned? I'm not familiar with that.

[KERNEL] [June 20] [Sense] [GPE] ElementalX 0.19 I think that'll work on stock Sense system.
24th June 2014, 07:20 PM   |  #9  
Senior Member
Thanks Meter: 48
 
302 posts
Join Date:Joined: Oct 2012
Quote:
Originally Posted by heather1209

Ah, that makes sense. What's the system RW kernel you mentioned? I'm not familiar with that.

He means flash a kernel that has write access to system enabled.
24th June 2014, 07:20 PM   |  #10  
BerndM14's Avatar
Senior Member
Thanks Meter: 416
 
1,162 posts
Join Date:Joined: Apr 2014
More
Quote:
Originally Posted by SmiLey497

http://forum.xda-developers.com/show....php?t=2701816

Or yeah, the MOD can work too

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes