Mount One X Filesystem as RW? - HTC One X

Hi all, i've been trying to mount my filesystem as RW, but all the commands that i searched failed! Can anyone enlighten me?
commands i used:
Code:
ADB Remount
and i get operation not permitted
Code:
ADB shell
su
mount -o remount,rw ext4 /blah/blah/blah /system
this works, but i cannot push files from my mac to the phone! OMGOMGOMG.

Might be easier to use Root Explorer. It's basically a file explorer that lets you make system files rewritable.

aameerp said:
Might be easier to use Root Explorer. It's basically a file explorer that lets you make system files rewritable.
Click to expand...
Click to collapse
Yeah in the end i succumbed to UI and used ES to do it. But i wanna understand what went wrong! So someone, please tell me!

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)

[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

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

remount with wr privileges. How?

Hello everyone, I've been using android since Eclair and I had a couple of different brands under my ownership. Sony Ericsson, Samsung, Alcatel...
I've always been rooting my phones. After that, each time I needed rw privileges in order to be able to delete files (like built-in apps), place ringtones, alarms and notifications sounds directly into /system/media/audio, rename or backup system files etc., I was using a simple command from a terminal app or via ssh from a desktop giving this syntax:
mount -o remount, rw /dev/block/mtdblock3 /system
Then, until next reboot I could write in /system.
Unfortunately since I got G3 this command won't work. Apparently, either lollipop's or LG's partitions are a bit different that the usual...
After looking around for a while, I came up with a page which shows that this command "ls -al /dev/block/platform/msm_sdcc.1/by-name", lists all partitions' paths by label and that according to the list, /system corresponds to mmcblk0p40. So I was thinking of trying the command a bit altered, like this:
mount -o remount, rw /dev/block/mmcblk0p40 /system
Since I don't have good knowledge of linux -I can't even tell if the old syntax is not working because of LG's implementation or of android's new version (lollipop)- I'd just like someone who has already done this to confirm that I'm right and it works. I'd really not like to brick the phone atm. I feel too old for this s...
Thanks, George...
P.S.: Now, if someone would be kind enough to provide an in-depth explanation of how I could always find by myself (in any newer version of android and any different android implementation), which partition is the appropriate one to use in this command in order to obtain rw for /system, that would be more than welcome!
Edit: I should have mentioned this to avoid getting answers about 3rd party apps which do those stuff like root explorer: I'm looking for a solution, not a workaround. I need the syntax of the command, not a list with apps which do what I'm trying to do using terminal. But thanks adamzki anyway...
Use root explorer pro. That's it.
This command is enough to mount /system as rw;
Code:
mount - o rw,remount /system
forumber2 said:
This command is enough to mount /system as rw;
Code:
mount - o rw,remount /system
Click to expand...
Click to collapse
That's really strange, I had used "mount -o remount,rw /system /system" and it didn't work
I now used "mount -o remount,rw /system" and it works! I'll never understand Linux...
Thanks anyway man!
Thread can be locked.

Categories

Resources