[Q] Mount /system r/w each boot - Vibrant Q&A, Help & Troubleshooting

I would like my phone to mount the system directory r/w each time it boots.
Can I add some code to an init.d script to get my phone to mount /system r/w each time it boots?
--If so, what would I add?
--If not, how can I accomplish mounting /system r/w each boot?

creeve4 said:
I would like my phone to mount the system directory r/w each time it boots.
Can I add some code to an init.d script to get my phone to mount /system r/w each time it boots?
--If so, what would I add?
--If not, how can I accomplish mounting /system r/w each boot?
Click to expand...
Click to collapse
I'm not trying to be mean or anything, but are you sure you know what you are asking for? Mounting /system r/w opens up your phone to a lot of issues including making it trivial for someone to p0wn it, or blow it up (by that I mean your software installation). Just out of curiosity, why would you want /system to mount r/w all the time?

I do alot of theming and use adb to push the apps to my phone. Often I push framework files (while in recovery) and after rebooting I want to push more apps to system, but I must first use root explorer to mount it r/w. Gets pretty tedious.
I guess I could just use adb to mount system r/w, but that could be bothersome.

If you are going to be pushing with adb anyway, you can do "adb remount" before you push any files which will remount /system r/w. Quick and simple, and does not leave your phone wide open to chaos on the /system partition all the time.

shrapnelx said:
If you are going to be pushing with adb anyway, you can do "adb remount" before you push any files which will remount /system r/w. Quick and simple, and does not leave your phone wide open to chaos on the /system partition all the time.
Click to expand...
Click to collapse
Thanks. I didn't realize that remount also mounted /system r/w

Related

[Q] /system folder read/write via adb remount

Hi,
I recently pushed some fixes to my Hero's system folder and mounted it with read/write access via the adb remount command. All this is as expected so no problems. I was wondering however if I could remount it with read only access again, just for security until I need to gain access again.
Any help or tips with this would be appreciated!
Update:
OK guys sorry but I have answered my own question here. Digifail had the info!
"adb remount
This command remounts /system to be read/write, rather than the default read-only. Useful when modifying system applications or other root-only operations. It is advised to reboot after using this option so that the system will mount /system read-only again (for whatever reason, running "adb remount" a second time does not return /system to read-only status). "
Guess a reboot will sort this.

can't mount RW system/app in root explorer

it does it everywhere else except for the system folder. i really want to get this version of pandora off, but it's not doing anything. it worked with my other android devices, not sure why it's happening with this
Do you have the latest version of Root Explorer?
yeah what version of root explorer???
Generally if you can mount R/W in other folders you should also be able to do so in the system folder. You may have already tried this but you may want to boot into recovery and wipe cache and try again. If you have ADB set-up you should also be able to mount the device in R/W by doing the following command: su [enter] mount -o remount,rw -t /dev/block/mtdblock5 /system [enter] if that goes out without a hitch you should be able to delete in the system folder. You can also put that command in to terminal (if you have it) and that also should put the system into R/W. To remount the device in R/O just replace rw with ro. Hope this helps.
2.9.3...wow i'm restarted...i updated and it works now
I have had this issue a couple of times and a simple reboot has fixed it.
Sent from my B.A.M.F. Thunderbolt

[Q][SOLVED] Rooted, but can't mount system/app as RW

OK, this is a complete n00b question, but here goes anyway...
Have root, but I can't mount system/app in rw mode using Root Explorer or File Expert; keep gettting the message that it read-only. Tried abd to do chmod but can't change permissions there either.
Titanium is satisfied that I have root privileges as is File Expert. Did I miss something somewhere?
Thanks!
Make sure you have superuser installed.
demonhater said:
Make sure you have superuser installed.
Click to expand...
Click to collapse
Uh -- yeh.
SOLVED!
Found a post elsewhere that mentioned an app named "mount /system" in the Marketplace.
It worked! Its only function is to mount /system in rw mode, and it does it well.
jlmwrite said:
Uh -- yeh.
Click to expand...
Click to collapse
The reason I suggested that is because when my NT did a factory wipe I couldn't mount r/w and it turned out the wipe had erased superuser but the device was still rooted. When I reinstalled it, the problem was fixed. I'm glad you found a solution though.
Code:
mount -o rw,remount -t ext4 /dev/block/platform/mmci-omap-hs.1/by-name/system /system
I had this happen once actually, randomly, where root explorer couldn't mess with r/o directories. I rebooted my book and turned off and then back on both USB debugging modes to get it to work again (in root explorer). I've had warnings come up when USB debugging turns itself off (after a reboot) from applications that require root warning me that it might not work correctly unless I had debugging mode on as well, so I'd imagine proper functionality for root explorer/permission modification relies on usb debugging being on. Since the nook turns this off (one or both usb debugging boxes get unchecked randomly on boots) it's a good thing to try.
Ok so the reason this is happening is because you are refuring to a link to remount the partition do
mount -o rw,remount /dev/block/mccblk0p8 /system
Sent from my ADR6425LVW using xda premium

Why does my /system & /etc mount as R/W on boot? How to fix?

