Jump to content

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.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Get your own profile and make new friends
  • Download files attached to the forum.
  • Customize your experience here
  • Share your CyanogenMod experience!
Guest Message by DevFuse
 

FroYo a2sdext [ 2010-11-03 ] # v1.36 # in theory, supports HTC Incredible


  • Please log in to reply
154 replies to this topic

#61 mastermind7771

mastermind7771
  • Members
  • 25 posts
  • Twitter:@mastermind777
  • LocationNowhere, yet everywhere
  • Device Model:|2|
  • MOD Version:Latest, including test/experimental
  • Recovery Image:Amon_RA

Posted 16 July 2010 - 07:46 AM

Gonna use this for a while until official solution is implemented by Chris Soyars.

Thanks, Firerat.

(Renamed it to frapps2sd.txt for an easier command to remember =P )

#62 batoo

batoo
  • Members
  • 3 posts
  • Device Model:|2|
  • MOD Version:Cyan the latest
  • Recovery Image:Amon_RA

Posted 16 July 2010 - 08:15 AM

View PostIConrad01, on 16 July 2010 - 04:07 AM, said:

I am sorry to report that I am another ext4 Class 6 failed /sd-ext mounter:  It gets mmcblk0 not found during boot. -- it mounts perfectly fine anytime later.

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 pgr79

pgr79
  • Members
  • 5 posts
  • Device Model:|2|
  • MOD Version:CY MOD 6.0
  • Recovery Image:Amon_RA

Posted 16 July 2010 - 08:36 AM

View Postconnoisseur, on 15 July 2010 - 11:01 PM, said:

My patches are for bypassing having to move apps that are already on sd-ext to sd (froyo) and then back again with firerat's patch. His patch moves apps on Fro2SD to /data/app and then from there to /sd-ext/app.

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 Firerat

Firerat
  • Members
  • 1,803 posts
  • Twitter:firer4t
  • Country:uk
  • Device Model:Dream aka G1 aka trout
  • MOD Version:CM6 Magpie Ezt 2708
  • Recovery Image:ClockworkMod

Posted 16 July 2010 - 04:02 PM

View PostIConrad01, on 16 July 2010 - 04:07 AM, said:

I am sorry to report that I am another ext4 Class 6 failed /sd-ext mounter:  It gets mmcblk0 not found during boot. -- it mounts perfectly fine anytime later.

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



View Postmastermind7771, on 16 July 2010 - 07:46 AM, said:

Gonna use this for a while until official solution is implemented by Chris Soyars.

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 zely

zely
  • Members
  • 1 posts
  • Device Model:|2|
  • MOD Version:CM-5.0.8
  • Recovery Image:Amon_RA

Posted 17 July 2010 - 11:16 PM

i like a uber n00b but,
everytime i try to run the txt file the terminal tells me it can't open it.

#66 IConrad01

IConrad01
  • Members
  • 10 posts
  • Device Model:|2|
  • MOD Version:Cyanogen latest
  • Recovery Image:Amon_RA

Posted 18 July 2010 - 02:52 AM

Zely;

execute this:

chmod 755 /sdcard/fr-apps2sd-ext-v0-5.sh.txt ; sh /sdcard/fr-apps2sd-ext-v0-5.sh.txt


#67 j1mb34m

j1mb34m
  • Donators
  • 71 posts
  • Country:us
  • Device Model:G1
  • MOD Version:SuperFroyo 4.4
  • Recovery Image:Amon_RA

Posted 18 July 2010 - 04:29 AM

View Postzely, on 17 July 2010 - 11:16 PM, said:

i like a uber n00b but,
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 motoman234

motoman234

    Wam! bam! thank you mam

  • Donators
  • 147 posts
  • Twitter:mototy234
  • LocationTulsa,OK
  • Country:us
  • Device Model:HTC Inspire 4G
  • MOD Version:CM-7
  • Recovery Image:ClockworkMod

Posted 18 July 2010 - 09:13 AM

After i ran the process and sent most of my apps to my ext i checked them one by one afterwards and it sent them to internal. I also checked to see if it just sent some of the data to internal like it seems to do with froyo a2sd and that wasnt it. Im not sure what im doing wrong.

#69 samdasnake

samdasnake
  • Members
  • 3 posts
  • Device Model:|2|
  • MOD Version:unkown
  • Recovery Image:TWRP

Posted 18 July 2010 - 09:25 AM

This script works like a charm.  Is there a way to make it run whenever apps are installed, or must I run it manually every so often to migrate my newly installed apps to my EXT partition?  Thanks for all your contributions to the android community!

#70 Firerat

Firerat
  • Members
  • 1,803 posts
  • Twitter:firer4t
  • Country:uk
  • Device Model:Dream aka G1 aka trout
  • MOD Version:CM6 Magpie Ezt 2708
  • Recovery Image:ClockworkMod

Posted 18 July 2010 - 12:47 PM

