FORUMS
Remove All Ads from XDA

[KITCHEN] dsixda HTC Android Kitchen Now for Leo Nand

4,966 posts
Thanks Meter: 1,907
 
By af974, Retired Recognized Developer / Retired Forum Moderator on 17th March 2011, 05:02 AM
Post Reply Email Thread
18th March 2011, 01:59 AM |#21  
af974's Avatar
OP Retired Recognized Developer / Retired Forum Moderator
Thanks Meter: 1,907
 
More
Here it is:

Code:
#!/system/bin/sh
#
# Apps2SD using symlinks and bind mounts
# Original Apps2SD script by shade@chemlab.org (cyanogen)
# Adapted for Oxygen ROM by AdamG
# Fixed for slow detection of SD cards by _thalamus and output a bit more debugging info so we can see where problems are arising.

# execute any postinstall script then kill it
   

enablea2sd () {
	# mount and set perms
    busybox mount -o noatime,nodiratime -t auto /dev/block/mmcblk0p2 /sd-ext;
    busybox chown 1000:1000 /sd-ext;
    busybox chmod 771 /sd-ext;

    # clean up any old symlinks, create data directories
    for i in data;
	do
		if [ -h /data/$i ];
		then
			rm /data/$i;
		fi;
		if [ ! -d /data/$i ];
		then
			mkdir /data/$i;
			busybox chown 1000:1000 /data/$i;
			busybox chmod 771 /data/$i;
		fi;
	done;

    # don't allow /data/data on sd because of upgrade issues - move it if possible
    if [ -d /sd-ext/data ];
    then
        busybox cp -a /sd-ext/data/* /data/data/;
        busybox rm -rf /sd-ext/data;
    fi;

    # move apps from internal memory to sdcard
    for i in app app-private;
    do
        if [ ! -d /sd-ext/$i ];
        then
            mkdir /sd-ext/$i;
        fi

        busybox chown 1000:1000 /sd-ext/$i;
        busybox chmod 771 /sd-ext/$i
	    
        if [ -d /data/$i ] && [ ! -h /data/$i ];
        then
            busybox cp -a /data/$i/* /sd-ext/$i/;
            busybox rm -f /data/$i/*;
        fi;
    done;

    # symlink app dirs - they must be on the same filesystem
    for i in app app-private;
    do
        if [ -d /data/$i ] && [ ! -h /data/$i ];
        then
            busybox rm -rf /data/$i;
            busybox ln -s /sd-ext/$i /data/$i;
        fi;
    done;

    # clean up old whiteouts
    for i in local misc property system tombstones data;
    do
        if [ -h /sd-ext/$i ]; then rm -f /sd-ext/$i; fi
    done;

    # please don't put odex files in the app directory people!
    # it causes dexopt to crash when switching builds!
    busybox rm -f /sd-ext/app/*.odex

    setprop oxygen.a2sd.active 1;
    
    echo "+++ Apps-to-SD successfully enabled";

}

disablea2sd() {    # replace symlinks with directories so we can boot without sd
    for i in app app-private;
    do
       if [ -h /data/$i ];
       then
            rm -f /data/$i;
            mkdir /data/$i;
            busybox chown 1000:1000 /data/$i;
            busybox chmod 771 /data/$i;
        fi;
    done;

    setprop oxygen.a2sd.active 0;
}


if [ -e /dev/block/mmcblk0p1 ]; # We check for the presence of the FAT partition first to see if the SD has initialised.
	then
	echo "SD Card has been initialised...checking for ext partition.";
		if  [ -e /dev/block/mmcblk0p2 ]; # If false, it isn't there so we don't have to sleep the script and delay the boot.
		then
			enablea2sd;
		else
			echo "No ext partition present, apps2sd disabled";
			disablea2sd;
		fi;
		
	else
		sleep 4; #Enables time for a slow SD to be detected and populate the device nodes.
		if [ -e /dev/block/mmcblk0p2 ];
			then
				echo "enablea2sd for slow SD card";
				enablea2sd;
			else
				echo "No ext partition present after sleep, apps2sd disabled";
				disablea2sd;
			fi;
	fi;

sync;
Quote:
Originally Posted by dsixda

Is it really apps2sd (apps to ext3) or is it just that hack that is used to move all apps to the fat32 partition of the SD card (the option that is in Settings of Cyanogen ROMs)? Can you paste the contents of that file here please (in [CODE] tags)


Yes it could be, i will try again maybe with anoter build.

Quote:

I don't know anything about that, probably your device's or ROM's issue because it works elsewhere. When the kitchen adds /data/app to the working folder it only sets the permissions for that folder when flashing.

 
 
18th March 2011, 02:08 AM |#22  
dsixda's Avatar
Inactive Recognized Developer
Flag Ottawa
Thanks Meter: 5,341
 
More
Ok thanks, looks like this is another version of apps-to-ext, so I'll need to update the algorithm for detecting apps2sd.
18th March 2011, 07:16 AM |#23  
dsixda's Avatar
Inactive Recognized Developer
Flag Ottawa
Thanks Meter: 5,341
 
More
Sorry guys, there were a couple of issues I found in the kitchen which affected HD2-based ROMs. Please download new version 0.143 now.
The Following User Says Thank You to dsixda For This Useful Post: [ View ] Gift dsixda Ad-Free
18th March 2011, 07:38 AM |#24  
Senior Member
Flag Huntington Beach, CA
Thanks Meter: 71
 
More
sucks that there's no work-around for a system.img build

any chance of an upcoming kitchen with a GUI like oskitchen or erviuskitchen, dsixda?
18th March 2011, 08:03 AM |#25  
dsixda's Avatar
Inactive Recognized Developer
Flag Ottawa
Thanks Meter: 5,341
 
More
Quote:
Originally Posted by lude219

sucks that there's no work-around for a system.img build

Read the kitchen FAQ for the answer.

Quote:

any chance of an upcoming kitchen with a GUI like oskitchen or erviuskitchen, dsixda?

I find those GUI kitchens more complicated than the simple Bepe Platform Rebuilder kitchen. So you want me to spend *another* year just to rewrite the kitchen so that it has a GUI that works for all three operating systems? :P. Java would probably be the best way but then everything has to be rewritten from the ground up... and I haven't used Java in 11 years. What's the point? It's fine the way it is. I've put all my effort into this, I don't want to be asked to do extra work that is not necessary.
18th March 2011, 08:27 AM |#26  
Senior Member
Flag Ha Noi
Thanks Meter: 4,214
 
Donate to Me
More
Needed a Menu for DEODEX app, framework WO rom, boot ?!
18th March 2011, 09:51 AM |#27  
af974's Avatar
OP Retired Recognized Developer / Retired Forum Moderator
Thanks Meter: 1,907
 
More
I've add some info to 1st post because it seems that for some people it is hard to click a link and read

GUI?? I like the Kitchen as it is and IMO a gui in linux its a bit noobish

Thanks for the new version Dsixda.
Quote:
Originally Posted by dsixda

Read the kitchen FAQ for the answer.



I find those GUI kitchens more complicated than the simple Bepe Platform Rebuilder kitchen. So you want me to spend *another* year just to rewrite the kitchen so that it has a GUI that works for all three operating systems? :P. Java would probably be the best way but then everything has to be rewritten from the ground up... and I haven't used Java in 11 years. What's the point? It's fine the way it is. I've put all my effort into this, I don't want to be asked to do extra work that is not necessary.

The Following User Says Thank You to af974 For This Useful Post: [ View ] Gift af974 Ad-Free
18th March 2011, 09:53 AM |#28  
af974's Avatar
OP Retired Recognized Developer / Retired Forum Moderator
Thanks Meter: 1,907
 
More
Sorry but i dont understand what is your problem.
Quote:
Originally Posted by dungphp

Needed a Menu for DEODEX app, framework WO rom, boot ?!

18th March 2011, 12:13 PM |#29  
Senior Member
Thanks Meter: 230
 
More
Some people know the right steps to build up HD2 NAND ROM?
18th March 2011, 01:03 PM |#30  
mskip's Avatar
Retired Senior Moderator
Flag Norfolk
Thanks Meter: 16,037
 
Donate to Me
More
I have unstuck this thread from the Main Forum as it has been added to the Sticky Rollup Thread which is where all sticky worthy threads are placed so they can be categorised for all our users to find easily.

Thanks for letting us all know about the update to dsixda's Android Kitchen

Mark.
18th March 2011, 05:02 PM |#31  
rasumia's Avatar
Senior Member
Flag Dubai
Thanks Meter: 39
 
More
i have tried to create a ROM from another HTC HD2 rom by imilka i was succeeded but when i was trying to flash it said for android 1.5 CWM 3.0 was not compatible it needs earlier version. am i missing some step?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes