You can run the mount command without parameter in order to get partition information before constructing your mount command. Here is an example of the mount command without parameter outputed from my HTC Hero $ mount mount rootfs / rootfs ro 0 0 tmpfs /dev tmpfs rw,mode=755 0 0 devpts /dev/pts devpts rw,mode=600 0 0 proc /proc proc rw 0 0 sysfs /sys sysfs rw 0 0 tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0 none /dev/cpuctl cgroup rw,cpu 0 0 /dev/block/mtdblock3 /system yaffs2 rw 0 0 /dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0 /dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0 /dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid= 1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,s hortname=mixed,utf8,errors=remount-ro 0 0.
You can run the mount command without parameter in order to get partition information before constructing your mount command. Here is an example of the mount command without parameter outputed from my HTC Hero. $ mount mount rootfs / rootfs ro 0 0 tmpfs /dev tmpfs rw,mode=755 0 0 devpts /dev/pts devpts rw,mode=600 0 0 proc /proc proc rw 0 0 sysfs /sys sysfs rw 0 0 tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0 none /dev/cpuctl cgroup rw,cpu 0 0 /dev/block/mtdblock3 /system yaffs2 rw 0 0 /dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0 /dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0 /dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid= 1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,s hortname=mixed,utf8,errors=remount-ro 0 0.
OK, that's great, thanks. One question, though -- from that output, I can find the line that has /system and parse the mount point and partition type. Is there any command that will just output that info for only /system (to avoid all the parsing)?
– user496854 Mar 29 at 4:46 Nevermind -- I got it all parsed without any issues, but there is another problem: I can run other root commands just fine from within my app, but the "mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system" command has no effect. I get no errors, and it looks like it ran successfully, but /system stays as read-only. Any ideas or suggestions?
– user496854 Mar 29 at 5:27 I think you can not run the "mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system" command with regular app permission. You should run it with root permission in order to take effect. – Bao Le Mar 29 at 5:48 I'm running it under "su", meaning it has root permissions from the SuperUser app; – user496854 Mar 29 at 13:46 I recommend you read this thread on how to execute a command with stackoverflow.Com/questions/4594071/…; permission) – Bao Le Mar 30 at 3:15.
I'm writing an android app that needs to copy a file to the "/system" partition at runtime. I've got the commands to run "su" and can successfully request SuperUser permissions and run commands as root. But I don't know how to make this app universal across multiple devices, because the mount command can differ depending on where the /system is actually mounted.
But I know that mtdblock3 could be different on some devices (and for that matter, I guess so could yaffs2). So, my question is: Is there a universal command that will work on all phones? Or is there a way to find out at runtime what the correct parameters are?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.