I have been trying for hours now to remount the /system partition rw using terminal emulator with no luck. I can do it just fine using root explorer, but thats not what im after. Im trying to make it so that system is mounted rw on boot. But every command i have known to work in the past, and every one i found thru googling has not worked. The command finishes with no errors, but /system is still ro. I even went as far as to unpack the boot img and change /system to be rw on mount. But again when i boot up /system is still ro. Its like something is protecting it or remounting it ro again. By editing the boot.img i was able to mount the root directory (/) rw on boot, but doing the same edit to the /system mount point seems to have no effect. Anyone know what im missing here? I am s-off, unlocked, i have an insecure boot.img, i have root, i dont know how much more insecure my phone could be. If root explorer and other apps are able to do it, there has to be a way to do it thru a shell.
cmlusco said:
I have been trying for hours now to remount the /system partition rw using terminal emulator with no luck. I can do it just fine using root explorer, but thats not what im after. Im trying to make it so that system is mounted rw on boot. But every command i have known to work in the past, and every one i found thru googling has not worked. The command finishes with no errors, but /system is still ro. I even went as far as to unpack the boot img and change /system to be rw on mount. But again when i boot up /system is still ro. Its like something is protecting it or remounting it ro again. By editing the boot.img i was able to mount the root directory (/) rw on boot, but doing the same edit to the /system mount point seems to have no effect. Anyone know what im missing here? I am s-off, unlocked, i have an insecure boot.img, i have root, i dont know how much more insecure my phone could be. If root explorer and other apps are able to do it, there has to be a way to do it thru a shell.
Click to expand...
Click to collapse
Try this:
Create an executable script - like this one:
Code:
#!/system/bin/sh
# Make system rw
chmod 666 /system;
mount("ext4", "EMMC", "/dev/block/mmcblk0p35", "/system");
Save it in your storage location as systemmount (or whatever).
Open terminal, type su.
Type:cd /sdcard/
Type: systemmount
Exit and see if that works. I have not tested it.
Thanks but no luck
Code:
exec /system/bin/sh '/storage/emulated/legacy/Download/scripts/00remount'
/Download/scripts/00remount' <
Unable to chmod /system: Read-only file system
/storage/emulated/legacy/Download/scripts/00remount[4]: syntax error: '"ext4",' unexpected
Put the mount first before chmod. Delete ext4 and emmc
Sent from my Lunar Ecliptic One.
Thanks, but i figured it out. It turns out the command i had used in the first place was correct. (mount -o remount,rw /system). After i ran the command i would check with root explorer to see if it worked, and it always showed it did not. But when you check it the correct way, the way i shoukd have been in the first place, by typing 'mount' in terminal it shows it did indeed get remounted rw. So its an issue with root explorer, not with the command i was using.
Incidently if you do the command 'mount' without su permission, it shows sysyem as ro, but if you do it under an su prompt it shows it as rw.
cmlusco said:
Thanks, but i figured it out. It turns out the command i had used in the first place was correct. (mount -o remount,rw /system). After i ran the command i would check with root explorer to see if it worked, and it always showed it did not. But when you check it the correct way, the way i shoukd have been in the first place, by typing 'mount' in terminal it shows it did indeed get remounted rw. So its an issue with root explorer, not with the command i was using.
Incidently if you do the command 'mount' without su permission, it shows sysyem as ro, but if you do it under an su prompt it shows it as rw.
Click to expand...
Click to collapse
Nice work.
Sent from my Lunar Ecliptic One.
Related
I'm trying to remove some of the stock apps on my Hero, including Rosie (Sense UI) and such. What mode do I boot in before doing this?
I know all of the steps to remove apps using adb (at least I think I do), I'm fully rooted, etc. But I can't seem to get it to work.
This is the command I'm using in adb
Code:
# rm /system/app/something.apk
(replacing something.apk with the actual apk name of course)
When I boot in Recovery, it says "File not found". When I boot in Fastboot, I can't connect to adb it seems. And when I boot into Android, it says "rm failed for something.apk, Read-only file system"
So am I missing a step? What should I be doing differently?
Boot into recovery, then do a "mount -a" to mount the filesystems.
marinierb said:
Boot into recovery, then do a "mount -a" to mount the filesystems.
Click to expand...
Click to collapse
It doesn't seem to work, here's the output:
Code:
C:\asdk\tools>adb devices
List of devices attached
HT9ALNT00557 recovery
C:\asdk\tools>adb shell
/ # mount -a
mount -a
mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: No such file or direc
tory
/ #
Thanks for the reply though.
Edit: Got it working, typing in "mount" alone without the -a switch worked Thanks marinierb
in normal mode you cold have just done
adb remount
adb rm /system/app/something.apk
garok89 said:
in normal mode you cold have just done
adb remount
adb rm /system/app/something.apk
Click to expand...
Click to collapse
That doesn't seem to work for me. This is what it outputs:
Code:
remount failed: Operation not permitted
If you can't remount it doesn't sound like you've rooted.
callummr said:
If you can't remount it doesn't sound like you've rooted.
Click to expand...
Click to collapse
I've performed other operations that would normally require it, so I should be rooted.
Is there a way I can confirm if it's properly rooted or not?
shell prompt:
$ .. no root
# .. root
..try typing "su" once in the shell (abd shell or adb-windows.exe shell) and see what it brings up
~David said:
It doesn't seem to work, here's the output:
Code:
C:\asdk\tools>adb devices
List of devices attached
HT9ALNT00557 recovery
C:\asdk\tools>adb shell
/ # mount -a
mount -a
mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: No such file or direc
tory
/ #
Thanks for the reply though.
Edit: Got it working, typing in "mount" alone without the -a switch worked Thanks marinierb
Click to expand...
Click to collapse
typing only "mount" just list the mounted partitions, it will not mount anything. if your partition is ext4 you need to downgrade it to ext2 or ext3 or set the testflag, see "if you're having issues with ext4" in the first post of the recovery image thread.
Make sure you have run a Nandroid backup first so that if you accidentally remove something important.
Boot into normal mode. (full GUI)
Then:
Code:
C:\ADB MOUNT
C:\ADB SHELL
# rm /system/app/something.apk
reboot
You have to reboot at the end so that the apps are taken out of RAM, you may get FC (errors) if you try to do stuff after removing the apps before rebooting.
I removed (actually moved) *Twit*, Stock*, Launcher*, and a few other things.
HTH,
Unconn
I have searched the Evo 4g forums, and I am finding it difficult to verify NAND is unlocked/if I am fully rooted. I can confirm that I have partial root. I flashed the latest version of FRESH 1.0.1 with RADIO: 2.05.00.06.10 and WiMax Radio 25641. I also flashed netarchy-toastmod 'fix' for Epson AND Nova - Version 3.6.4 to increase my FPS. Everything seems to work ok.
I did find one post that stated I can run "adb remount rw" in a terminal emulator to check if I am unlocked. The emulator has su access, but I get an access denied and I can not create a folder in the system directory.
Is there an easy method for me to check if NAND is unlocked/if I am fully rooted? Thanks for the help.
Kurt
Unlocked NAND gives access to the system partition as far as I understand. From the shell, run.
Code:
mount
Find what device is your system partition. Should be something like /dev/block/mtdblock4. Then try this.
Code:
mount -o rw,remount -t yaffs2 /dev/blco/mtdblock4 /system
That will remount your system partition into read/write mode. If that works your NAND is unlocked. You can remount your system partition back into read only mode by changing the rw to ro and running the command again.
Thanks
It took me a few minutes to figure this out, but it looks like I am fully rooted.
I opened terminal emulator on my phone then typed the following:
su
<enter>
mount
<enter>
I big list of things appeared, and I saw what you were referencing. The line reads the following:
/dev/block/mtdblock4 /system yaffs2 ro 0 0
If I understand correctly the system partition is in "ro" or read only. I then typed what you wrote. I think you had a typo because it errored out. I typed the following:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock4 /system
<enter>
I then typed the following:
mount
<enter>
The line in the list now reads the following:
/dev/block/mtdblock4 /system yaffs2 rw 0 0
The "rw" means that I have read/write access to the system partition. I then typed the following to change it back to "read only".
mount -o ro,remount -t yaffs2 /dev/block/mtdblock4 /system
<enter>
mount
<enter>
The line now reads the following:
/dev/block/mtdblock4 /system yaffs2 ro 0 0
I am now back in read only mode, and this verified that I have full root access. If my reasoning is wrong, please let me know, and I will edit this post.
Hopefully, this will help others determine whether or not they are fully rooted.
Thanks for your help.
Kurt
Everything in you post looks correct. Using the 'adb remount' command acomplishes the same thing but your rom has to support it and most don't because they are based off the stock sprint rom.
So just to reiterate, just because 'adb remount' doesn't work on your rom doesn't necissarily mean you don't have nand unlocked. There are also some tools like 'spare parts' you can use to remount your system partition from within the gui.
The easiest way is to determine which HBOOT version you have installed. Full root means you hane NAND unlocked which allows you to do anything.
79.00 = locked
76.20 = unlocked
Reboot and upon startup hold down the volume down and power buttons at the same time until the white screen appears. HBOOT version will be listed at the top in green letters I believe
i'm new to adb. i finally got it working. the correct string is added to Path, it's in my root directory C:\. i'm able to list my device, list directories, and even push/pull (did test to sdcard). i cannot, however, mount the /system directory to r/w.
this is what's happening
C:\android\android-sdk_r06-windows\android-sdk-windows\tools> adb remount
remount failed: Invalid argument
i'm in recovery trying to do this. anyone know what's going on or can maybe lend some help? thank you
mrvirginia said:
i'm new to adb. i finally got it working. the correct string is added to Path, it's in my root directory C:\. i'm able to list my device, list directories, and even push/pull (did test to sdcard). i cannot, however, mount the /system directory to r/w.
this is what's happening
C:\android\android-sdk_r06-windows\android-sdk-windows\tools> adb remount
remount failed: Invalid argument
i'm in recovery trying to do this. anyone know what's going on or can maybe lend some help? thank you
Click to expand...
Click to collapse
if you do not have a rooted, NAND unlocked, phone, you will not be able to mount /system
timothydonohue said:
if you do not have a rooted, NAND unlocked, phone, you will not be able to mount /system
Click to expand...
Click to collapse
it is rooted and NAND unlocked lol
i was actually able to push but not where i wanted.
i did
adb push com.htc.resources.apk /system/framework
but that's not where it needs to go
so i then did
adb push com.htc.resources.apk /system/framework/
and it says /system/framework is a directory, which i know lol that's where i need the file to go.
oh yeah, and i got it mounted as r/w. so now i'm just having trouble getting the file where it needs to be with the whole "is a directory" error instead of it actually pushing the file. still unable to pull a file from that location, though.
try writing the filename. it 'should' append it automatically, but if not then try
adb push com.htc.resources.apk /system/framework/com.htc.resources.apk
timothydonohue said:
try writing the filename. it 'should' append it automatically, but if not then try
adb push com.htc.resources.apk /system/framework/com.htc.resources.apk
Click to expand...
Click to collapse
this will prob work but...
now i'm getting "error: more than one device and emulator"
edit: i'm going to reboot and start all over. not sure how to kill it off since this is a little new to me ha
timothydonohue said:
try writing the filename. it 'should' append it automatically, but if not then try
adb push com.htc.resources.apk /system/framework/com.htc.resources.apk
Click to expand...
Click to collapse
this was a successful push, but the file is still not updating so i'm lost now
also, trying to pull this file back out is not working using
C:\android\android-sdk_r06-windows\android-sdk-windows\tools>adb pull /system/fr
amework/com.htc.resources.apk com.htc.resources.apk
remote object '/system/framework/com.htc.resources.apk' does not exist
edit: this is what i'm looking at
C:\android\android-sdk_r06-windows\android-sdk-windows\tools>adb shell mount -o
rw, remount /dev/block/mtdblock3 /system
adb server is out of date. killing...
* daemon started successfully *
BusyBox v1.15.3 (2010-02-06 17:13:19 CET) multi-call binary
Usage: mount [flags] DEVICE NODE [-o OPT,OPT]
Mount a filesystem. Filesystem autodetection requires /proc be mounted.
Options:
-a Mount all filesystems in fstab
-r Read-only mount
-w Read-write mount (default)
-t FSTYPE Filesystem type
-O OPT Mount only filesystems with option OPT (-a only)
-o OPT:
loop Ignored (loop devices are autodetected)
[a]sync Writes are [a]synchronous
[no]atime Disable/enable updates to inode access times
[no]diratime Disable/enable atime updates to directories
[no]relatime Disable/enable atime updates relative to modification ti
me
[no]dev (Dis)allow use of special device files
[no]exec (Dis)allow use of executable files
[no]suid (Dis)allow set-user-id-root programs
[r]shared Convert [recursively] to a shared subtree
[r]slave Convert [recursively] to a slave subtree
[r]private Convert [recursively] to a private subtree
[un]bindable Make mount point [un]able to be bind mounted
bind Bind a directory to an additional location
move Relocate an existing mount point
remount Remount a mounted filesystem, changing its flags
ro/rw Read-only/read-write mount
There are EVEN MORE flags that are specific to each filesystem
You'll have to see the written documentation for those filesystems
C:\android\android-sdk_r06-windows\android-sdk-windows\tools>adb pull /system/fr
amework/com.htc.resources.apk com.htc.resources.apk
remote object '/system/framework/com.htc.resources.apk' does not exist
/system is under mtdblock4 on our device.
if you need to mount /system as read/writeable from adb, you should just be able to use
adb remount
if you are doing it in shell, use mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
timothydonohue said:
/system is under mtdblock4 on our device.
if you need to mount /system as read/writeable from adb, you should just be able to use
adb remount
if you are doing it in shell, use mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
Click to expand...
Click to collapse
yeah adb remount won't work for me either.
C:\android\android-sdk_r06-windows\android-sdk-windows\tools>adb remount
adb server is out of date. killing...
* daemon started successfully *
remount failed: Invalid argument
i'm going to try mtdblock4
also, if you are having issues with the adb daemon, use
adb kill-server
adb start-server
that'll reboot the adb daemon
timothydonohue said:
also, if you are having issues with the adb daemon, use
adb kill-server
adb start-server
that'll reboot the adb daemon
Click to expand...
Click to collapse
thanks. yeah i started just killing it in task manager
after using "mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system" and trying to pull, i'm still getting /system/framework/com.htc.resources.apk does not exist
yeah, not sure what to tell you then. i can't piddle around in my own, because i'm on cm6, and won't have that.
are you sure it exists?
adb shell
# cd /system/framework
# ls
that will tell you what's in there. if you can't see it, it's not there.
from a brand new shell, (or bounce back up to the root directory)
try
find -name "*resources*.*"
that should tell you every file that contains 'resources' as a part of the file name, and where it is located.
timothydonohue said:
yeah, not sure what to tell you then. i can't piddle around in my own, because i'm on cm6, and won't have that.
are you sure it exists?
adb shell
# cd /system/framework
# ls
that will tell you what's in there. if you can't see it, it's not there.
from a brand new shell, (or bounce back up to the root directory)
try
find -name "*resources*.*"
that should tell you every file that contains 'resources' as a part of the file name, and where it is located.
Click to expand...
Click to collapse
it exists. i navigated to it using root explorer. but according to this, it doesn't exist
C:\android\android-sdk_r06-windows\android-sdk-windows\tools>adb shell
adb server is out of date. killing...
* daemon started successfully *
/ # cd /system/framework
cd /system/framework
/sbin/sh: cd: can't cd to /system/framework
/ #
you can't navigate to the folder if /system isn't mounted. if you just restarted the adb server, then it won't be mounted.
timothydonohue said:
you can't navigate to the folder if /system isn't mounted. if you just restarted the adb server, then it won't be mounted.
Click to expand...
Click to collapse
that was prob the case, can't remember if i re-mounted or not when i was doing that. regardless, i was positively mounted when trying to push/pull and it wasn't working so i guess i'll just have to wait for someone to put it in a flashable zip.
i hate adb
thanks for your help dude
http://psfreedom.com/wiki/index.php?title=OpenDesire4.0.4
http://www.ps3hax.net/showthread.php?p=123003
Im trying to install this recovery so i can jailbreak my PS3, but when i try to use unrEVOked, it hangs while pushing the recovery
When i try to use adb on both my phone and my computer it says i have no space!
what should i do?
EDIT:
fastboot erase recovery
fastboot flash recovery recovery.img
sounds like it would work, bu t i dont want to risk that lol
The no space error will happen if you don't mount system as writable. By default it is set as read only.
Read around to lookup the command to remount system as writable. The command varies depending on your device.
For the motorola droid I used the following:
mount -o remount,rw -t yaffs2 /dev/blockmtdblock4 /system
I think the G1 and other HTC phones use mtdblock3 instead of mtdblock4, but I'm not sure.
SwordOfWar said:
The no space error will happen if you don't mount system as writable. By default it is set as read only.
Read around to lookup the command to remount system as writable. The command varies depending on your device.
For the motorola droid I used the following:
mount -o remount,rw -t yaffs2 /dev/blockmtdblock4 /system
I think the G1 and other HTC phones use mtdblock3 instead of mtdblock4, but I'm not sure.
Click to expand...
Click to collapse
Alright, thats good to know. Ill look around
http://forum.xda-developers.com/showthread.php?t=770663
"You can only write to system on the desire via adb from recovery."
So i do what? boot into recovery, plug in my phone and adb it again?
flash_image recovery image.img?
Hmm, guess not.
I booted into recovery. Plugged my phone in and did an adb devices. It said one device called recovery
i did mount /sdcard (apparently i dont have to mount it to a location)
i cd'd into thte sdcard and did a flash_image recovery psfMod.img and it said i had no space
I was also looking at this
http://forum.xda-developers.com/showthread.php?t=770663
but i still cant get it to work.
do i have to have s-off?
I'm currently trying to use adb to push a ROM to my sdcard on my Verizon Galaxy Nexus. However, it keeps failing due to /sdcard being a read-only filesystem.
When I adb shell into the phone and type mount, i get this (among others):
Code:
/dev/block/mmcblk0p12 on /sdcard type ext4 <ro,relatime,barrier=1,data=ordered>
Attempting to mount /sdcard as read-write is not proving fruitful:
Code:
mount -o remount rw /sdcard
Can anyone help? I'm just trying to get a rom on there so i can install it. Unfortunately, the phone never leaves the google screen when i try to boot, so recovery and fastboot are my only options.
mount -o rw,remount /dev/block/mmcblk0p12 /sdcard
try that
DonDizzurp said:
mount -o rw,remount /dev/block/mmcblk0p12 /sdcard
try that
Click to expand...
Click to collapse
Thanks for the help. It now mounts as rw. However, when i try to
Code:
adb push C:\rom.zip /sdcard/rom.zip
It fails and i get a Fil I/O error.
ttremblay said:
Thanks for the help. It now mounts as rw. However, when i try to
Code:
adb push C:\rom.zip /sdcard/rom.zip
It fails and i get a Fil I/O error.
Click to expand...
Click to collapse
To make things easier, copy the .zip file to the folder where you have ADB then try
adb push ./rom.zip /sdcard/rom.zip
I never could get things to push to sdcard while in recovery mode no matter what I tried.
adb sideload was how I always did I
---------- Post added at 04:52 AM ---------- Previous post was at 04:51 AM ----------
Or maybe instead of using "/sdcard" use "/data/media"?
Hello there, my samsung galaxy s2 i9100's internal sdcard suddenly became read-only shortly after updating it to 4.1. I've tried using the command: ''mount -o remount, rw /sdcard'' which works until i reboot or connect it to an external usb storage device. I'm kindly asking if anyone knows a permanent solution to my problem. P.S- I'm a bit new to this android thing so make your explanations as easy as possible. Please help