[Q] Mounting /system read-write fails under adb shell, CM11 - Nexus 5 Q&A, Help & Troubleshooting

Hi! My problem is that I want to mod /system/etc stuff. But problem is: I can't mount /system rw in adb shell!
I'm using CM11 20140622 Nightly
What i've tried:
- sysrw command(alias sysrw='mount -o remount,rw /system')
- by hand(mount -o remount,rw /dev/block/platform/msm_sdcc.1/by-name/system /system)
None of those commands produce output and they exit 0
- ES File Explorer and CM File Manager
I don't know how, but mounting rw in UI always works, but not over adb.
Can anyone tell me a solution how to mount /system rw successfully over shell?

mikroskeem said:
Hi! My problem is that I want to mod /system/etc stuff. But problem is: I can't mount /system rw in adb shell!
I'm using CM11 20140622 Nightly
What i've tried:
- sysrw command(alias sysrw='mount -o remount,rw /system')
- by hand(mount -o remount,rw /dev/block/platform/msm_sdcc.1/by-name/system /system)
None of those commands produce output and they exit 0
- ES File Explorer and CM File Manager
I don't know how, but mounting rw in UI always works, but not over adb.
Can anyone tell me a solution how to mount /system rw successfully over shell?
Click to expand...
Click to collapse
Code:
adb root
adb shell
mount -o remount,rw /dev/block/platform/msm_sdcc.1/by-name/system /system
Sent from my Nexus 5 using Tapatalk

rootSU said:
Code:
adb root
adb shell
mount -o remount,rw /dev/block/platform/msm_sdcc.1/by-name/system /system
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Still same thing, no rw, no output

mikroskeem said:
Still same thing, no rw, no output
Click to expand...
Click to collapse
Windows or Linux? Are you using an outdated adb?
That's definitely correct, I tested it.

rootSU said:
Windows or Linux? Are you using an outdated adb?
That's definitely correct, I tested it.
Click to expand...
Click to collapse
Linux, adb version 1.0.31
Yeah it's correct but problem is it doesn't work.

mikroskeem said:
Linux, adb version 1.0.31
Yeah it's correct but problem is it doesn't work.
Click to expand...
Click to collapse
remove and reinstall your adb
Works fine with that command on both windows and linux for me.
Does adb devices even work?
Can you screenshot the error?

rootSU said:
remove and reinstall your adb
Works fine with that command on both windows and linux for me.
Does adb devices even work?
Can you screenshot the error?
Click to expand...
Click to collapse
No error output, i'm in adb shell so "[email protected]:~ #" will appear
I run commands there.
adb itself works fine.

mikroskeem said:
No error output, i'm in adb shell so "[email protected]:~ #" will appear
I run commands there.
adb itself works fine.
Click to expand...
Click to collapse
Screenshot please
Of this:
Code:
H:\>adb root
adbd is already running as root
H:\>adb shell
[email protected]:/ # mount -o remount,rw /dev/block/platform/msm_sdcc.1/by-name/system /system
platform/msm_sdcc.1/by-name/system /system <
[email protected]:/ #

rootSU said:
Screenshot please
Of this:
Code:
H:\>adb root
adbd is already running as root
H:\>adb shell
[email protected]:/ # mount -o remount,rw /dev/block/platform/msm_sdcc.1/by-name/system /system
platform/msm_sdcc.1/by-name/system /system <
[email protected]:/ #
Click to expand...
Click to collapse
sorry can't make screenshot atm, but i copyed terminal contents to here: http://hastebin.com/dicuhiyema.hs
EDIT: 6th line is the mount command, it wrapped badly

mikroskeem said:
sorry can't make screenshot atm, but i copyed terminal contents to here: http://hastebin.com/dicuhiyema.hs
Click to expand...
Click to collapse
Ah yeah that's as good as a screenshot.
Theres no option in CM11 dev options for adb root is there? I have on in SlimKat where I must enable ADB root.
mikroskeem said:
EDIT: 6th line is the mount command, it wrapped badly
Click to expand...
Click to collapse
Yeah my ubuntu terminal does that too.

