Welcome to CyanogenMod
![]() |
Welcome to our forum. Like most online communities you must register to post, but don't worry this is a simple free process that requires minimal information for you to signup. Be a part of the CyanogenMod Forum by signing in or creating an account. You can even sign in with your Facebook or Twitter account.
|
FroYo a2sdext [ 2010-11-03 ] # v1.36 # in theory, supports HTC Incredible
#61
Posted 16 July 2010 - 07:46 AM
Thanks, Firerat.
(Renamed it to frapps2sd.txt for an easier command to remember =P )
#62
Posted 16 July 2010 - 08:15 AM
IConrad01, on 16 July 2010 - 04:07 AM, said:
Scratch that -- it worked on my seventh reboot. No idea what's different.
It failed again on 8th and 9th boots.
UPDATE: I have successfully enabled the mounting of my ext partition! I placed entries in the script to manually initialize mmcblk0, mmcblk0p1, mmcblk0p2, and mmcblk0p3 using "mknod".
To edit the script manually, perform ls -l /dev/block/mmcblk* -- this will give you the entries you need to work with.
From there, use a text editor to edit 05mountsd to include in the first "whitespace":
mknod /dev/block/mmcblk0 b #1 #2 mknod /dev/block/mmcblk0p1 b #1 #2 mknod /dev/block/mmcblk0p2 b #1 #2 etc..
Where #1 is the first number for that device's line in "ls -l" and #2 is the second number for that device's line in "ls -l".
Is it enough to put this modified file to /system/etc/init.d/ ?
Or some other places?
It doesn't work for me:(
And my 05mountsd looks like this now:
#!/system/bin/sh
#
# mount ext[234] partition from sd card
mknod /dev/block/mmcblk0 b 179 0
mknod /dev/block/mmcblk0p1 b 179 1
mknod /dev/block/mmcblk0p2 b 179 2
BB="logwrapper busybox";
# Firerat - make mount point
if [ ! -d /sd-ext ];
then
$BB mount -o rw,remount /
install -m 774 -o 1000 -g 1000 -d /sd-ext
$BB mount -o ro,remount /
fi
if [ "$SD_EXT_DIRECTORY" = "" ];
then
SD_EXT_DIRECTORY=/sd-ext;
fi;
# find first linux partition on SD card
MMC=/dev/block/mmcblk0
# wait for the device to settle
COUNT=6;
until [ -b "$MMC" ] || [ $COUNT -lt 1 ];
do
sleep 1;
COUNT=$((COUNT-1));
$BB echo $COUNT
done;
if [ -b "$MMC" ];
then
FDISK="busybox fdisk"
PARTITION=`$FDISK -l $MMC | awk '/^\// && $5 == 83 {print $1;exit;}'`
if [ -b "$PARTITION" ];
then
log -p i -t mountsd "Checking filesystems..";
# fsck the sdcard filesystem first
logwrapper e2fsck -y $PARTITION;
# set property with exit code in case an error occurs
setprop cm.e2fsck.errors $?;
if [ "$?" = 0 ];
then
# mount and set perms
$BB mount -o noatime,nodiratime -t auto $PARTITION $SD_EXT_DIRECTORY;
if [ "$?" = 0 ];
then
$BB chown 1000:1000 $SD_EXT_DIRECTORY;
$BB chmod 771 $SD_EXT_DIRECTORY;
log -p i -t mountsd "$SD_EXT_DIRECTORY successfully mounted";
else
log -p e -t mountsd "Unable to mount filesystem for $SD_EXT_DIRECTORY!";
fi
else
log -p e -t mountsd "Unable to repair filesystem, disabling apps2sd";
fi
fi
fi
if ! awk -vDIR="$SD_EXT_DIRECTORY" '$2 == DIR { exit 1; }' /proc/mounts ;
then
# create directories if necessary.
for i in app app-private dalvik-cache;
do
if [ ! -d $SD_EXT_DIRECTORY/$i ];
then
mkdir $SD_EXT_DIRECTORY/$i;
busybox chown 1000:1000 $SD_EXT_DIRECTORY/$i;
busybox chmod 771 $SD_EXT_DIRECTORY/$i;
log -p i -t a2sd "$SD_EXT_DIRECTORY/$i created"
fi;
done
setprop cm.a2sd.active 1
log -p i -t a2sd "Apps2SD successfully activated";
fi;
#63
Posted 16 July 2010 - 08:36 AM
connoisseur, on 15 July 2010 - 11:01 PM, said:
To your 1st question, no you don't have to do anything other that run firerat's patch to move new (downloaded)apps to sd-ext.
To 2nd question, firerat's script is the one that mounts the /sd-ext so ???
You said you have a CLass6 so lets make sure you have an EXT4 as well.. Go into recovery and upgrade filesystem (I thing its in partition menu) then re-run firerats script
thanks. I can confirm that I have EXT4. Unfortunately partition is not mounted..
#64
Posted 16 July 2010 - 04:02 PM
IConrad01, on 16 July 2010 - 04:07 AM, said:
Scratch that -- it worked on my seventh reboot. No idea what's different.
It failed again on 8th and 9th boots.
UPDATE: I have successfully enabled the mounting of my ext partition! I placed entries in the script to manually initialize mmcblk0, mmcblk0p1, mmcblk0p2, and mmcblk0p3 using "mknod".
To edit the script manually, perform ls -l /dev/block/mmcblk* -- this will give you the entries you need to work with.
From there, use a text editor to edit 05mountsd to include in the first "whitespace":
mknod /dev/block/mmcblk0 b #1 #2 mknod /dev/block/mmcblk0p1 b #1 #2 mknod /dev/block/mmcblk0p2 b #1 #2 etc..
Where #1 is the first number for that device's line in "ls -l" and #2 is the second number for that device's line in "ls -l".
that is perfect
I'll add that to OP and script
Edit:
I added this bit
MMC=/dev/block/mmcblk0
if [ ! -b "$MMC" ];
then
mknod ${MMC} b 179 0
chmod 600 ${MMC}
for i in 1 2 3;do
mknod ${MMC}p${i} b 179 $i
chmod 600 ${MMC}p${i}
done
fi
mastermind7771, on 16 July 2010 - 07:46 AM, said:
Thanks, Firerat.
(Renamed it to frapps2sd.txt for an easier command to remember =P )
my tip is ash and tab
http://en.wikipedia....line_completion
su ash sh /sdc<tab>fr-a<tab>
where <tab> = <alt> then <q>
do two <tab>s to see your options
#65
Posted 17 July 2010 - 11:16 PM
everytime i try to run the txt file the terminal tells me it can't open it.
#66
Posted 18 July 2010 - 02:52 AM
execute this:
chmod 755 /sdcard/fr-apps2sd-ext-v0-5.sh.txt ; sh /sdcard/fr-apps2sd-ext-v0-5.sh.txt
#67
Posted 18 July 2010 - 04:29 AM
zely, on 17 July 2010 - 11:16 PM, said:
everytime i try to run the txt file the terminal tells me it can't open it.
For what it's worth, I was having the same problem. However, I would get that error with almost any commands, and nothing would be shown on my sdcard (this is from within recovery). I realized that if I go to the "flash any zip" submenu before going to the console, everything works fine.
BTW, I got this patch working, and it's awesome. i had to run mount -a to fix some problems with a mtdblock error or something. Anyway, apps2ext is wayyy better than the crappy fat2sd thing, my g1 is a blazin!
#68
Posted 18 July 2010 - 09:13 AM
#69
Posted 18 July 2010 - 09:25 AM
#70
Posted 18 July 2010 - 12:47 PM
samdasnake, on 18 July 2010 - 09:25 AM, said:
well, its possible, but I don't expect this script to be required for all that long
I just run it again when I've added a few apps
#71
Posted 18 July 2010 - 03:49 PM
#73
Posted 18 July 2010 - 04:32 PM
#75
Posted 18 July 2010 - 04:38 PM
proo, on 18 July 2010 - 04:32 PM, said:
OP=Original Poster http://forum.cyanoge...-froyo-a2sdext/
#76
Posted 18 July 2010 - 04:42 PM
#77
Posted 22 July 2010 - 03:57 PM
Also, is there a way to undo this, especially if another method comes along, possibly integrated into the ROM?
Thanks a lot!
#78
Posted 22 July 2010 - 05:03 PM
RebelScum, on 22 July 2010 - 03:57 PM, said:
Also, is there a way to undo this, especially if another method comes along, possibly integrated into the ROM?
Thanks a lot!
up to you
to undo
for i in `find /data/app/ -type l`;do apk=`basename $i` rm /data/app/$apk mv /sd-ext/app/$apk /data/app/$apk done
#79
Posted 22 July 2010 - 05:52 PM
Firerat, on 22 July 2010 - 05:03 PM, said:
to undo
for i in `find /data/app/ -type l`;do apk=`basename $i` rm /data/app/$apk mv /sd-ext/app/$apk /data/app/$apk done
Thanks for the backout script!
#80
Posted 22 July 2010 - 07:11 PM
















