[SCRIPT]Remount rw - myTouch 3G Slide Android Development

Credit to:
flactemnad - http://android.modaco.com/content/htc-hero-hero-modaco-com/295691/easy-system-remount-script/
The point of this: Save yourself the mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 command ..
-- Little buggy on the remount state command not working ... but the remount rw and remount ro do definietly change the state of /system.
Extract the file from the .rar archive.
Get yourself into your clockwork recovery then mount system from the partitions menu and then do as follows from command prompt on the computer...
adb push remount /system/bin
adb shell chmod 775 /system/bin/remount
adb reboot
Should be all set...
Would be awesome to see this in more roms... just handy... that's all...
going to work on a reboot recovery script so that from adb shell we can reboot recovery...
Edit: BTW you can remount ro or remount rw ... Forgot to attatch the file haha; next post.

rar file included

I'm confused, what is this for? I mean, I understand the idea, but I'm not sure if you're aware of the fact that you cannot ACTUALLY write to the protected NAND portions even if you force Linux to let you remount it 'rw'. Try remounting it and writing a file - it will tell you you're out of space. Then look in 'dmesg' at all of the NAND write errors.
This will also be the case for the other MTDs as well. Sorry bud.

nbetcher said:
I'm confused, what is this for? I mean, I understand the idea, but I'm not sure if you're aware of the fact that you cannot ACTUALLY write to the protected NAND portions even if you force Linux to let you remount it 'rw'. Try remounting it and writing a file - it will tell you you're out of space. Then look in 'dmesg' at all of the NAND write errors.
This will also be the case for the other MTDs as well. Sorry bud.
Click to expand...
Click to collapse
Yeah, I don't really get it either...

then put it in your sbin on clockwork so you can use it from recovery w/o having to ADB ...
Remount on the go is the idea.
it's helpful for me when i try to overwrite/replace some of the apps that are preinstalled on roms...
for example theres a twitter.apk on one of the roms that I had to replace to get transparent widget... so remount rw and then replace it ;p

Im lost... does the script allow you to mount the system folder as writable while the device is on?
Hmmm... nevermind. Stupid question. I get it now. We need amon ra to port his old recovery so these will be useful.

Someone should ask koush if console can be added.
Sent from Android

no they shouldn't... someone should just add it themselves.

Related

android adb push read-only file system error ??

Hi,
I am trying to alter the boot xml file to get my boot sound back. I am on Modaco 2.5.1 now.
Pulled the boot sound xml file, edited. But when I try push back to phone I get the 'android adb push read-only file system' message.
How do I get round this?
Thanks
Phil
Phil_UK said:
Hi,
I am trying to alter the boot xml file to get my boot sound back. I am on Modaco 2.5.1 now.
Pulled the boot sound xml file, edited. But when I try push back to phone I get the 'android adb push read-only file system' message.
How do I get round this?
Thanks
Phil
Click to expand...
Click to collapse
Do a adb remount before doing the push should solve it.
Thanks
That solved it!
Phil
i'm having the same error when i want to delete stock apps. i'm rooted already, but not sure how to get myself to read write rights. any idea?
Get around read-only
I am having the same problem. Have you had any luck??
woowoowooty said:
I am having the same problem. Have you had any luck??
Click to expand...
Click to collapse
adb remount
"remount failed: Operation not permitted"
you cant do it while in recovery,you have to be booted up.
EXAMPLE to remove Sim Toolkit
adb remount
remount successful
adb shell rm /system/app/Stk.apk
Done...
If you still have problems type adb shell, type su,press allow on your phone screen then try again.
If it shows a $ sign when u type adb shell then u got no root son
................ delete post. ....
sorry but i am quite new to android and rootin... can u please tell me what is recovery and what is boot up.. cause i am facing teh same issue and when i try adb remount from my command prompt, i get permission denied error . Can this also be done from terminal emulator in android.. my device is rooted and i have superuser permission..
thanks in advance,
Rejo
rejo_nazi said:
sorry but i am quite new to android and rootin... can u please tell me what is recovery and what is boot up.. cause i am facing teh same issue and when i try adb remount from my command prompt, i get permission denied error . Can this also be done from terminal emulator in android.. my device is rooted and i have superuser permission..
thanks in advance,
Rejo
Click to expand...
Click to collapse
You can try it in terminal emulator after su.
Code:
$ su
# mount -o rw,remount /system
<do what you want>
# mount -o ro,remount /system
thanks for the information!
Hi.
Samsung Galaxy Ace - FroYo 2.2.1 - Rooted with superuser.
Pulled framework.jar from /system/framework/framework.jar
edited it and now pushing back.
I get
failed to copy 'framework.jar' to '/system/framework/framework.jar': Read-only file system.
I know it's a read-only file system, but I need to push that (and other files) back there.
How to allow that process?
My other option is to "FLASH" a .zip file which contains these files, and I think that puts them in their desired location, but:
What is Flashing and how is it done on my device? I've been googling for a couple hours now with no luck. Adobe Flash is taking all the search results, and some found forum entries aren't helping.
Many thanks, I hope for a quick reply.
Hi, same problem trying to push some libs and framework.jar back to where they originally pulled from. I need to do that for Arabization on Samsung Galaxy Ace running Froyo 2.2.1 with Root.
Error returs "failed: read-only file system"
I've beek googling and searching forums for a couple days now with no luck. Tried many things, commands and chmod which all failed.
The other option, which is to use update.zip on stock recovery to send the files home has failed. Got the following:
Finding update package...
Opening update package...
Installing upate...
E:Error in /sdcard/update.zip (Status 0)
Installation aborted.
I couldn't install ClockworkMod to try it there because Rom Manager does not list my phone (Samsung Galaxy Ace) in the options it gives me when I ask it to Flash ClockworkMod Recovery into my phone. I don't know which phone to choose form the list:
- Huawei Pulse Mini
- Dell Streak
- Huawei Pulse
- Commtiva Z71 (Boston, blaze, and more)
- Geeksphone ONE
- Spice MI700, Commtiva Link N700 and more)
- Huawei Ascend
Halp.
Oh just noticed I have both last posts. How progress works.
By the way,
#mount -o rw,remount /system
does not help. Trying to copy files using 'cp' commant in shell now simply brings 'file exists'. Is there an 'overwrite' attribute to add that'll fix it?
adb remount worked for me thanks..
pigfoot said:
You can try it in terminal emulator after su.
Code:
$ su
# mount -o rw,remount /system
<do what you want>
# mount -o ro,remount /system
Click to expand...
Click to collapse
champagne post. tnx!!!
pigfoot said:
You can try it in terminal emulator after su.
Code:
$ su
# mount -o rw,remount /system
<do what you want>
# mount -o ro,remount /system
Click to expand...
Click to collapse
Worked for me, thank you!

installing root, flash_image permission denied

going through the entire 1.5 to 2.1 root tutorial to a tee, but once i get to the recovery image, this happens (following is an entire copy/paste of what I went through, incase i did something wrong before i hit the point)
Code:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Lemcott>cd C:\android-sdk-windows\tools
C:\android-sdk-windows\tools>adb shell mount -o rw,remount /dev/block/mtdblock3
/system
adb server is out of date. killing...
* daemon started successfully *
C:\android-sdk-windows\tools>adb shell mount -o rw,remount /dev/block/mtdblock3
/system
C:\android-sdk-windows\tools>adb push recovery.img /sdcard
1192 KB/s (3926016 bytes in 3.215s)
C:\android-sdk-windows\tools>adb push flash_image /system/bin/flash_image
448 KB/s (9640 bytes in 0.021s)
C:\android-sdk-windows\tools>adb shell flash_image recovery /sdcard/recovery.img
flash_image: permission denied
C:\android-sdk-windows\tools>
EDIT: I am a complete ass hat. nothing to see here, move a long. mods delete this if you please.
P.S. Everyone else: ALWAYS DOUBLE CHECK BEFORE POSTING FOR HELP. *ahem* now be on your way.
try programming thru fastboot. press call + vol down and select the fastboot option and use this command from the pc
fastboot flash recovery recovery.ing
Sent from my Evil Eris v1.1 using the XDA mobile application powered by Tapatalk
It looks like you forgot the step where you modify the flash_image's permissions
Code:
adb shell chmod 755 /system/bin/flash_image
I had the same thing but I just kept reentering
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push recovery.img /sdcard
adb push flash_image /system/bin
and after maybe 4 iterations it worked.
I have a very simular problem:
(moto droid with android 2.1)
$su
su
Permission denied
Click to expand...
Click to collapse
I have try to use chmod the file but it said permission denied on chmod... please help T_T
note this is rooted, of course, when i'm in the phone type su, it'll pop up ask for me to allow or not, allowed, everything seems fine, but when i try to modify files in /system/etc/wifi (trying to make it work for ad hoc) it said permission denied....(even in su???) I tried in adb and it's the same, very very frustrating, any help is appreciated, Thanks.
edit: here's what it looks like using chmod...
>adb shell chmod 755 /system
unable to chmod /system: Read-only file system
>
Click to expand...
Click to collapse
penthoy said:
I have a very simular problem:
(moto droid with android 2.1)
I have try to use chmod the file but it said permission denied on chmod... please help T_T
note this is rooted, of course, when i'm in the phone type su, it'll pop up ask for me to allow or not, allowed, everything seems fine, but when i try to modify files in /system/etc/wifi (trying to make it work for ad hoc) it said permission denied....(even in su???) I tried in adb and it's the same, very very frustrating, any help is appreciated, Thanks.
edit: here's what it looks like using chmod...
Click to expand...
Click to collapse
make it read/write
penthoy said:
I have a very simular problem:
(moto droid with android 2.1)
I have try to use chmod the file but it said permission denied on chmod... please help T_T
note this is rooted, of course, when i'm in the phone type su, it'll pop up ask for me to allow or not, allowed, everything seems fine, but when i try to modify files in /system/etc/wifi (trying to make it work for ad hoc) it said permission denied....(even in su???) I tried in adb and it's the same, very very frustrating, any help is appreciated, Thanks.
edit: here's what it looks like using chmod...
Click to expand...
Click to collapse
I wouldn't try to flash anything you find here to a Moto Droid.
This is for the HTC Droid Eris.
Otherwise, and if I'm misunderstanding you, good luck with your problem.
archmagus said:
It looks like you forgot the step where you modify the flash_image's permissions
Code:
adb shell chmod 755 /system/bin/flash_image
Click to expand...
Click to collapse
I've been bashing my head in ALL day trying to get past this and finally found this thread! This worked perfectly!
theboo7 said:
make it read/write
Click to expand...
Click to collapse
How should i make is read/write?????
i cant get it to work at all.. need help plz.
Hello Guys
why cant i mount that **** together, i have the root permission, but also i dont..somehow
Code:
Microsoft Windows [version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. Alle rettigheder forbeholdes.
C:\Users\Rasmus H. G. Johnsen>d:
D:\>cd android\tools
D:\android\tools>adb devices
List of devices attached
HT9B7LG00092 device
D:\android\tools>adb shell mount -o rw,remount /dev/block/mtdbloc3 /system
mount: Operation not permitted
D:\android\tools>adb shell
$ ls
ls
sqlite_stmt_journals
cache
sdcard
etc
system
sys
sbin
proc
logo.rle
init.rc
init.goldfish.rc
init.bahamas.rc
init
default.prop
data
root
dev
$ exit
exit
Also if I go on and try to do this:
Code:
D:\android\tools>adb push flash_image /system/bin
failed to copy 'flash_image' to '/system/bin/flash_image': Read-only file system
I know that the flash_image fil and my recovery.img file is in this library and also on my sdcard, but I cant push the gotdamn flas_image file in the /system/bin catalog.
Can some one please help me ?
PS. I have the USB-debugging turned ON.
How do you know that you have root? Or, how did you gain root?
doogald said:
How do you know that you have root? Or, how did you gain root?
Click to expand...
Click to collapse
I have the app called androot from google market, ang i have run it to get root.
wfdi said:
I have the app called androot from google market, ang i have run it to get root.
Click to expand...
Click to collapse
I'm not aware of that app, and cannot find it in the market myself (do you have a link?)
However, one way to check for sure if you truly have root is run the adb command adb shell and, when you get a prompt, type the command "su". If it returns with a "#" prompt (rather than the "$" prompt that you are seeing), then you have root on the phone.
Most people these days root with either jcase's 1click root for eris: https://market.android.com/details?id=net.andirc.erisrooter or they use the procedure here: http://androidforums.com/eris-all-things-root/127861-universal-eris-root-dummies.html
You may be able to use the steps here as well, since you seem pretty comfortable with adb and have that working already: http://androidforums.com/eris-all-things-root/125436-detailed-leak-root-tutorial.html
Guys new I found another solution (tested on u8150)
First make sure that you are rooted first.
Open adb shell
Type in su.
Remount the system partition as read write.
Change the owner of system from root to system via chown root system
the exit the shell and push flash_image to system/
also push clockworkmodrecover.img into the system partion dont forget the last /.
then exit.
use a file manager, I used rootbrowser.apk without a memory card and installed recovery.
with rootbrowser copy flash_image to the bin directory.
don't forget to change the owner back to root to the system partition after you finish with rootexplorer or whatever u use even adb can work.
then the rest follows.
The above works only if your'e rooted and have adb.
Goodluck
haha am a genius Installing ROM +Recover without sdcard on u8150
all you have to do is:-
1. Make sure u have installed clockwork mode recovery on your device and have su binary.
2. Open adb with the device normally on.
3. Remount the data partition as read write using mount remount in adb .
4. use adb and push the cynogenmode.zip or any rom that fits into the data partition using
adb push romname.zip /data/
5. Reboot into clockworkmod recovery using the various options available.
6. This is what to do if you don't have a sdcard.
open adb with phone connected and run
adb shell
mount /data /sdcard
then go back to the main recovery menu and wipe dalvik cache only
then choose update from sdcard
flash your rom and tadaaa.
your'e done.
NB:CAUTION MAKE SURE TO FLASH A ROM THAT DOES NOT WRITE INTO THE DATA PARTION
THIS CAN BE DONE BY LOOKING FOR A FILE CALL UPDATE SCRIPT IN THE zip OF THE ROM U WANT TO INSTALL
Am going to make a post about this later.
Goodluck
Lol, 3 and a half year break between responses.
The problem with flash_image & dump_image is that it doesn't work on devices devices which use emmc (recent phones)and have
mmcblk0
and cat /proc/mtd won't work here either.
This means that you have to use dd to write to this devices.
I wonder how guys determine the partitions to use on such devices, and someone should hint as to what is going on since it seems manufacturers seriously don't want people to exploit their devices.

[Q] How to make Android a read and write system

How can I do this in terminal emulator
iloveandroid said:
How can I do this in terminal emulator
Click to expand...
Click to collapse
adb remount
http://www.pocketmagic.net/?p=757
^tells you how
you pretty much just type "mount -o rw,remount -t yaffs2 /dev/block/mtdblock3", then "chmod 777 /system".
iloveandroid said:
How can I do this in terminal emulator
Click to expand...
Click to collapse
I attached a file called sys. push this file to the bin directory and give it permissions then you can just mount the system by typing "sys -rw" to mount read and write and to mount read only you type "sys -ro"
to push the file and give it permissions :
Code:
adb push sys /system/xbin
adb shell chmod 775 /system/xbin/sys
I like the script because its easier to remember than the long command.
If you want to edit the script just open it in notepad and change what you like.
I got that script from Bugless Beast By Pete and modified it to display my rom info.
Remove the ".txt" from the script I had to put that to be able to upload it.

[Q] How can I mount /system as writeable in adb shell?

I thought I'd bricked my NT but it would appear that it is actually alive because it turns up with adb and I can get shell and then issue command su, but what I can't do is replace the old build.prop because file system is not writable. How do I remount it to be writeable from a shell please?
Thanks!
CelticWebSolutions said:
I thought I'd bricked my NT but it would appear that it is actually alive because it turns up with adb and I can get shell and then issue command su, but what I can't do is replace the old build.prop because file system is not writable. How do I remount it to be writeable from a shell please?
Thanks!
Click to expand...
Click to collapse
mount -o rw,remount -t ext4 /dev/block/mmcblk0p8 /system
Type mount to verify rw, make your changes
mount -o ro,remount -t ext4 /dev/block/mmcblk0p8 /system
Type mount to verify ro
Thank you!
hwong96 said:
mount -o rw,remount -t ext4 /dev/block/mmcblk0p8 /system
Type mount to verify rw, make your changes .....
Click to expand...
Click to collapse
I don't have this tablet but a phone with similar problem.
this does not work for me, although I have ROOTED phone MTK6572, android 4.2.2 ;
"/ root" gets RW, but "/system" stays RO.
I get this message:
error
"the item "system" is read only"
I have tried many apps in phone (remount system RW, FX file expl. ....), and mtkdroid-tools and ADB shell in PC.
I have tried many similar version of that command, too, inc. busybox remount. non of those work.
any ideas, what to try next?
what file or thing or item and where I need to change to get this remounting system to RW done?
it is ext4, and remountable.
I have SuperSU in phone but can't update its binaries: /system stays RO, what ever I try...
I can't change audios, anything in /system.
very annoying...
Jack_Rover said:
I don't have this tablet but a phone with similar problem.
this does not work for me, although I have ROOTED phone MTK6572, android 4.2.2 ;
"/ root" gets RW, but "/system" stays RO.
I get this message:
error
"the item "system" is read only"
I have tried many apps in phone (remount system RW, FX file expl. ....), and mtkdroid-tools and ADB shell in PC.
I have tried many similar version of that command, too, inc. busybox remount. non of those work.
any ideas, what to try next?
what file or thing or item and where I need to change to get this remounting system to RW done?
it is ext4, and remountable.
I have SuperSU in phone but can't update its binaries: /system stays RO, what ever I try...
I can't change audios, anything in /system.
very annoying...
Click to expand...
Click to collapse
I understand your frustration, however, you should try to post your question to the MTK6572 or Samsung S4 thread. Anyway, since you have asked I'll answer. The mount point for /system is different on each phone model. There is no one standard /system mount point. On the Nook Tablet and Nook Color it is mmcblk0p8. On your device it is different, so the command you tried will not work.
You need to find out what the /system mount point is for your phone.
Open terminal from phone and type su.
Press enter.
At the # prompt type cat /proc/mtd
Press enter.
Look at the output on the screen and see what the mount point is for /system.
A the the # prompt type mount -o rw,remount -t ext4 /dev/block/enteryoursystemmountpointhere /system
Note: replace enteryourmountpointhere with your mount point from the previous step.
Change /system to ro when done. Hope this works for you.
Also download root checker app to ensure you rooted properly.
hwong96 said:
I understand your frustration, however, you should try to post your question to the MTK6572 or Samsung S4 thread. ......
Click to expand...
Click to collapse
thanks for your responce.
with that "cat ..." I got : "no such file or dir"...
I know already that my mnt point is (did try already these earlier):
mount -o rw,remount /dev/block/mmcblk0p4 system
mount -o remount,rw -t ext4 /[email protected] /system
but no success, " system read only" stays, and no change.
Jack_Rover said:
thanks for your responce.
with that "cat ..." I got : "no such file or dir"...
I know already that my mnt point is (did try already these earlier):
mount -o rw,remount /dev/block/mmcblk0p4 system
mount -o remount,rw -t ext4 /[email protected] /system
but no success, " system read only" stays, and no change.
Click to expand...
Click to collapse
Did you use the root checker app to verify for proper root?
hwong96 said:
Did you use the root checker app to verify for proper root?
Click to expand...
Click to collapse
yes.
I have many apps (e.g. FX, ATools, TitaniumBup, busybox, ES, mount /system rw, SD maid, root expl., adbd insec., rootAppDel, a.s.o.) that use root rights, and phone's superSU gives the rights to them.
AT:s terminal has # prompt, so it must be root. (?)
adbd insecure's current status = binary: insecure; usb debugging: enabled.
I have earlier version SU's binaries working ok, but updating SU made this binary-update-issue: " binary update failure" and so SU-app won't open (it closes after failing binary update), though otherwise it works ok (and worked earlier until I did let G-play to update it, silly me!).
somehow my /system has been "open" i.e. RW earlier, since busybox and superSU has been installed, but now it is "stuck" to that RO-status. "/" opens, but "/system" not.
MTK Droid Root & Tools v2.5.3 (from here xdadevs) gets root shell ok, but fails when trying to install SU, busybox a.s.o. ("read-only system") - and it "crashes".
maybe kernel related? or boot loader, or .... what?
-----
btw, my apologises, that I wrote this issue to this thread, but I found my "problem" here with the search, and after posting I realized that this is "tablet area..."
so this part can be moved to better place by those who know best where to - though not to trash, anyway....
Jack_Rover said:
yes.
I have many apps (e.g. FX, ATools, TitaniumBup, busybox, ES, mount /system rw, SD maid, root expl., adbd insec., rootAppDel, a.s.o.) that use root rights, and phone's superSU gives the rights to them.
AT:s terminal has # prompt, so it must be root. (?)
adbd insecure's current status = binary: insecure; usb debugging: enabled.
I have earlier version SU's binaries working ok, but updating SU made this binary-update-issue: " binary update failure" and so SU-app won't open (it closes after failing binary update), though otherwise it works ok (and worked earlier until I did let G-play to update it, silly me!).
somehow my /system has been "open" i.e. RW earlier, since busybox and superSU has been installed, but now it is "stuck" to that RO-status. "/" opens, but "/system" not.
MTK Droid Root & Tools v2.5.3 (from here xdadevs) gets root shell ok, but fails when trying to install SU, busybox a.s.o. ("read-only system") - and it "crashes".
maybe kernel related? or boot loader, or .... what?
-----
btw, my apologises, that I wrote this issue to this thread, but I found my "problem" here with the search, and after posting I realized that this is "tablet area..."
so this part can be moved to better place by those who know best where to - though not to trash, anyway....
Click to expand...
Click to collapse
Don't know what else to suggest, except maybe contact Chainfire on G+.
.

[Help]Cant remount to push framework mod.

Hi!
I tried to mode framework to get % battery display (circle), but i cant push it back to /system/framework folder because i cant remount. I got this error:
E:\android-sdk-windows\platform-tools>adb remount
remount failed: Operation not permitted.
Here is framework mod, hope it works.
Warning: im not try it yet so i dont know it causes bootloop or not.
http://www.mediafire.com/?wrhaaayku2rvmvv
I want to use push command so that the framework-res.apk will have correct permission after push back to system.
OK! Dont try it. I just replaced new mod framework, new icons with %battery show in statusbar, but got bootloop. May be problem with permission?
Now, how to restore stock one?
keunhuvac said:
Hi!
I tried to mode framework to get % battery display (circle), but i cant push it back to /system/framework folder because i cant remount. I got this error:
E:\android-sdk-windows\platform-tools>adb remount
remount failed: Operation not permitted.
Here is framework mod, hope it works.
Warning: im not try it yet so i dont know it causes bootloop or not.
http://www.mediafire.com/?wrhaaayku2rvmvv
I want to use push command so that the framework-res.apk will have correct permission after push back to system.
Click to expand...
Click to collapse
push it to sdcard, then do this:
Code:
adb shell
$ su
# mount -o rw,remount /dev/block/mmcblk0p12 /system
# dd if=/sdcard/my_file_to_push of=/system/my_destination_file_location
# sync
I used this:
adb shell
su
mount -o remount rw /system
cp /sdcard/download/framework-res.apk /system/framework
Now need to flash preroot image to get phone works?
I found this:
E:\android-sdk-windows\platform-tools>adb root
adbd cannot run as root in production builds
keunhuvac said:
I used this:
adb shell
su
mount -o remount rw /system
cp /sdcard/download/framework-res.apk /system/framework
Now need to flash preroot image to get phone works?
Click to expand...
Click to collapse
no need, after you pushed the file to framework, you may restart your phone.
I recommend using dd as you do not have a risk of setting the wrong file permissions.

Categories

Resources