[Q] Deleting system file in terminal causes reboot - One (M8) Q&A, Help & Troubleshooting

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.

Delete the file in recovery using TWRP
Sent from my HTC One_M8 using Tapatalk

SmiLey497 said:
Delete the file in recovery using TWRP
Sent from my HTC One_M8 using Tapatalk
Click to expand...
Click to collapse
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.

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.

heather1209 said:
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.
Click to expand...
Click to collapse
It comes back when you reboot. Your system is not writable you need to S-OFF. get system RW kernel, or delete through recovery.

SmiLey497 said:
It comes back when you reboot. Your system is not writable you need to S-OFF. get system RW kernel, or delete through recovery.
Click to expand...
Click to collapse
Ah, that makes sense. What's the system RW kernel you mentioned? I'm not familiar with that.

heather1209 said:
Ah, that makes sense. What's the system RW kernel you mentioned? I'm not familiar with that.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2701816

heather1209 said:
Ah, that makes sense. What's the system RW kernel you mentioned? I'm not familiar with that.
Click to expand...
Click to collapse
[KERNEL] [June 20] [Sense] [GPE] ElementalX 0.19 I think that'll work on stock Sense system.

heather1209 said:
Ah, that makes sense. What's the system RW kernel you mentioned? I'm not familiar with that.
Click to expand...
Click to collapse
He means flash a kernel that has write access to system enabled.

SmiLey497 said:
http://forum.xda-developers.com/showthread.php?t=2701816
Click to expand...
Click to collapse
Or yeah, the MOD can work too :good:

Related

[Q] How do you delete bloatware via adb

Ive done this before and for the life of me i cannot remember how to do this, and ive been searching xda and google for a half hour now, can anybody help me out. How do you remove stock apps via adb?
Thanks guys
adb shell
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cd /system/app
# rm xxx.apk
Replace xxx with app names. Case sensitive.
Edit: ignore $ and # when typing the commands
well this is weird, i know i have root but when i try those commands thru cmd on pc, i get error sh-3.2 it won't let me su but when i do it in terminal on phone it works fine
androidtoy09 said:
adb shell
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cd /system/app
# rm xxx.apk
Replace xxx with app names. Case sensitive.
Edit: ignore $ and # when typing the commands
Click to expand...
Click to collapse
Do I need to remove the odex files as well?
Sent from DynamikD's R00t3d & OC G2
Advisable to, yes. Also, reboot and clear cache in recovery for best results.
What is the command to list "dir" to get the app names? I've done this on my mytouch3g as well but rusty
Edit: It's "ls" lol.
Ok, so I just attempted this and get this error:
rm failed for Twitter.apk, Read-Only file system
Click to expand...
Click to collapse
And I also would like to remove these:
amazonmp3.apk
Email.apk
com.google.android.apps.finance-1.apk
Web2GoShortcut.apk
Twitter.apk
Web2GoShortcut.odex
Email.odex
What is a .odex file?
Sent from my T-Mobile G2 using XDA App
Make sure is not a typo.
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
Anyone know the name of the photobucket APK?
So now that we have Perma-ROOT, is it safe to delete these bloatwares without worrying about future OTA's?
And what's a .odex file? How do we delete this? Can we just delete these apps thru Titanium Backup and then boot into Recovery to clear cache?
*EDIT* - n/m i see how to delete the .odex files now
What's the .apk name for Photobucket?
*EDIT* - Got it... it's PbAndroid.apk
Need help!
Well those are the commands to remove a app how do you push a apk file back onto the /system/app. I want to push a Bluetooth.apk file from the old ROM to the new OTA and see if that helps with the Bluetooth issue I'm having with the new OTA.
If your perma rooted why not just install titanium backup and uninstall the app. If your temp rooted then you can only disable the app cuz if you delete the apps it'll only reappear after a reboot.
Becuz titanium does not let u remove apps, if it was that easy I think everyone would do it
fryrice8850 said:
Becuz titanium does not let u remove apps, if it was that easy I think everyone would do it
Click to expand...
Click to collapse
It doesn't? Then what the heck does titainium do when I press uninstall? This is a serious question.. not sarcasm.
Sent from my T-Mobile G2 using XDA App
Nvm u need to select "problems" and it will download busybox on ur g2 and then u can uninstall stock apps...
fryrice8850 said:
Nvm u need to select "problems" and it will download busybox on ur g2 and then u can uninstall stock apps...
Click to expand...
Click to collapse
Then it really is that easy... and everyone should do it.
Sent from my T-Mobile G2 using XDA App
how would the remount command change for the MyTouch4G?
nemesys571 said:
how would the remount command change for the MyTouch4G?
Click to expand...
Click to collapse
Don't think it would.
BTW you can also try this remount command for either, I was advised that it's preferable to use and it's certainly easier:
mount -o remount, rw /system

