system as read/write - G1 Android Development

need a little help here please...
I want for my /system to be mounted as read/write automaticly upon startup of the phone using this command "mount -o,remount rw /dev/block/mtdblock3 /system"
How can i make this command to be executed as ROOT when my phone starts up.
THanks

vtecpower said:
need a little help here please...
I want for my /system to be mounted as read/write automaticly upon startup of the phone using this command "mount -o,remount rw /dev/block/mtdblock3 /system"
How can i make this command to be executed as ROOT when my phone starts up.
THanks
Click to expand...
Click to collapse
Why do you need this?? Just download droidsans andwhen you need read write just use that.

I need it bc im trying to move my apps to my sd card.....if i have the /system in read only mode then the phone crashed when i try to install a new app but it works fine when my /system is read and write

I doubt you need to mount /system rw. Do ls -l in /system and make sure sd has the same owner/permissions as the other dirs and it should work.

vtecpower said:
I need it bc im trying to move my apps to my sd card.....if i have the /system in read only mode then the phone crashed when i try to install a new app but it works fine when my /system is read and write
Click to expand...
Click to collapse
i have followed the instructions in the post titled apps on sdcard and it works fine without mounting the system RW. look at that post and follow those directions.

See: http://forum.xda-developers.com/showpost.php?p=3386761&postcount=2
Just add the line to The File insted of the Path Part.
The is called after system is mounted so it should work fine

Related

modified: Installing & Run application on sdcard

