5,606,465 Members 33,301 Now Online
XDA Developers Android and Mobile Development Forum

[FIXED] full r/w access via overlay filesystem

Tip us?
 
77flem
Old
(Last edited by 77flem; 21st August 2010 at 08:31 AM.)
#141  
Member
Thanks Meter 4
Posts: 81
Join Date: May 2010
aufs log file says:
/system/etc/init.d/06aufs: /data/sysro/xbin/mount: not found
 
daveba
Old
#142  
Senior Member
Thanks Meter 61
Posts: 398
Join Date: Mar 2010
Location: Dubai
Quote:
Originally Posted by 77flem View Post
aufs log file says:
/system/etc/init.d/06aufs: /data/sysro/xbin/mount: not found
I think because mount is linked to busybox and now it can't call busybox either ;-(

So try
Code:
/data/sysro/xbin/busybox mount -t aufs -o br=$RWDIR=rw:/data/sysro=ro none /system
Or you can just add the new PATH to the top of the script (yet to be moved-to PATH)
Code:
PATH=$PATH:/data/sysro/xbin
and then just remove the explict path to mount/busybox and revert it to
Code:
mount -t aufs -o br=$RWDIR=rw:/data/sysro=ro none /system
 
77flem
Old
#143  
Member
Thanks Meter 4
Posts: 81
Join Date: May 2010
Quote:
Originally Posted by daveba View Post
I think because mount is linked to busybox and now it can't call busybox either ;-(

So try
Code:
/data/sysro/xbin/busybox mount -t aufs -o br=$RWDIR=rw:/data/sysro=ro none /system
Tested with this one but seems not working

Code:
# touch /system/xyz
touch /system/xyz
touch: /system/xyz: Read-only file system
# mount
mount
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mtdblock3 on /system type yaffs2 (ro,relatime)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block/mmcblk0p2 on /data/sysrw type ext2 (rw,relatime,barrier=1,data=ordere
d)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)
/dev/block/vold/179:1 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,r
elatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,
iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:1 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noe
xec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=c
p437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
/dev/block/dm-0 on /mnt/asec/com.shazam.android-1 type vfat (ro,dirsync,nosuid,n
odev,noexec,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso
8859-1,shortname=mixed,utf8,errors=remount-ro)
log file here http://pastebin.com/Kcw9ADFA

Quote:
Originally Posted by daveba View Post
Or you can just add the new PATH to the top of the script (yet to be moved-to PATH)
Code:
PATH=$PATH:/data/sysro/xbin
and then just remove the explict path to mount/busybox and revert it to
Code:
mount -t aufs -o br=$RWDIR=rw:/data/sysro=ro none /system
for this it says none invalid argument at the end of the log file.
 
daveba
Old
#144  
Senior Member
Thanks Meter 61
Posts: 398
Join Date: Mar 2010
Location: Dubai
Quote:
Originally Posted by 77flem View Post
Tested with this one but seems not working


for this it says none invalid argument at the end of the log file.
Lemme look into it.
 
BlaY0
Old
#145  
BlaY0's Avatar
Recognized Developer
Thanks Meter 563
Posts: 1,552
Join Date: Sep 2007
Location: Medvode
You should definitely call mount through /sysro/xbin/busybox becouse mount can also be an absolute symbolic link which always points to /system/xbin/busybox. Full path absolute symbolic links are mada when you install busybox with '--install -s' parameters and that is exactly how busybox is installed in latest kitchen. So unless you installed it with static links or by manually (relative) symlinking it through update-script, you will definitely have to call mount by invoking '/sysro/xbin/busybox mount'.

Android powah!
 
BlaY0
Old
#146  
BlaY0's Avatar
Recognized Developer
Thanks Meter 563
Posts: 1,552
Join Date: Sep 2007
Location: Medvode
One more thing. That mount from toolbox doesn't support --move parameter, so you should use mount from busybox on first invocation too.

Android powah!
 
