[Q] SG3 & file system access issues - T-Mobile, Samsung Galaxy SIII

Environment: SG3 + recently up-ed to NC2 (rooted, as all the other previous images I used). Trying to get rid of the "camera click", as I've done it many times in the past, but in this instance here is what I'm experiencing:
[email protected]:/system/media/audio/ui # mv camera_click.ogg camera_click.old
failed on 'camera_click.ogg' - Read-only file system
[email protected]:/system/media/audio/ui # ls -l camera*
-rw-r--r-- root root 9520 2014-03-08 05:12 camera_click.ogg
-rw-r--r-- root root 4786 2014-03-08 05:12 camera_focus.ogg
[email protected]:/system/media/audio/ui # chmod 755 camera*
Unable to chmod camera_click.ogg: Read-only file system
Any ideas how to fix?
TIA
Sent from my SGH-T999 using Tapatalk

Root doesn't automatically change the file system from R/O to R/W. You still need to change it. Use a root file manager like root explorer to make it really easy to do.
And how did you root? Did you remove Knox? Knox, and sometimes seLinux will prevent root access.
Sent from my SM-N900T using Tapatalk
---------- Post added at 11:28 AM ---------- Previous post was at 11:26 AM ----------
Did you try to set to r/w on the folder, rather than just the files?
Sent from my SM-N900T using Tapatalk

Thanks for replies, so far, but looking at the output again it just occurred to me that in fact this is mounted RO, rather than RW, which may explain why chmod fails... I wonder - should that be the case - if I could force a RW mounting of the file system, w/out bricking the phone.
Sent from my Nexus 7 using Tapatalk

netfortius said:
Thanks for replies, so far, but looking at the output again it just occurred to me that in fact this is mounted RO, rather than RW, which may explain why chmod fails... I wonder - should that be the case - if I could force a RW mounting of the file system, w/out bricking the phone.
Click to expand...
Click to collapse
# mount -o remount,rw /system ... duh! Sorry for all the noise

Related

Which user am I logged in as ?

Hi all,
couple of questions I hope somebody can answer for me ?
1. If I connect my Hero phone to my XP PC and run adb shell and then SU so I get the # prompt, what user am I logged in as ? is it root ? I tried whoami command but it was not a recognised command.
2. What is special about the system directory, because if I try and do
#chmod 777 system
I get this error: Unable to chmod system: Read-only file system
but no problem if I do same command to the sys directory. Both sys and system have same file permissions:
drwxr-xr-x root root 2009-08-27 03:51 system
drwxr-xr-x root root 1970-01-01 01:00 sys
so what makes the system directory a Read-only file system ?
I hope this makes sense, I'm only just starting to dabble with this linux stuff.
The answer to the first question is you are indeed logged in as root, su will(...should...) log you in as root for the entire session.
with # you are root. the id command works.
/system is the "rom" part, it should not be changed and therefore is usually mounted RO. you can remount it RW with the usual mount options or adb remount. why would you want to change the permissions of the folder? i don't think it's good idea tbh, you should not mess with system files unless you know what you are doing.
kendong2 said:
with # you are root. the id command works.
/system is the "rom" part, it should not be changed and therefore is usually mounted RO. you can remount it RW with the usual mount options or adb remount. why would you want to change the permissions of the folder? i don't think it's good idea tbh, you should not mess with system files unless you know what you are doing.
Click to expand...
Click to collapse
OK, thanks for explaining. tbh I was just seeing what I could and could not do, I will take your advice and not mess with the system files any more.
So the read only thing, is to do with mounting rather than file permissions from what you say. I think I need to read up on the subject.
Cheers
gudge said:
OK, thanks for explaining. tbh I was just seeing what I could and could not do, I will take your advice and not mess with the system files any more.
So the read only thing, is to do with mounting rather than file permissions from what you say. I think I need to read up on the subject.
Cheers
Click to expand...
Click to collapse
do whatever you like, i learned most of what i know by trial&error just be prepared to break it, never go without a backup...

Mounting /system as rw

