Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,728,302 Members 49,668 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Deleting system file in terminal causes reboot

Tip us?
 
heather1209
Old
#1  
Member - OP
Thanks Meter 1
Posts: 47
Join Date: May 2011
Question [Q] Deleting system file in terminal causes reboot

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.
 
SmiLey497
Old
#2  
SmiLey497's Avatar
Senior Member
Thanks Meter 348
Posts: 894
Join Date: May 2009
Location: SF, CA - NYC
Delete the file in recovery using TWRP

Sent from my HTC One_M8 using Tapatalk
Past Cellphones:
Motorola: Timeport, Droid 1
Sharp: Z800
Nextel: i710, i860
Apple: iPhone 4
LG: Nexus 5, G2
Samsung: a950, SCH-i760, Galaxy Nexus, Galaxy S III, Galaxy Note II, Galaxy S 4
HTC: Libra, Droid Eris, Incredible, Thunderbolt, One XL, One M7


Currently owned: HTC One M8
 
heather1209
Old
#3  
Member - OP
Thanks Meter 1
Posts: 47
Join Date: May 2011
Quote:
Originally Posted by SmiLey497 View Post
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.
 
ashyx
Old
#4  
Senior Member
Thanks Meter 37
Posts: 278
Join Date: 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.
 
SmiLey497
Old
#5  
SmiLey497's Avatar
Senior Member
Thanks Meter 348
Posts: 894
Join Date: May 2009
Location: SF, CA - NYC
Quote:
Originally Posted by heather1209 View Post
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.
Past Cellphones:
Motorola: Timeport, Droid 1
Sharp: Z800
Nextel: i710, i860
Apple: iPhone 4
LG: Nexus 5, G2
Samsung: a950, SCH-i760, Galaxy Nexus, Galaxy S III, Galaxy Note II, Galaxy S 4
HTC: Libra, Droid Eris, Incredible, Thunderbolt, One XL, One M7


Currently owned: HTC One M8
 
heather1209
Old
#6  
Member - OP
Thanks Meter 1
Posts: 47
Join Date: May 2011
Quote:
Originally Posted by SmiLey497 View Post
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.
 
SmiLey497
Old
#7  
SmiLey497's Avatar
Senior Member
Thanks Meter 348
Posts: 894
Join Date: May 2009
Location: SF, CA - NYC
Quote:
Originally Posted by heather1209 View Post
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
Past Cellphones:
Motorola: Timeport, Droid 1
Sharp: Z800
Nextel: i710, i860
Apple: iPhone 4
LG: Nexus 5, G2
Samsung: a950, SCH-i760, Galaxy Nexus, Galaxy S III, Galaxy Note II, Galaxy S 4
HTC: Libra, Droid Eris, Incredible, Thunderbolt, One XL, One M7


Currently owned: HTC One M8
The Following User Says Thank You to SmiLey497 For This Useful Post: [ Click to Expand ]
 
BerndM14
Old
#8  
Senior Member
Thanks Meter 147
Posts: 477
Join Date: Apr 2014
Quote:
Originally Posted by heather1209 View Post
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.
 
ashyx
Old
#9  
Senior Member
Thanks Meter 37
Posts: 278
Join Date: Oct 2012
Quote:
Originally Posted by heather1209 View Post
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.
 
BerndM14
Old
#10  
Senior Member
Thanks Meter 147
Posts: 477
Join Date: Apr 2014
Quote:
Originally Posted by SmiLey497 View Post
Or yeah, the MOD can work too

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...