daveba
Old
(Last edited by daveba; 21st August 2010 at 10:39 AM.)
#147  
Senior Member
Thanks Meter 61
Posts: 398
Join Date: Mar 2010
Location: Dubai
Quote:
Originally Posted by BlaY0 View Post
One more thing. That mount from toolbox doesn't support --move parameter, so you should use mount from busybox on first invocation too.

Android powah!
It's worse than that. The system/xbin/busybox is dynamically linked so when we do the --move we lose the libraries. Ouch. The solution is to boot into recovery and do the following first (the recovery command is actually a statically linked busybox so has no dependencies unlike the /system/xbin one)

Code:
adb shell
mount /data
cp /sbin/recovery /data/local/busybox
then change the 06aufs to run /data/local/busybox mount... and all works fine.
I now have the following mounts
Code:
 adb shell
# df
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                   208116         0    208116   0% /dev
tmpfs                   208116         0    208116   0% /mnt/asec
/dev/block/mtdblock3    256000    117692    138308  46% /data/sysro
/dev/block/mtdblock5    151168    134892     16276  89% /data
/dev/block/mtdblock4     40960      1160     39800   3% /cache
/dev/block/mmcblk0p2    505636      4188    475343   1% /data/sysrw
none                    505636      4188    475343   1% /system
 
daveba
Old
#148  
Senior Member
Thanks Meter 61
Posts: 398
Join Date: Mar 2010
Location: Dubai
Quote:
Originally Posted by BlaY0 View Post
One more thing. That mount from toolbox doesn't support --move parameter, so you should use mount from busybox on first invocation too.

Android powah!
Really ? The --move is succeeding correctly. It's the subsequent mount failing as shown in the pastebin link. Anyhow the solution is just above...
 
77flem
Old
#149  
Member
Thanks Meter 4
Posts: 81
Join Date: May 2010
Quote:
Originally Posted by daveba View Post
It's worse than that. The system/xbin/busybox is dynamically linked so when we do the --move we lose the libraries. Ouch. The solution is to boot into recovery and do the following first (the recovery command is actually a statically linked busybox so has no dependencies unlike the /system/xbin one)

Code:
adb shell
mount /data
cp /sbin/recovery /data/local/busybox
then change the 06aufs to run /data/local/busybox mount... and all works fine.
I now have the following mounts
Code:
 adb shell
# df
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                   208116         0    208116   0% /dev
tmpfs                   208116         0    208116   0% /mnt/asec
/dev/block/mtdblock3    256000    117692    138308  46% /data/sysro
/dev/block/mtdblock5    151168    134892     16276  89% /data
/dev/block/mtdblock4     40960      1160     39800   3% /cache
/dev/block/mmcblk0p2    505636      4188    475343   1% /data/sysrw
none                    505636      4188    475343   1% /system
seems not working

Code:
# touch /system/xyz
touch /system/xyz
touch: /system/xyz: Read-only file system
# df
df
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                   208116         0    208116   0% /dev
tmpfs                   208116         0    208116   0% /mnt/asec
/dev/block/mtdblock3    256000    124200    131800  49% /system
/dev/block/mtdblock5    151168    115836     35332  77% /data
/dev/block/mtdblock4     40960      1480     39480   4% /cache
/dev/block/mmcblk0p2    484346     10545    448792   2% /data/sysrw
/dev/block/vold/179:1
                       3365472   2335424   1030048  69% /mnt/sdcard
/dev/block/vold/179:1
                       3365472   2335424   1030048  69% /mnt/secure/asec
here is the 06aufs i use and nothing in log file.
Attached Files
File Type: zip 06aufs.zip - [Click for QR Code] (576 Bytes, 36 views)
 
daveba
Old
#150  
Senior Member
Thanks Meter 61
Posts: 398
Join Date: Mar 2010
Location: Dubai
Quote:
Originally Posted by 77flem View Post
seems not working


here is the 06aufs i use and nothing in log file.
You missed some crucial lines. Where's the line to create /data/sysro and the mount --move ? Use this one which definetly works for me (assuming you do have /data/local/busybox)
Attached Files
File Type: txt 06aufs.txt - [Click for QR Code] (1.5 KB, 54 views)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...