Alright, so I've been trying to mount the /system partition as rw today now that we have perm-root and I've been failing. I'm tried multiple mount options such as
mount -o rw,remount -t ext3 /system
mount -o rw,remount -t ext3 /dev/block/mmcblk0p15 /system
and a few others. The command works but when I try to uninstall an application via the package manager:
pm uninstall /system/app/amazonmp3.apk
pm uninstall /system/app/amazonmp3
I get failure.
I was also searching in the init.rc scripts in /, and noticed that it mounts the /system twice. Once in rw and then again in ro. I can't change that file though since for whatever reason, I still can't access the /system even with perm-root (s-off).
Titanium Backup also doesn't detect any /system applications.
Any thoughts, or enlightening clarifications? I'm not a Linux beginner and have experience in system administration all the way from Debian Sid to Arch Linux.
EDIT:
Solution: I have ro.secure=0 now and the remount is now successful.
You are using the pm command incorrectly. The argument is package name, not file name.
pm uninstall com.amazon.mp3
pm list packages for a full list.
That would be the reason. Unfortunately I can't look at the man pages of these commands on the phone ;D.
You edited your post to show that you now have r/w access to the /system folder, but you didn't say how you achieved ro.secure=0.
Care to share? I'm having the same issue.
perm root will give you ro.secure=0
jgro1976 said:
You edited your post to show that you now have r/w access to the /system folder, but you didn't say how you achieved ro.secure=0.
Care to share? I'm having the same issue.
Click to expand...
Click to collapse
rosecure=0 is set in the ramdisk of the kernel. It allows easy mounting rw , as in adb remount, however shouldn't be needed. Use this to mount as rw:
# mount -o rw,remount /dev/block/mmcblk0p25 /system
Replace rw with ro and run again when your done to return system to ro. I just tested it and it does mount as rw
Just to make sure it worked, I type that and get:
Usage: mount [-r] [-w] [-options] [-t type] device directory
after trying this.
jgro1976 said:
Just to make sure it worked, I type that and get:
Usage: mount [-r] [-w] [-options] [-t type] device directory
after trying this.
Click to expand...
Click to collapse
U sure you typed it exactly as I did?
There is a space after /dev/block/mmcblk0p25 before /system
Edit: and no space between comma and remount as in rw,remount
Yeah, that's how I typed it, exactly as you had it =\
jgro1976 said:
Yeah, that's how I typed it, exactly as you had it =\
Click to expand...
Click to collapse
Hmm, and you did this from root prompt # not $.
Can anyone else confirm or deny that command for me. I'm gonna flash a unmodified kernel when I get home tonight and see if that makes a difference.
fastludeh22 said:
Hmm, and you did this from root prompt # not $.
Can anyone else confirm or deny that command for me. I'm gonna flash a unmodified kernel when I get home tonight and see if that makes a difference.
Click to expand...
Click to collapse
I can confirm it doesn't work on my G2 either. I'm using Cyanogen RC1 btw.
try
mount -o remount,rw /dev/block/mmcblk0p25 /system
maybe the rw has to come after remount.
Anyways, I know mine works on permrooted stock
That did the trick, thanks!
ratchetrizzo said:
try
mount -o remount,rw /dev/block/mmcblk0p25 /system
maybe the rw has to come after remount.
Anyways, I know mine works on permrooted stock
Click to expand...
Click to collapse
jgro1976 said:
That did the trick, thanks!
Click to expand...
Click to collapse
So weird. If I type it that way, I get the mount options menu u were getting. If I type it my way it works.
I was messing around with remounting the /system partition with rw permissions, and the thing is that it does work as in, it doesn't give you an error when mounting, but it still doesn't let you access it. It's weird.
As for the ro.secure, I just used installed bacon bits, and it did it for me.
There's an app for that! I'm using a market app called mount /system (rw / ro). You can just search mount rw in the market, its free too
Sent from my T-Mobile G2 using XDA App
Can't you just use adb remount?
It worked for me (GT-P1000, CM 10.1-20130218-experimental- cdesai)

after the 1 click root - not able to mount some directories in root explorer?