rootSU said:
Ah yeah that's as good as a screenshot.
Theres no option in CM11 dev options for adb root is there? I have on in SlimKat where I must enable ADB root.
Yeah my ubuntu terminal does that too.
Click to expand...
Click to collapse
There is actually and it's set to "Apps and ADB", but I might try out next nightly. It might doesn't have that problem anymore. Prolly some SELinux conflict or kernel blocks something

Now it works.
I think it was CM problem.

mikroskeem said:
Now it works.
I think it was CM problem.
Click to expand...
Click to collapse
At first I was thinking it was your computer but everything you were doing was right so I agree. It seems it was.
Sent from my Nexus 5 using Tapatalk

using bin/mount rather than xbin/mount
mikroskeem said:
I can't mount /system rw in adb shell!
What i've tried:
- sysrw command(alias sysrw='mount -o remount,rw /system')
...
Can anyone tell me a solution how to mount /system rw successfully over shell?
Click to expand...
Click to collapse
For posterity, I'm adding what worked for me on LolliKat (which is cm11) for doing this from the phone's console/shell: I had to use the command `/system/bin/mount` rather than just `mount`. Once that had been done once, the other methods would work fine until reboot. (I was doing this because somehow link2sd had lost its ability to "update mount scripts" and "integrate system app updates".
These all worked for me:
/system/bin/mount -o remount,rw /system
/system/bin/mount -o remount,rw -t yaffs2 /system
/system/bin/mount -o remount,rw -t yaffs2 /system /system
/system/bin/mount -o remount,rw -t yaffs2 /dev/block/mtdblock8 /system
More info (in my own context) here and here:
http://forum.xda-developers.com/showpost.php?p=61068974&postcount=3
http://android.stackexchange.com/a/110883/109855

Related

[Q] How do I get RW in the /system/app?

I'm trying to push an apk there but I can't get permission. I tried using this:
Code:
adb shell mount -t rfs -o remount,rw /dev/block/stl9 /system
but it told me "operation not permitted". I got that code from the one click root.
What am I doing wrong?
When in the sdk tools directory but not in adb do;
adb push C:\file.apk /sdcard/file.apk
then open shell
adb shell
su
mount -t rfs -o remount,rw /dev/block/stl9 /system
now you are mounted. Just move the file
mv /sdcard/file.apk /system/app/file.apk
Thanks
Sent from my SPH-D700 using XDA App

[Q] Why am I getting following error on the shell prompt?

Without doing much talking I am just pasting the shell session:
Error is in red font
Code:
C:\Users\Downloads\one click root exploit>adb shell
# su
su
[COLOR="red"]# remount rw
remount rw
[: not found
[: not found
for mounting /system as read/write or read-only
usage: remount rw -or- remount ro[/COLOR]
# exit
exit
# exit
exit
C:\Users\Downloads\one click root exploit>
sunrocket said:
Without doing much talking I am just pasting the shell session:
Error is in red font
Code:
C:\Users\Downloads\one click root exploit>adb shell
# su
su
[COLOR="red"]# remount rw
remount rw
[: not found
[: not found
for mounting /system as read/write or read-only
usage: remount rw -or- remount ro[/COLOR]
# exit
exit
# exit
exit
C:\Users\Downloads\one click root exploit>
Click to expand...
Click to collapse
I'm not sure why that is happening, I didn't use a one click to root but you can always use the command: mount -t rfs -o remount,rw /dev/block/stl9 /system
to mount /system as read,write.
sunrocket said:
Without doing much talking I am just pasting the shell session:
Error is in red font
Code:
C:\Users\Downloads\one click root exploit>adb shell
# su
su
[COLOR="red"]# remount rw
remount rw
[: not found
[: not found
for mounting /system as read/write or read-only
usage: remount rw -or- remount ro[/COLOR]
# exit
exit
# exit
exit
C:\Users\Downloads\one click root exploit>
Click to expand...
Click to collapse
By the looks of that error I think busybox either isn't installed or not installed correctly.i am not positive but I think that its a busybox problem.
Yeah skeeter is right about busy box, whatever set up busy box didn't do it right
Sent from my SPH-D700 using Tapatalk
What do you guys think I should do?
I tried one click root again. The rooting is successful but still get the above error.
Most of the stuff that requires root (wifi tether, setcpu etc.) is working fine.
How to install busybox manually?
sunrocket said:
What do you guys think I should do?
I tried one click root again. The rooting is successful but still get the above error.
Most of the stuff that requires root (wifi tether, setcpu etc.) is working fine.
Click to expand...
Click to collapse
Sounds like you should just make sure busy box is installed properly. I would download the busybox installer from the market and install 1.17.1
You can't mount the filesystem tha way on the phone, you must use the other script (pita, I know). The remount command only works like that through adb (adb remount) and not from shell.
Sent from my SPH-D700 using XDA App
rufflez2010 said:
You can't mount the filesystem tha way on the phone, you must use the other script (pita, I know). The remount command only works like that through adb (adb remount) and not from shell.
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
Remount will work from a shell in connectbot if busybox is install correctly. My suggestion would be to flash a kernel with root and busy box in it. Just be sure to remove the joeykrim root exploit before you flash thr kernel.
Sent from my SPH-D700 using Tapatalk

[Q] Having trouble mounting \system in rw on BAMF 1.5

Hey guys,
Loaded BAMF 1.5 yesterday and have been enjoying the ROM thus far. However, I've been trying to push my custom widget.txt to the \system\customize\ folder so I can have my own power controls in the notifcation bar. I have tried the Mount rw/ro app from the Market, and have also tried mounting rw using adb (mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system).
Each time, when I use the command: adb push widget.txt /system/customize/ I get the error: failed to copy 'widget.txt' to '\system\customize\': Read-only file system
Where am I going wrong?
Seth
sethschmautz said:
Hey guys,
Loaded BAMF 1.5 yesterday and have been enjoying the ROM thus far. However, I've been trying to push my custom widget.txt to the \system\customize\ folder so I can have my own power controls in the notifcation bar. I have tried the Mount rw/ro app from the Market, and have also tried mounting rw using adb (mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system).
Each time, when I use the command: adb push widget.txt /system/customize/ I get the error: failed to copy 'widget.txt' to '\system\customize\': Read-only file system
Where am I going wrong?
Seth
Click to expand...
Click to collapse
I'm pretty sure the TB is using EXT3, not YAFFS2.
Try
Code:
mount -o remount,rw -t ext3 /dev/block/mtdblock3 /system
Even easier, assuming you have busybox. busybox mount isn't as lame as the standard mount which is provided, so you don't have to tell it as much, it can figure things out on its own:
busybox mount -o remount,rw /system
busybox mount -o remount,ro /system
Click to expand...
Click to collapse
even easier.
sysrw
sysro
Doesn't anyone ever read the first post of my rom?
I'm an idiot. Thanks for the ext3 vs yaffs2 reminder.
I'll try busybox at some point also to check
And to Adrynalyne, apparently I didn't read the first post...my bad. Thanks for reading mine, though. I'll pay closer attention in the future.
Seth

[Q][Kernel]Clemsyn-Blades-3.2 OC v4 on Prime 1.7

From the dev's forum :
- To use Clemsyn-Blades 3.2 OC (v2-4) with PRIME 1.7-final, do following:
Install PRIME 1.7-final
Delete /system/lib/modules/voodoo-sound.ko (eg rename voodoo-sound.bak)
Install Clemsyn-Blades OC kernel
Everything should be fine, voodoo-sound enabled in kernel
Click to expand...
Click to collapse
Forgive my noobness but how do you mount /system in read/write mode instead of read only ?
I tried mount -o rw,remount -t ext4 /dev/block/mmcblk0p1 /system while in root in an adb shell but it screwed the tablet, shut it down and turned it in bootloop...
Can someone script the correct method please ?
Thx
mathmath5151 said:
From the dev's forum :
Forgive my noobness but how do you mount /system in read/write mode instead of read only ?
I tried mount -o rw,remount -t ext4 /dev/block/mmcblk0p1 /system while in root in an adb shell but it screwed the tablet, shut it down and turned it in bootloop...
Can someone script the correct method please ?
Thx
Click to expand...
Click to collapse
This is what I use (because I don't want to try to get all the -o options right, only the ones I know for certain):
$su
# mount -o rw,remount /system
// and after changes
# sync
# mount -o ro,remount /system
# exit
$ exit
...
Hopefully that'll work OK for you. I'm talking about doing this from within terminal emulator, although I'm sure it's the same from adb shell. I just tried it again to be sure.
The idea is that since it's just a change in how it's mounted, it knows everything about how it's mounted already, so just tell it to change the ro/rw flag and to remount. You can see a lot of flags if you just type in # mount | grep system, but entering them correctly and in sequence might be another story.
Good luck -
Disregard
Sent from my Transformer TF101 using Tapatalk
It worked, thanks
Well, method for noobs : use root explorer application
Sent from my Transformer TF101

INT2EXT

i want to use INT2EXT in cm9 i followed this tutorial
xpmode said:
INT2EXT+ INSTALLATION TUTORIAL
IF YOU ALREADY HAVE S2E, LINK2SD OR SIMILAR, YOU MUST REPARTITION SD CARD AND FACTORY WIPE
int2ext+ is a relatively new script that instead of making symbolic links(Link2SD) or moving certain partitions(S2E) to sd, extends your internal storage into your ext partition in sd, which means S2E's potential space saving and Link2SD's stability combined together and gives you something to brag about.
PREPARATIONS
Download the latest build of CyanogenMod 9.
Download the latest version of CronMod INT2EXT+ here.
Open CyanogenMod 9 zip.
Navigate to /system/etc/init.d
Open INT2EXT+ zip.
Navigate to /system/etc/init.d
Add the file called 40int2ext in the /system/etc/init.d directory in CM9 zip.
INSTALLATION
Go to recovery, do factory reset and advanced > partition sd card.
Select 1024M for ext(for some reason, I selected 4096 and it only read the first 1GB-ish) and 0M for swap.
Wait until it says Done and goes to menu.
Go to Mounts and Storage.
Select USB storage and connect your phone to your computer.
Copy your modified CM9 zip file to the root of your sd.
Select unmount.
Reflash ROM.
Reboot.
After reboot, go to settings > developer settings > root access and select Apps and ADB.
Go to your adb directory and do adb shell.
Type su.
Then do:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/etc/init.d
chmod 644 00banner
chmod 644 90userinit
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
Reboot.
After reboot, reboot into recovery and flash gapps.zip normally.
Then go to Applications and enjoy your new, extended internal storage.
Click to expand...
Click to collapse
can someone help me how to do adb shell and go to adb directory
Use the directory that you used to root your device.
Hpsgill said:
can someone help me how to do adb shell and go to adb directory
Click to expand...
Click to collapse
Err, now that's funny. To do adb shell, all you have to do is put in the command adb shell
Isn't that funny? xD
What the guide meant for adb directory is the place where the adb.exe file is kept.
So all you have to do is put in cmd:
adb shell
and while you're in shell you just put in those commands:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/etc/init.d
chmod 644 00banner
chmod 644 90userinit
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
After that to close the terminal, type in:
exit
then adb reboot
Hope that helps =)
Chaosgod27 said:
Err, now that's funny. To do adb shell, all you have to do is put in the command adb shell
Isn't that funny? xD
What the guide meant for adb directory is the place where the adb.exe file is kept.
So all you have to do is put in cmd:
adb shell
and while you're in shell you just put in those commands:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/etc/init.d
chmod 644 00banner
chmod 644 90userinit
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
After that to close the terminal, type in:
exit
then adb reboot
Hope that helps =)
Click to expand...
Click to collapse
Thanks
No worries =)
Chaosgod27 said:
No worries =)
Click to expand...
Click to collapse
can u tell me how to use other scripts eg apps2sd,link2sd and their works
Hmm, if you want. Right now I'm a bit busy with work...
Chaosgod27 said:
Hmm, if you want. Right now I'm a bit busy with work...
Click to expand...
Click to collapse
Anytime ,when u r free or pm me
Sent from my HTC Explorer A310 using xda premium
What did you want to know about them? You want to know how to install them or?
Chaosgod27 said:
What did you want to know about them? You want to know how to install them or?
Click to expand...
Click to collapse
Every thing about there scripts I never partation my memory card
Sent from my HTC Explorer A310 using xda premium
Chaosgod27 said:
Err, now that's funny. To do adb shell, all you have to do is put in the command adb shell
Isn't that funny? xD
What the guide meant for adb directory is the place where the adb.exe file is kept.
So all you have to do is put in cmd:
adb shell
and while you're in shell you just put in those commands:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/etc/init.d
chmod 644 00banner
chmod 644 90userinit
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
After that to close the terminal, type in:
exit
then adb reboot
Hope that helps =)
Click to expand...
Click to collapse
Hmmm, you don't need adb for this. Just use terminal emulator on your phone. It comes installed by default on CM9 roms. Or you can search play store for android terminal emulator. The app is by Jack Palevich
Code:
su
mount -rwo remount /system
cd /system/etc/init.d
chmod 644 00banner
chmod 644 90userinit
mount -ro remount /system
Then again, I don't really see why it is necessary to deny execute permissions to these scripts in first place. They are just empty shells - unless they have been modified.
I'm using int2ext4 right now and never really had to...
EDIT: If you want to reverse these changes then
Code:
su
mount -rwo remount /system
chmod -R 755 /system/etc/init.d
mount -ro remount /system
Hpsgill said:
can u tell me how to use other scripts eg apps2sd,link2sd and their works
Click to expand...
Click to collapse
Script details:
a2sd,a2sd+,a2sd++,d2ext,d2ext+,int2ext,int2ext+,int2ext4,int2ext4+ --- forum.xda-developers.com/showthread.php?t=1716124
mount2sd --- forum.xda-developers.com/showthread.php?t=1342387
As of link2sd it uses installrecovery.sh file in /system/etc to mount sd-ext partition. It then moves apps/data/dalvik-cache to sd-ext and places symlinks at the original locations.
Take a look here where i've explained why symlink based apps/scripts should not be used on HTC explorer.
Hit thanks if i helped!:good::good:
sabaatworld said:
Script details:
a2sd,a2sd+,a2sd++,d2ext,d2ext+,int2ext,int2ext+,int2ext4,int2ext4+ --- forum.xda-developers.com/showthread.php?t=1716124
mount2sd --- forum.xda-developers.com/showthread.php?t=1342387
As of link2sd it uses installrecovery.sh file in /system/etc to mount sd-ext partition. It then moves apps/data/dalvik-cache to sd-ext and places symlinks at the original locations.
Take a look here where i've explained why symlink based apps/scripts should not be used on HTC explorer.
Hit thanks if i helped!:good::good:
Click to expand...
Click to collapse
thanks maaaaaan!!!
where is the adb directory?? do we have to install it in our pc or its there in our explorer?
Sent from my HTC Explorer A310e using xda premium
everything i did went well and i checked the internal memory its shows 850mb ... now the problem is when i type adb shell in terminal its say error:device not found ... so what should i do ???

Categories

Resources