Of the 20+ Android phones I have had, and each being rooted and ROM'd, this is the first that I have seen.
On the TPC ROM, when my phone boots, my /system & /etc are mounted by default as Read/Write rather than Read Only. I have no such problem when I flash SAUROM.
I can set it to R/O, reboot, it becomes R/W again.
I asked the question in the ROM thread but got no help. It seems that others don't have this problem.
Why is this and how do I fix it?
Thanks.
Edit: The mount point is /dev/block/mmcblk0p24 for /system and /etc. There are some remount commands in a file located in init.d. Could that be the cause?
I'm no dev, but have you looked at the superuser logs to see what app might be changing r/rw modes? You say when you reboot it changes back. So that makes me think an app you have auto starting is mounting the system rw to make a change and failing to mount back to R.
Go in SuperUser.. clear the logs, set it to R, make note that it saved that change in the log using whatever program you use it to set with... Reboot, check Superuser logs to see what gained root and changed it back.
snovvman said:
Of the 20+ Android phones I have had, and each being rooted and ROM'd, this is the first that I have seen.
On the TPC ROM, when my phone boots, my /system partition is mounted by default as Read/Write rather than Read Only. I have no such problem when I flash SAUROM.
I can set it to R/O, reboot, it becomes R/W again.
I asked the question in the ROM thread but got no help. It seems that others don't have this problem.
Why is this and how do I fix it?
Thanks.
Click to expand...
Click to collapse
jb0nd38372 said:
I'm no dev, but have you looked at the superuser logs to see what app might be changing r/rw modes? You say when you reboot it changes back. So that makes me think an app you have auto starting is mounting the system rw to make a change and failing to mount back to R.
Go in SuperUser.. clear the logs, set it to R, make note that it saved that change in the log using whatever program you use it to set with... Reboot, check Superuser logs to see what gained root and changed it back.
Click to expand...
Click to collapse
Thanks for the suggestion. I removed all the apps that requested SU on boot, but the ROM still had /system as R/W. I don't think it's an app doing it.
Is there a way for me to add something into a boot script to set it as R/O?
Thanks.
I'm still trying to track down this problem.
I noticed that /etc also mounts as R/W by default. I see that both /system and /etc share the same mount point: /dev/block/mmcblk0p24.
I look in init.d and found one file which contained these lines:
#mount fs for faster IO speeds
mount -o remount,nodev,noatime,nodiratime /dev/block/mmcblk0p24 /system
mount -o remount,noauto_da_alloc,nodev,noatime,nodiratime /dev/block/mmcblk0p25 /data
mount -o remount,noauto_da_alloc /dev/block/mmcblk0p26 /cache
Would the first line cause this?
Is there something I can add to init.d to re-mount as R/O?
I'm still curious as to what is causing this. Thanks for any help.
Through trial and error, I found this command works to set /system and /etc to RO:
mount -o remount,ro /dev/block/mmcblk0p24 /system
I added it to init.d, and it works. Once the phone completes the boot, those directories are RO. It's just a patch.
But nevermind that--I am still very interested in the "why" and if there is some other script/boot command somewhere that is causing this.
I'd appreciate some guidance. Thanks.

Setting system root as RW default

Hey there?
I've got a question which I can't seem to find anywhere else and YES I have searched this forum and google. However, I may miss it.
Anyway, I've mapped my android phone as a network drive using Samba and changed the smb.conf file to show the System Root directory as well. However, system root is default set as R/O so to mange files USING my computer I need to change the permission to R/W using a file manager (such as root explorer). This is annoying, as I have to keep doing this in order to write to certail directories.
What I wish to do is create a massive guide on all of this to help out the community, however I need one little bit of information.
I would like the / directory (root) to be mounted as R/W as default so that I can quickly edit files on my PC without having to constantly change it to R/O.
If this has been answered before, I do apologize.
Thanks in advance.
Regards,
xxSHABSxx
EDIT:
To make things a bit clearer.
I want something that will automatically mount my phone's root dir into rw upon boot, without custom apps/having to manually mount as rw everytime it reboots. And yes I understand there are apps that do this.
Yes, the root file system is read-only, but it's also volatile. It's restored from the initramfs in the boot image each time you reboot the phone, so only mounting it writeable, doesn't do you very much anyway.
In /init.rc you find a line:
Code:
mount rootfs rootfs / ro remount
This remounts your root read-only. Remove this, and it'll stay writeable. But again, all edits to the root file system are volatile. To change this, you must flash a new boot.img
An easier way would be a root-app remounting it writable again after boot.
kuisma said:
Yes, the root file system is read-only, but it's also volatile. It's restored from the initramfs in the boot image each time you reboot the phone, so only mounting it writeable, doesn't do you very much anyway.
In /init.rc you find a line:
Code:
mount rootfs rootfs / ro remount
This remounts your root read-only. Remove this, and it's stay writeable. But again, all edits to the root file system are volatile. To change this, you must flash a new boot.img
An easier way would be a root-app remounting it writable again after boot.
Click to expand...
Click to collapse
Ahh I figured as much, since Google didn't offer any solutions to me. And flashing is way much more effort than simply having an app that does it for you.
Anyway thanks for the reply!
xxshabsxx said:
Ahh I figured as much, since Google didn't offer any solutions to me. And flashing is way much more effort than simply having an app that does it for you.
Click to expand...
Click to collapse
Or do like I did, move the root to a real ext3 non-volatile file system instead.

Categories

Resources