View Postsamdasnake, on 18 July 2010 - 09:25 AM, said:

This script works like a charm.  Is there a way to make it run whenever apps are installed, or must I run it manually every so often to migrate my newly installed apps to my EXT partition?  Thanks for all your contributions to the android community!

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 proo

proo
  • Members
  • 29 posts
  • Country:ph
  • Device Model:|1|2|
  • MOD Version:Nighlty Depends on the mood
  • Recovery Image:Amon_RA

Posted 18 July 2010 - 03:49 PM

how do you activte this a2sd??

#72 Firerat

Firerat
  • Members
  • 1,803 posts
  • Twitter:firer4t
  • Country:uk
  • Device Model:Dream aka G1 aka trout
  • MOD Version:CM6 Magpie Ezt 2708
  • Recovery Image:ClockworkMod

Posted 18 July 2010 - 04:26 PM

View Postproo, on 18 July 2010 - 03:49 PM, said:

how do you activte this a2sd??

the secret is to read the OP, especially the bit under instructions

#73 proo

proo
  • Members
  • 29 posts
  • Country:ph
  • Device Model:|1|2|
  • MOD Version:Nighlty Depends on the mood
  • Recovery Image:Amon_RA

Posted 18 July 2010 - 04:32 PM

i know it is a stupid question to ask..but i really dont know the answer..What is OP??? ive searched it on wiki but nothing came up

#74 Firerat

Firerat
  • Members
  • 1,803 posts
  • Twitter:firer4t
  • Country:uk
  • Device Model:Dream aka G1 aka trout
  • MOD Version:CM6 Magpie Ezt 2708
  • Recovery Image:ClockworkMod

Posted 18 July 2010 - 04:38 PM

View Postproo, on 18 July 2010 - 04:32 PM, said:

i know it is a stupid question to ask..but i really dont know the answer..What is OP??? ive searched it on wiki but nothing came up

OP = Original Post/Poster ( use context to determine which )

#75 Houka

Houka
  • Members
  • 154 posts
  • LocationSarnia, On Canada
  • Country:ca
  • Device Model:Captivate
  • MOD Version:CM7
  • Recovery Image:ClockworkMod

Posted 18 July 2010 - 04:38 PM

View Postproo, on 18 July 2010 - 04:32 PM, said:

i know it is a stupid question to ask..but i really dont know the answer..What is OP??? ive searched it on wiki but nothing came up

OP=Original Poster   http://forum.cyanoge...-froyo-a2sdext/

#76 proo

proo
  • Members
  • 29 posts
  • Country:ph
  • Device Model:|1|2|
  • MOD Version:Nighlty Depends on the mood
  • Recovery Image:Amon_RA

Posted 18 July 2010 - 04:42 PM

okei thanks a lot

#77 RebelScum

RebelScum
  • Members
  • 18 posts
  • Device Model:|2|
  • MOD Version:CM6
  • Recovery Image:Amon_RA

Posted 22 July 2010 - 03:57 PM

Should I exclude apps that have widgets I want to use?  Should I also exclude apps that have processes that usually run in bg?  

Also, is there a way to undo this, especially if another method comes along, possibly integrated into the ROM?  

Thanks a lot!

#78 Firerat

Firerat
  • Members
  • 1,803 posts
  • Twitter:firer4t
  • Country:uk
  • Device Model:Dream aka G1 aka trout
  • MOD Version:CM6 Magpie Ezt 2708
  • Recovery Image:ClockworkMod

Posted 22 July 2010 - 05:03 PM

View PostRebelScum, on 22 July 2010 - 03:57 PM, said:

Should I exclude apps that have widgets I want to use?  Should I also exclude apps that have processes that usually run in bg?  

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 RebelScum

RebelScum
  • Members
  • 18 posts
  • Device Model:|2|
  • MOD Version:CM6
  • Recovery Image:Amon_RA

Posted 22 July 2010 - 05:52 PM

View PostFirerat, on 22 July 2010 - 05:03 PM, said:

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
Thanks.  I realize that it is entirely up to me, but I am new to this, so I was wondering what the disadvantages are of moving apps to ext.  I know the advantage is saving space in /data.  But does it have an adverse effect on widgets and/or apps that run bg processes?  I guess it's like, why wouldn't everyone just move everything to ext?  Sorry if this is a n00b question, but I'm new, and nobody seems to discuss it, like, everyone already knows.  And since this is a new method, I didn't want to assume it had the same behavior of the old ways of doing it.  

Thanks for the backout script!

#80 Necrobutcher

Necrobutcher
  • Members
  • 17 posts
  • Twitter:tenacious_dave
  • Country:us
  • Device Model:T-Mobile G1
  • MOD Version:Cyanogenmod Nightly
  • Recovery Image:Amon_RA

Posted 22 July 2010 - 07:11 PM

Can I save and restore the Apps with Titanium? (after using the script for creating the folder)