- Jul 9, 2010
- 3,483
- 436
This dalvik2cache might be nice too: Dalvik-cache in /cache [Archive] - xda-developers
/cache is 90MB
/cache is 90MB
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
This dalvik2cache might be nice too: Dalvik-cache in /cache [Archive] - xda-developers
/cache is 90MB
If we issue the mount command we should see something like:
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
/dev/block/mtdblock1 /system yaffs2 rw 0 0
/dev/block/mtdblock6 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock5 /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,shortname=mixed,utf8,flush 0 0
/dev/block/vold/179:2 /system/sd ext2 rw 0 0
/dev/block/vold/179:2 /data/app ext2 rw 0 0
/dev/block/vold/179:2 /data/app-private ext2 rw 0 0
/dev/block/vold/179:2 /data/dalvik-cache ext2 rw 0 0
/dev/block/vold/179:2 /data/data ext2 rw 0 0
Now we need to automate the mounting of these partitions during boot.
For this to occur we need two scripts to be placed in /system/etc/
The first script is called install-recovery.sh as the tablet looks for this script at boot time, we use this to call another script called init-sd.sh to mount the second partition on the sdcard, and then bind mount the directories in the data partition.
the first script contains the following
#!/system/bin/sh
/system/etc/init-sd.sh&
The second script contains:
#!/system/bin/shsleep 10
mount -t ext2 /dev/block/vold/179:2
mount -o bind /system/sd/app /data/app
mount -o bind /system/sd/app-private /data/app-private
mount -o bind /system/sd/dalvik-cache /data/dalvik-cache
mount -o bind /system/sd/data /data/data
so using a good text editor, such as notepad ++, we need to make these two scripts and then get them on to the tablet.
We could either mount the sdcard on your windows machine, or use Droid explorer, or adb push to put these on to the sdcard
Once they are on the sd card, we need to move them to the correct place and also as we've been editing these files on a windows machine, make sure that the line breaks are good and correct.
To do this we need to issue the following commands:
cd /sdcard
dos2unix install-recovery.sh
dos2unix init-sd.sh
Now we copy both of these files to the /system/etc/ folder
cp install-recovery.sh /system/etc
cp init-sd.sh /system/etc
Next we need to make sure both these files are able to be run at boot, by issuing the following command:
chmod 755 /system/etc/install-recovery.sh
and
chmod 755 /system/etc/init-sd.sh
Now we reboot the tablet, and hopefully everything has worked, we can do this quickly via the adb
shell with the reboot command
reboot
If all has worked correctly, everything will be up and running.
so using a good text editor, such as note pad ++, we need to make these two scripts and then get them on to the tablet.
We could either mount the sdcard on your windows machine, or use Droid explorer, or adb push to put these on to the sdcard
Once they are on the sd card, we need to move them to the correct place and also as we've been editing these files on a windows machine, make sure that the line breaks are good and correct.
To do this we need to issue the following commands:
cd /sdcard
dos2unix install-recovery.sh
dos2unix init-sd.sh
Now we copy both of these files to the /system/etc/ folder
cp install-recovery.sh /system/etc
cp init-sd.sh /system/etc
Next we need to make sure both these files are able to be run at boot, by issuing the following command:
chmod 755 /system/etc/install-recovery.sh
and
chmod 755 /system/etc/init-sd.sh
Now we reboot the tablet, and hopefully everything has worked, we can do this quickly via the adb shell with the reboot command
reboot
If all has worked correctly, everything will be up and running.
You should not have the double entries. Retry it.
Sent from my Ideos S7
Just an update about what I currently have loaded and tested on my S7. I currently have the latest Singapore ROM (S7V100R001C62B013).
I am loading the following scripts into /system/etc
install-recovery.sh#!/system/bin/sh
#
/system/etc/init-sd.sh&
/system/etc/init-camera.sh&
/system/etc/init-cache.sh&
init-sd.sh
#!/system/bin/sh
#
MYLOG=/data/init-sd.log
echo "$(date) Starting install-recovery.sh" > $MYLOG
echo "$(date) Waiting SD to become ready..." >> $MYLOG
sleep 10
mount -t ext2 /dev/block/vold/179:2 /system/sd 1>>$MYLOG 2>>$MYLOG
mount -o bind /system/sd/app /data/app 1>>$MYLOG 2>>$MYLOG
#mount -o bind /system/sd/data /data/data 1>>$MYLOG 2>>$MYLOG
#mount -o bind /system/sd/dalvik-cache /data/dalvik-cache 1>>$MYLOG 2>>$MYLOG
mount >> $MYLOG
echo "$(date) Finishing init-sd.sh" >> $MYLOG
init-camera.sh
#!/system/bin/sh
#
MYLOG=/data/init-camera.log
echo "$(date) Starting init-camera.sh" > $MYLOG
rm /dev/msm_camera/*
cd /dev/msm_camera
busybox mknod frame0 c 245 5
busybox mknod frame1 c 245 2
busybox mknod config0 c 245 4
busybox mknod config1 c 245 1
busybox mknod control0 c 245 3
busybox mknod control1 c 245 0
chown system.system *
chmod 660 *
echo "$(date) Finishing init-camera.sh" >> $MYLOG
init-cache.sh
#!/system/bin/sh
#
MYLOG=/data/init-cache.log
echo "$(date) Starting init-cache.sh" > $MYLOG
if [ ! -d /cache/dalvik-cache ]
then
mkdir /cache/dalvik-cache >> $MYLOG
chown 1000:1000 /cache/dalvik-cache >> $MYLOG
chmod 775 /cache/dalvik-cache >> $MYLOG
fi
if [ -L /data/dalvik-cache ]
then
rm -f /data/dalvik-cache >> $MYLOG
mkdir /data/dalvik-cache >> $MYLOG
chown 1000:1000 /data/dalvik-cache >> $MYLOG
chmod 775 /data/dalvik-cache >> $MYLOG
elif [ ! -d /data/dalvik-cache ]
then
mkdir /data/dalvik-cache >> $MYLOG
chown 1000:1000 /data/dalvik-cache >> $MYLOG
chmod 775 /data/dalvik-cache >> $MYLOG
elif [ -d /data/dalvik-cache ]
then
for filename in /data/dalvik-cache/*
do
if [ -L $filename ]
then
rm -f $filename >> $MYLOG
fi
done
mv /data/dalvik-cache/* /cache/dalvik-cache/ >> $MYLOG
fi
echo "$(date) Mounting Cache" >> $MYLOG
mount -o bind /cache/dalvik-cache/ /data/dalvik-cache/ 1>>$MYLOG 2>>$MYLOG
mount >> $MYLOG
echo "$(date) Finishing init-cache.sh" >> $MYLOG
mount now looks like this
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
/dev/block/mtdblock1 /system yaffs2 ro 0 0
/dev/block/mtdblock6 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock5 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock5 /data/dalvik-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,flush 0 0
/dev/block/vold/179:2 /system/sd ext2 rw,errors=continue 0 0
/dev/block/vold/179:2 /data/app ext2 rw,errors=continue 0 0
Space looks like this
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 207.6M 12.0K 207.5M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock1 160.0M 141.3M 18.7M 88% /system
/dev/block/mtdblock6 175.0M 55.8M 119.2M 32% /data
/dev/block/mtdblock5 94.8M 48.4M 46.3M 51% /cache
/dev/block/mtdblock5 94.8M 48.4M 46.3M 51% /data/dalvik-cache
/dev/block//vold/179:1
13.4G 6.8G 6.6G 51% /sdcard
/dev/block/vold/179:2
1.4G 339.2M 1.0G 24% /system/sd
/dev/block/vold/179:2
1.4G 339.2M 1.0G 24% /data/app
I now have a lot of space, cache is now on a NAND mount point and stable, and I have not had to move /data/app-private, or /data/data at all.