I used the post to install the one click root for the samsung epic 4g (sprint), and it appears to have worked. However - after entering root explorer, only some of the directories allow me to edit files. I click the remount as r/w button but nothing happens. Any thoughts?
sedric1 said:
I used the post to install the one click root for the samsung epic 4g (sprint), and it appears to have worked. However - after entering root explorer, only some of the directories allow me to edit files. I click the remount as r/w button but nothing happens. Any thoughts?
Click to expand...
Click to collapse
Are you sure you granted root permissions to root explorer when it first ran? Run the superuser app from the app drawer and see if root explorer is on the list of apps that are allowed root permission.
I just tried v2.17.2 and it works fine. I tried changing the permissions on /system/xbin/busybox, it said filesystem mounted ro, then I press the mount rw button and redid the permission change, this time it worked no problem.
Thanks for your response-
yes, when i ran root explorer it asked if i wanted to grant superuser and i said yes. some folders allow it to remount, but - say the /system/bin folder - it doesnt allow it at all.
for further background, i used the automated instructions here for my root:
http://forum.xda-developers.com/showthread.php?t=1342728
i did option A like 5 times and also did option C (as i have EK02).
When opening root explorer it tells me that i have super user permissions. one thing to note- if i go to /system/xbin, i do not see a busybox directory. is there something else i should be installing?
in fact, i cant mount anything under the system directory or sub directories, but above that, i was able to change to r/w mode. i could also mount the /vendor directory right beside the /system directory...
If you were able to remount "/" as r/w then the problem isn't with root. That is basicly an "I'm a little bit pregnant situation" Either you are or you aren't.
Now if you weren't able to get root in the first place, then I'd look at the root.
As to busybox, there is no directory. There should be a file /system/xbin/busybox Also there should be a bunch of symlinks from various apps it supports to busybox.
I see - yea i did validate that busybox is not allowing for a mount or any type of change on that file/directory including busybox but the file is present. any suggestions on what else may be locking down this system directory?
I don't know if root file explorer is implemented it's own concept of ro/rw to protect you from making mistakes or it is using the system facilities. If it is using the system facilities, then once you remount /system as rw, then everything under /system is automatically rw. It is all the same partition.
I would try it from "adb shell" (do not type $ or # symbols)
Code:
$ su
# mount -o remount,rw /system /system
# cd /system/xbin
# chmod 755 busybox
If it lets you do that with no errors, then you have remounted /system/xbin as rw and the problem is with root file explorer. For that, you'd have to check with them or someone more well-versed in why that might be failing.
i appreciate your help
I went off googling the adb stuff/installed it and java's jdk stuff. then figured out how to run that adb shell stuff and validated that it worked (permissions were changed in places that this app didnt allow). knowing that the problem is actually with root explorer helps a ton.. as I just assumed it was working

[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.
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:

Root Explorer

I'm rooted but for some reason every time I try to add notification sounds to system/product/media/audio/notifications using Root Explorer I get a failed to copy error.
Anyone found a way to do this?
I don't know if I'm missing something here but why don't you add it to the notification folder in your storage?
cky2000 said:
I don't know if I'm missing something here but why don't you add it to the notification folder in your storage?
Click to expand...
Click to collapse
Facebook messenger for some reason doesn't see them in storage and I'm trying to add a custom notification for it.
Also I'm wondering why I'm not able to add to system folders.
I noticed this as well I was trying to change the bootanimation.zip out and that specific folder will not let me r/w,,but I am rooted and it works every place else?
I've tried three different root explorers, and the product folder will not mount.
I'll keep trying and update if I find something that works.
Options seem TWRP file manager when available or adb.
Archangel said:
I noticed this as well I was trying to change the bootanimation.zip out and that specific folder will not let me r/w,,but I am rooted and it works every place else?
Click to expand...
Click to collapse
Sent from my Pixel 3 XL using Tapatalk
I am guessing it is a Magisk thing since there are reports of it having difficulties with some apps.
micmars said:
I've tried three different root explorers, and the product folder will not mount.
I'll keep trying and update if I find something that works.
Options seem TWRP file manager when available or adb.
Sent from my Pixel 3 XL using Tapatalk
Click to expand...
Click to collapse
bp328i said:
Facebook messenger for some reason doesn't see them in storage and I'm trying to add a custom notification for it.
Also I'm wondering why I'm not able to add to system folders.
Click to expand...
Click to collapse
If I add them to the notification/storage folder they do show up in fb messenger. They are at the bottom of the list. Same here cannot mount that one folder with whatever app I use. I tried 17.3 and 17.4.
cky2000 said:
If I add them to the notification/storage folder they do show up in fb messenger. They are at the bottom of the list. Same here cannot mount that one folder with whatever app I use. I tried 17.3 and 17.4.
Click to expand...
Click to collapse
I figured out my issue why it was not showing up. I did not grant messenger rights to storage.
Still weird about not being able to mount that one folder.
It has nothing to do with Root Explorer.
I too wanted to change out bootanimation (it's blindingly white).
So I tried ADB and it just kinda said "no".
Code:
C:\android>adb shell
crosshatch:/ $ su
crosshatch:/ # cd /
crosshatch:/ # dir
/system/bin/sh: dir: not found
127|crosshatch:/ # ls
acct default.prop init.rc lost+found product system
bin dev init.recovery.blueline.rc metadata res system_root
bugreports dsp init.recovery.crosshatch.rc mnt root ueventd.rc
cache etc init.recovery.sdm845.rc odm sbin vendor
charger firmware init.usb.configfs.rc oem sdcard
config init init.usb.rc persist sepolicy
d init.crosshatch.rc init.zygote32.rc postinstall storage
data init.environ.rc init.zygote64_32.rc proc sys
crosshatch:/ # cd product
crosshatch:/product # ls
app build.prop etc lost+found media priv-app
crosshatch:/product # cd media
crosshatch:/product/media # ls
audio bootanimation.zip
crosshatch:/product/media # rm bootanimation.zip bootanimation.old
rm ro bootanimation.zip (y/N):y
[B]rm: bootanimation.zip: Read-only file system[/B]
rm: bootanimation.old: No such file or directory
1|crosshatch:/product/media # ls
audio bootanimation.zip
crosshatch:/product/media #
lol just noticed it's read only.
I forgot to set the r/w command and can't remember it.
Might also need to set to permissive.
But right now I've gotta go watch some NCAA.
---------- Post added at 02:22 PM ---------- Previous post was at 01:50 PM ----------
I set it to permissive and tried both the old and newer rw commands but neither let me modify /system/product/media/ or /product/media/.
Code:
mount -o remount,rw /system
mount -o rw,remount /system
This is weird I have never seen a folder stay read only after being bootloader unlocked and rooted? Guess Google doesnt want us changing out that crazy white boot animation??

Categories

Resources