[Q] Can't write to /system [SOLVED]

Guys, can someone tell me what i'm missing? I followed this guide to root and S-OFF my phone, but just now i realized that i have no write access to /system partition. It isn't very important for me, since i'm flashing only rooted ROMs and when i need to gain write access to /system partition - i'm rebooting into CW Recovery, but... It would be handy to have it anyway
Some info form what i see in fastboot:
VISION PVT ENG S-OFF
HBOOT-0.8.4.2000
RADIO-26.03.02.26_M
Thank you in advance.
Did you verify that you have root? Use the Android Terminal Emulator, type su and if you get a #, you're good to go. If you do have root, just use Root Explorer and hit the R/W button while in the system folder.
Sent from my HTC Vision using XDA App
ScooterG said:
Did you verify that you have root? Use the Android Terminal Emulator, type su and if you get a #, you're good to go.
Click to expand...
Click to collapse
Yes, i'm getting root permissions here.
ScooterG said:
If you do have root, just use Root Explorer and hit the R/W button while in the system folder.
Click to expand...
Click to collapse
When i press mount as R/W, nothing happens and i can't make any changes in /system partition.
Also, i tried Font Changer Lite (from Market), but i'm getting message:
"Write access for the system partition was not established on your device and therefore this application will have to be closed.
Please make sure your device has full root before you try again"
Am i missing something? Thanks for quick reply btw.
Using ADB
1. adb shell
2. mount -o rw,remount -t ext3 /dev/block/mmcblk0p25 /system
3. exit
aznsnake666 said:
2. mount -o rw,remount -t ext3 /dev/block/mmcblk0p25 /system
Click to expand...
Click to collapse
"mount -o rw,remount /system" should work too.
(you need to mount /system specifically as rw, by default it's still mounted read-only even if you have root/S-OFF)
Or simply:
adb remount
Love that No need to remember the blocks and hassle with the mount command
AnyDone said:
Or simply:
adb remount
Love that No need to remember the blocks and hassle with the mount command
Click to expand...
Click to collapse
This is the best way I've found to do it, but it is only temporary.
Thank you guys very much, that worked
Edit: Font Changer Lite still complaining about permissions.
There's a /system remount app in the market lol
Sent from my HTC Vision using XDA App
stevencpoynter said:
There's a /system remount app in the market lol
Click to expand...
Click to collapse
Sure, let's download an app for each ADB command, so then we can complain about having not enough of internal memory again
I know that sounded a little sarcastic lol, was in the bank waiting in line.
Seriously though, there's a one click remount app, its wonderful as I no longer have to use adb or a terminal to make /system rw
Sent from my HTC Vision using XDA App

[Q] Help needed

I just rooted my phone and i am trying to delete some of the apps that come with the phone.
I have found these steps in the forms but the problem is that, if I open a CMD and type this, it is not accepted.
I am guessing there is a step missing
1. type in the command line on your PC
Code:
adb shell
2. now you need to get super user rights:
Code:
su
3. you need to remount the system partition
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
4. change to the /system/app directory and you can now rename/delete all files in there
I hope you make a copy of this folder, so you can always revert back to factory default. A hardreset doesn't restaure the deletet apps, so be carefull. Also you need to check on your own IF you can really delete a app or not. I don't know what features you use.
hamd3000 said:
I just rooted my phone and i am trying to delete some of the apps that come with the phone.
I have found these steps in the forms but the problem is that, if I open a CMD and type this, it is not accepted.
I am guessing there is a step missing
1. type in the command line on your PC
Code:
adb shell
2. now you need to get super user rights:
Code:
su
3. you need to remount the system partition
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
4. change to the /system/app directory and you can now rename/delete all files in there
I hope you make a copy of this folder, so you can always revert back to factory default. A hardreset doesn't restaure the deletet apps, so be carefull. Also you need to check on your own IF you can really delete a app or not. I don't know what features you use.
Click to expand...
Click to collapse
You can use root explorer, an apk that uses superuser permissions, or, maybe you didn't reboot the cellphone, when you root your, always reboot, in order to take the "effect"
try freezing app. Easier and safer. If you want to delete. Root explorer or try super manager.
Sent from my MB525 using XDA App
I do have super user permission , but i still dont know what to do
hamd3000 said:
I do have super user permission , but i still dont know what to do
Click to expand...
Click to collapse
Did you try with Titanium Backup ?, I think you can freeze, clear data and unninstall it !, let me know if I'm wrong
Download supermanager app from market. Enable root function. Get to phone dir. System then app
Sent from my MB525 using XDA App
tava2003 said:
Did you try with Titanium Backup ?, I think you can freeze, clear data and unninstall it !, let me know if I'm wrong
Click to expand...
Click to collapse
worked like a charm

FYI CWM With latest .14 ICS release

I went throught the process to root and install unlocked bootloader after upgrading from stock hc to stock 14 ics build. Everything seemed to work well untill trying to install CWM.
EVerytime I rebooted to try to get into CWM I got the old recovery. It seems I had to rename install-recovery.sh. However when I tried to rename with term emu apparently the easy root method no longer works and system remained ro. In order to resolve I had to mount -o remount, rw /system/ then rename install-recovery, then re-run the cwm script.
paronowitz said:
I went throught the process to root and install unlocked bootloader after upgrading from stock hc to stock 14 ics build. Everything seemed to work well untill trying to install CWM.
EVerytime I rebooted to try to get into CWM I got the old recovery. It seems I had to rename install-recovery.sh. However when I tried to rename with term emu apparently the easy root method no longer works and system remained ro. In order to resolve I had to mount -o remount, rw /system/ then rename install-recovery, then re-run the cwm script.
Click to expand...
Click to collapse
I'm confused. Even if the root script from ZN was installed successfully which I can confirm and many other members who have ran this rom have confirmed, you would still need to mount /system some how. Whether it is from rootexplorer, es file manager, or directly from the terminal emulator as you did. That script roots the tab and makes /system/ mountable in various apps it doesn't make /system/ RW constantly. I'm glad you got it taken care of though.
Yup that what I'm saying. I started with a freshly clean install. I tried running the an method several times. I was able to install unlocked boot loader howver I had no rw access to /system unless I manually remounted. Every time I reboot I have to remount again
Well I would think BEFORE updating to .014 you should remove bootloader.blob and anything else that relates to changing recovery from the .014 update before attempting to flash. Otherwise you would end up with a stock bootloader again.
don't forget to remove the installrecovery script from the etc folder too just a fyi
@paronowitz
You might want to try rooting again. I'm currently on Zeronull's release, and I can mount /system fine from root explorer without having to mount it first through terminal emu. I've gotten into the habit of re-rooting roms on the tab.
I had not problem accessing /system. I could not change or delete anything in is specifically the install_recovery.sh without remounting it rw
if memory serves me right the install package for twrp removed the install recoveryinstall script.
paronowitz said:
I had not problem accessing /system. I could not change or delete anything in is specifically the install_recovery.sh without remounting it rw
Click to expand...
Click to collapse
Well I apparently had no problems with root, until I tried to edit anything in /system. After re-rooting I could mount /system, AND edit/delete install_recovery.sh.
The OP had said he was renaming install-recovery.sh from the terminal emulator. Like I said in my post earlier the root script doesn't make /system/ rw constantly and the terminal emulator does not auto mount /system/ rw. So even if the script is working, you would have to use the same commands if you are using the termnal to rename. Also, by making /system/ rw you are making /system/etc rw, and this allows you to edit the file you were attempting to edit. So when I am referring to mounting /system/ as rw, we are talking about the same thing. /etc/ is a shortcut to /system/etc.
paronowitz said:
I went throught the process to root and install unlocked bootloader after upgrading from stock hc to stock 14 ics build. Everything seemed to work well untill trying to install CWM.
EVerytime I rebooted to try to get into CWM I got the old recovery. It seems I had to rename install-recovery.sh. However when I tried to rename with term emu apparently the easy root method no longer works and system remained ro. In order to resolve I had to mount -o remount, rw /system/ then rename install-recovery, then re-run the cwm script.
Click to expand...
Click to collapse
It sounds like you may want to just execute the commands by hand. The script will make assumptions that may not hold true for your current configuration.
Look HERE
Check out the Eew245's root method. It give you the most control since you do it by hand. If you don't have adb you can use the one supplied in the ZeroNull easy unlock package(careful to not run the scripts at the wrong time and such though). Anyway Im out of time today. It sounds like as others have said you probably just need to
su
mount -o remount,rw /system
mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.BAK
Then reflash cwm if you overwrote recovery when you updated.
NoSudo said:
It sounds like you may want to just execute the commands by hand. The script will make assumptions that may not hold true for your current configuration.
Look HERE
Check out the Eew245's root method. It give you the most control since you do it by hand. If you don't have adb you can use the one supplied in the ZeroNull easy unlock package(careful to not run the scripts at the wrong time and such though). Anyway Im out of time today. It sounds like as others have said you probably just need to
su
mount -o remount,rw /system
mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.BAK
Then reflash cwm if you overwrote recovery when you updated.
Click to expand...
Click to collapse
That's exactly what I had to do.
edit - miss-post

[Q] Acer A100 on ICS and Rooted but unable to rename files

Hello, I was recently able to upate my A100 to ICS. I followed the root instructions in the developer section and it worked great. Both Titanium Backup and Superuser say I'm rooted but I can't move/rename the wpa_supplicant file. I really need to be able to use ad hoc to tether to my phone. Did I do something wrong in rooting my tablet? Any help would be much appreciated.
Thanks.
You need to mount system as r/w. Which file manager are you using?
Sent from my LG-P999 using Tapatalk 2
How do I enable that? I'm using Root Browser, I never had to do that before in HC...it just worked lol. Thanks for the help.
DravenAcer said:
How do I enable that? I'm using Root Browser, I never had to do that before in HC...it just worked lol. Thanks for the help.
Click to expand...
Click to collapse
I personaly used Root Explorer, its free and it has a friendly little buttong that has R/o R/W which allows you to read only to read and write
I redid the root and reinstalled Superuser, Root Browser, Titanium and Terminal...they all I'm rooted but when I try to move or rename the wpa_supplicant file it says failed. When I try to mount on Terminal it says it can't because I don't have root. What's going on lol? Did I do something wrong or is my version of ICS incompatible with the rooting method? Please help...
DravenAcer said:
I redid the root and reinstalled Superuser, Root Browser, Titanium and Terminal...they all I'm rooted but when I try to move or rename the wpa_supplicant file it says failed. When I try to mount on Terminal it says it can't because I don't have root. What's going on lol? Did I do something wrong or is my version of ICS incompatible with the rooting method? Please help...
Click to expand...
Click to collapse
I noticed the same problem with Root Browser. It is probably not using the standard /system/bin/mount or /system/xbin/mount. Also it may be ZeroNulls mount script not taking in account for all possible mount scenarios. You could try my mount script in this thread forum.xda-developers.com/showthread.php?t=1512787 and replace your /system/bin/mount and /system/xbin/mount.
If you are sure it's rooted then remounting from a terminal will work. Are you typing su before trying to remount?
If you are and it still doesn't work try this instead
Code:
$ su
# mount -o remount,rw /dev/block/mmcblk0p3 /system/
BTW root explorer is not free
eww245 said:
I noticed the same problem with Root Browser. It is probably not using the standard /system/bin/mount or /system/xbin/mount. Also it may be ZeroNulls mount script not taking in account for all possible mount scenarios. You could try my mount script in this thread forum.xda-developers.com/showthread.php?t=1512787 and replace your /system/bin/mount and /system/xbin/mount.
If you are sure it's rooted then remounting from a terminal will work. Are you typing su before trying to remount?
If you are and it still doesn't work try this instead
Code:
$ su
# mount -o remount,rw /dev/block/mmcblk0p3 /system/
BTW root explorer is not free
Click to expand...
Click to collapse
Thanks for your help. I didn't know I had to type 'su' first lol. That worked...kinda. Because I have to retype that everytime I rename or move something. Is that some kind of bug in the script?
DravenAcer said:
Thanks for your help. I didn't know I had to type 'su' first lol. That worked...kinda. Because I have to retype that everytime I rename or move something. Is that some kind of bug in the script?
Click to expand...
Click to collapse
Yes that is a bug in the script. Using my mount script Root Browser is able to modify /system files.
Looks like the old wpa_supplicant file isn't working. I did a search but haven't found any yet that work. Has anyone been able to activate ad-hoc on their A100 with ICS?
eww245 said:
Yes that is a bug in the script. Using my mount script Root Browser is able to modify /system files.
Click to expand...
Click to collapse
Yes, that worked great! Thank you.

Categories

Resources