WARNING: Proceed at your own risk, this may damage your phone and/or make it unstable. This is for advanced users only and should only be attempted by those who understand the risks of the following changes
Original post: http://www.androidin.net/thread-1099-1-1.html
AS usual, this is for those WITH ROOT ONLY
Preparation:
1. Installed JF RC30 V1.2 (only if you are using JF RC30 1.2 , this is not compatible with RC8)
2. Make a NANDROID backup (you may get everything back to normal if the phone screw up)
3. A MICRO-SD card with 2 partitions divided : (1) a fat-32 partition, (2) a ext2, you need a linux/mac to format the sdcard with ext2 partition
* the fat 32 will be mounted as sdcard and the ext2 will be mounted as /sd for application data, make your own decision for the size*
4. insert the sdcard with 2 partition on the phone
5. set the phone to aeroplane mode for safe
Procedure:
1. adb pull /system/etc/mountd.conf /*somewhere you may want to back it up*
2. rm -f /system/etc/mountd.conf
3. using the modified mountd.conf, adb push /*the path of modified mount.conf */mount.conf /system/etc/mountd.conf
4. adb pull /system/init.rc /*somewhere you may want to back it up*
5. rm -f /system/init.rc
6. using the modified init.rc, adb push /*the path of modified init.rc*/init.rc /system/init.rc
7. reboot
8. busybox cp -a /data/app /sd/
9. rm -r /data/app
10. ln -s /sd/app /data/app
11. reboot
Now, the phone will install and run everyone on /sd, still mounting /sdcard as usual. It is possible that to mount or unmount /sdcard by usb without everything screwed up. Beware that your sdcard will be used as part of system, removing the sdcard may freeze the phone. If the phone get freeze because of removing the sdcard, plug the sdcard again and soft reset.
It is also possible that copy the application data to another card. If you want to change the sdcard, switch the phone off, mounting the sdcard to computer directory, copy the /sd partition to another sdcard with ext2 partition
Back to normal:
1. rm -f /system/etc/mountd.conf
2. adb push /*the backup of mountd.conf* /system/etc/mountd.conf
3. rm -f /system/init.rc
4. adb push /*the backup of init.rc* /system/init.rc
5. busybox cp -a /sd/ /data/app
6. rm -r /sd/
Change of mountd.conf:
changing /dev/block/mmcblk0 to /dev/block/mmcblk0p1
change of init.rc:
adding
insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko
mknod /dev/mmcblk0p2 b 179 2 1000
mount ext2 /dev/mmcblk0p2 /sd noatime nodiratime
Any chance of this being simplified into the actual commands necessary for this!?
I'm a semi-noob at *nix stuff... I can format my SD card into 2 partitions, but I'm lost at step 4... What do we need to edit??
Changed step 4...just adb pull the mount.conf for editing..open the file in text editor..find "mmcblk0" and change it "mmcblk0p1" ..save the .conf...del the original one..push the new one to the original directory..
Yay. Now hopefully we can get this in an update.zip to flash
Yeah, I'm putting off doing this until someone makes an update.zip which I definitely know how to apply and get rid of if I screw anything up
REPLACES the internal memory...?
So the internal memory isnt used?
kinda the same trick as the browser cache and market cache, just a bit more complex as its an entire filesystem your moving, which wouldnt let the sys see the internal, mem, please correct me if im reading it wrong, Im not a total noob at linux but no guru dev either...
bhang
The internal memory is still used, just not for /data/app
19.rm -r /data/app
20.ln -s /sd/app /data/app
Click to expand...
Click to collapse
It should probably be /sdcard/app. In any case, this is a fairly complex mod that is not suited for Linux newbies. I would advise against folks considering this mod unless they understand and can test each step before attempting.
I agree and added a warning to the first post
Ummm yea, so what happens when you mount your sdcard for storage? I expect the phone goes crazy?
This tutorial, if you could call it that,(no offense) is really badly written and this process seems too risky for what you gain considering that if we are patient google will come out with this themselves.
Stericson
Stericson said:
Ummm yea, so what happens when you mount your sdcard for storage? I expect the phone goes crazy?
This tutorial, if you could call it that,(no offense) is really badly written and this process seems too risky for what you gain considering that if we are patient google will come out with this themselves.
Stericson
Click to expand...
Click to collapse
The procedure calls for two partitions on the microsd, one FAT32, other EXT. Theoretically it should work with mounting for mass storage. However, I agree that it's a rather sloppy hack.
There is talk about a similar strategy being officially implemented by the Android team. Instead of two partitions, it would be loopback mounted to a file in the FAT32. That would also provide some encryption security. See here. It's just talk though. Won't be a reality for at least a few months.
Well talk is certainly better than nothing...thanks for the info....
Stericson
I post a method withtout compiling the ramdisk.img but that do not force mounting the sd ext2 drive under rootfs but still workable...probably when i back to work I can compile 1 to flash
Am I the only one that thinks there are a few things that are getting 'lost in translation' here?
I'm not getting /sd mounted properly upon reboot...there's no way I'm going to continue attempting this till I see a better (no offense) tutorial or do a little more research on the command lines.
I would really shy away from this if you're an average user or don't know what mountd and init.rc files are used for....this could flat out wreck your phone.
TheDudeOfLife said:
Am I the only one that thinks there are a few things that are getting 'lost in translation' here?
I'm not getting /sd mounted properly upon reboot...there's no way I'm going to continue attempting this till I see a better (no offense) tutorial or do a little more research on the command lines.
I would really shy away from this if you're an average user or don't know what mountd and init.rc files are used for....this could flat out wreck your phone.
Click to expand...
Click to collapse
/sd is /sdcard (mount point for the micro sd card's partition)
I'm getting stuck right here:
8. busybox cp -a /data/app /sd/
9. rm -r /data/app
10. ln -s /sd/app /data/app
11. reboot
It's saying read only system blah blah, even though I have indeed mounted it is rw
pershoot said:
/sd is /sdcard (mount point for the micro sd card's partition)
Click to expand...
Click to collapse
No....no it is not.
/sd is a mount of the ext2 partition used for the 'copy' of /data/app (one of the things i disagreed with is picking /sd as a mount point for the second partition.)
/sdcard is the fat32 mount point...used as usual for mounting files.
IzzeLing said:
I'm getting stuck right here:
8. busybox cp -a /data/app /sd/
9. rm -r /data/app
10. ln -s /sd/app /data/app
11. reboot
It's saying read only system blah blah, even though I have indeed mounted it is rw
Click to expand...
Click to collapse
Type mount in adb shell and see if /sd is even mounted. I wasn't seeing it in my list. I don't think his mount command in the init.rc is correct, but I'm too busy with holiday stuff.
Don't rm -r /data/app if you have not 100% verified the copy works.
This line looks mangled (need flags in the args):
Edit: nevermind, looks like it should work in the init.rc
TheDudeOfLife said:
No....no it is not.
/sd is a mount of the ext2 partition used for the 'copy' of /data/app (one of the things i disagreed with is picking /sd as a mount point for the second partition.)
/sdcard is the fat32 mount point...used as usual for mounting files.
Click to expand...
Click to collapse
ahh yea. i just re-glanced over the instructions.
cool.
TheDudeOfLife said:
Type mount in adb shell and see if /sd is even mounted. I wasn't seeing it in my list. I don't think his mount command in the init.rc is correct, but I'm too busy with holiday stuff.
Don't rm -r /data/app if you have not 100% verified the copy works.
Click to expand...
Click to collapse
Yeah, don't see it. Hm.

Can't use ringtones that stored on /sdcard/ringtones

Suddenly I couldn't find any of my ringtones that stored on the /sdcard/ringtones directory from Ringtones Settings.
The /sdcard/ringtones is still avaliable on the sdcard and If I tried to play them throw the mp3 player they works fine.
I found out that the sdcard is mounted as Read-Only and not Read/Write as before. Even if I plug it in to the PC I can't change any of the data on the sdcard only read it.
The latest change that I made few days ago was to store all cache files on the sdcard. I am not sure that this is the reason but it could be.
Does anyone here have any idea why it happened?
install Rings Extended from the market. Open your soundsettings with the program. It will prompt to open with rings extended or standard.
Don't know about the read-only stuff, but you could take a look at the ownership and the rights you have as a user/admin... if all fails.. format?
thanks for the advice, I will try it...
does anyone have more ideas regarding the read only issue?
yes could this be your problem too http://forum.xda-developers.com/showthread.php?t=473256
unfortunately its not the same issue, I have root access to the phone and when I run the mount command this is the output I have for /sdcard
/dev/block/mmcblk0p1 on /sdcard type vfat (ro,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8)
I can't use the camera and the ringtones because of that.
I do able to remount the /sdcard as rw but any time I reboot the phone it become ro.
can you please copy for me the output that you have from mount command on /sdcard/ and the permissions you have on that directory from ls -l command?
zrubi said:
unfortunately its not the same issue, I have root access to the phone and when I run the mount command this is the output I have for /sdcard
/dev/block/mmcblk0p1 on /sdcard type vfat (ro,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8)
I can't use the camera and the ringtones because of that.
I do able to remount the /sdcard as rw but any time I reboot the phone it become ro.
can you please copy for me the output that you have from mount command on /sdcard/ and the permissions you have on that directory from ls -l command?
Click to expand...
Click to collapse
I suspect the fat partition on your sdcard got corrupted. Try a reformat
you were right thanks
I did chkdisk from windows and it did fix the fs.
now its working just fine...

(Q) Terminal Emulator code

So I have been using Terminal emulator to load new boot loaders on my phone and I use this code:
Code:
su
mount -o remount,rw /system
cp /file location/bootanimation.zip /system/media
My question for you guys is, what does the second line mean? I mean sure I can memorize the code and use it but I'm trying to figure out how to read it and it doesn't really make sense to me.
Code:
mount -o remount,rw /system
We use the mount command, with the option remount (meaning unmount and then mount again), and the desired access rights ( rw = read and write) on the folder /system.
This mean we have a folder /system which is probably mounted as READ ONLY.
To change access rights you have to unmount first and then mount with the new access rights.
We want to change the access rights of system and we don't want to change its mount point. So we use mount command with the option remount and our desired rights.
Does this clarify it for you?
Dark3n said:
Code:
mount -o remount,rw /system
We use the mount command, with the option remount (meaning unmount and then mount again), and the desired access rights ( rw = read and write) on the folder /system.
This mean we have a folder /system which is probably mounted as READ ONLY.
To change access rights you have to unmount first and then mount with the new access rights.
We want to change the access rights of system and we don't want to change its mount point. So we use mount command with the option remount and our desired rights.
Does this clarify it for you?
Click to expand...
Click to collapse
Yes this helped a lot! so the -o was the "option" part?
yes -(o)ption and then the option you want
Dark3n said:
yes -(o)ption and then the option you want
Click to expand...
Click to collapse
Thank you so much!
hmm, i logged in as su but did not perform the remout code, ive found a tool to calibrate my xperia x10 mini pro accelerometer but when i executed it and did the required operation, it said the configuration was complete and yet the accelerometer was left unchanged, could this mean that because i did not use the mount remount command before using the tool that is why the program did no changes at all?

[Q] How-to mount ext. sdcard with one click

I'm looking for a one click solution to mount the external sdcard.
I searched the market for a widget without luck.
I don't like to go to the settings/storage all the time.
Try adding a quick link icon to the command: su - c mount ... etc., with all the arguments you need for your card, e.g.
su -c 'mount -o rw /dev/block/vold/179:17 /mnt/mSD'
(just change the volume)
I'm not rooted.
DarsVaeda said:
I'm not rooted.
Click to expand...
Click to collapse
Right.
Change that.

/system remounting as RO after explicit RW mount

I have used the adb shell to mount my system partition as RW (mount -o remount,rw /system) but it appears to revert to RO. I can't tell exactly why.
I wish to move app updates to /system.
I have used CF Auto Root to root the device.
I installed Titanium Backup Pro.
I have set the app mode to AUTO/indirect as recommended for Samsung devices.
I select Integrate updates to system ROM (or similar, I don't have the screen in front of me). As soon as I do this, the /system partition is remounted as read only (cat /proc/mounts | grep system)
TB just seems to hang. The Gmail base.apk has been copied to /system/apps and the com.google.android.gm-1 folder has been removed from /data/app.
If I don't mount /system as RW the same thing happens.
If I manually copy the app data from /data/app to /system/app and set the permissions the app still fails to function.
Does anyone have any ideas why this is happening?
EDIT:
I cannot load apks via adb - I am told I have a RO file system, even though I can clearly see the /system partition is mounted.

Categories

Resources