[Desire Android Development] amarullz:
Great rom, Already download the v3 :)

ADSDX - amarullz Data to SD-EXT or WHATEVER YOU NAME IT :D​

Anyway.... I had some mod that compatible with this ROM to replace a2sd... This mod will move all Internal Memory (data) into

sd-ext

, "but not like data2ext", my mod will maintain the performance, because I still place dalvik-cache and system application data in Internal Memory.

Here The Alghoritm of my mod script:

After Flash, replace /system/etc/init.d/40a2sd with my mod file ( don't forget to chmod 755/777 ).

The script will do this in the first boot:

* Move Mounting Internal Memory (/data) Into /sd-ext

* Mount SDCard-Ext (mmcblk0p2) partition into /data

* Create dalvik-cache directory in Internal Memory data (/sd-ext), and symlink it to mmcblk0p2 (/data)

* Create data directory in mmcblk0p2 (/data) And symlink it into Internal Memory data (/sd-ext)

* Create symlink of app, app-private, app_s and lib_s from mmcblk0p2 (/data) to Internal memory data (/sd-ext)

* Create symlink for all non-symllink of Internal Memory data (/sd-ext) into mmcblk0p2 (/data)

After Initializing Setup (First Boot), reboot the system (Just reboot, don't go again into recovery), my mod will automatically do this following:

* Create data_s in Internal Memory data (/sd-ext)

* Move All mmcblk0p2(/data)/data/com.htc* and com.android* into Internal Memory data(/sd-ext)/data_s

* Create symlink all files/directory from Internal Memory data (/sd-ext)/data_s/* into mmcblk0p2(/data)/data/ So the System Application Data still read into Internal memory, but rest Application Data will read Into SDCard.

Ok Here The Script:

#!/system/bin/sh
#
# ADSDX - amarullz Data to SD-EXT
#
##

###
# Initializing
###

#-- SDCard Speed Fix
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]
then
/system/xbin/echo "8192" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
fi;

#-- Unmount /sd-ext if it already mounted
busybox umount /sd-ext;

#-- Mount /data and move it to /sd-ext
busybox mount /data;
busybox mount --move /data /sd-ext;

#-- Mount sd-ext to /data ( You Will Get 1GB/2GB Internal Memory :D )
busybox mount -t ext4 -o noauto_da_alloc,data=ordered,commit=15,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p2 /data;
busybox chown 1000:1000 /data;
busybox chmod 771 /data;

###
# app, app_s, lib_s, app-private, data : should in /data (mmcblk0p2)
###
for i in app app_s lib_s app-private data;
do
#-- If Symlink in /data, delete it
if [ -h /data/$i ]
then
busybox rm /data/$i;
fi;

#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /sd-ext/$i ]
then
busybox mv /sd-ext/$i /data/;
fi;

#-- If Directory Not Extst in /data, create it
if [ ! -d /data/$i ]
then
busybox mkdir /data/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /data/$i;
fi;

#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
done;

###
# For performance, dalvik-cache should be on /sd-ext
###
for i in dalvik-cache;
do
#-- If Symlink in /data, delete it
if [ -h /sd-ext/$i ]
then
busybox rm /sd-ext/$i;
fi;

#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /data/$i ]
then
busybox mv /data/$i /sd-ext/;
fi;

#-- If Directory Not Extst in /data, create it
if [ ! -d /sd-ext/$i ]
then
busybox mkdir /sd-ext/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /sd-ext/$i;
fi;

#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /data/$i ]
then
busybox ln -s /sd-ext/$i /data/$i;
fi;
done;

###
# Now create symlink of the rest non Symlink Directories and Files on /sd-ext to /data
###
cd /sd-ext;
for i in `ls -d *`;
do
if [ ! -h /sd-ext/$i ]
then
if [ ! -h /data/$i ]
then
busybox ln -s /sd-ext/$i /data/$i;
fi;
fi;
done;
cd /;

###
# Now Important Thing, is to move the com.htc* and com.android* data to /sd-ext (internal)
# For Good performance. So the system applications will run smooth.
#
# System application will read/write in Internal memory, and 3rd apps will run on sdcard
#
# Notice: Will be affected in 2nd boot :D, so Reboot the system after 1st boot...
###

#-- Prepare data_s in /sd-ext ( For system data )
if [ ! -d /sd-ext/data_s ]
then
busybox mkdir /sd-ext/data_s;
#-- Just Open All Permissions ;)
busybox chmod 0777 /sd-ext/data_s;
fi;

#-- Now Move All com.htc* and com.android* to Internal Memory
cd /data/data/;
for i in `ls -d com.htc* com.android*`;
do
#-- Only Non Symlink
if [ ! -h /data/data/$i ]
then
busybox mv /data/data/$i /sd-ext/data_s/;
fi;
done;

#-- Create Symlink of /data/data_s/* to /data/data/ (mmcblk0p2)
cd /sd-ext/data_s/
for i in `ls -d *`;
do
#-- Only If Symlink Not Exists
if [ ! -h /data/data/$i ]
then
busybox ln -s /sd-ext/data_s/$i /data/data/$i
fi;
done;

#-- Of Finished.... :D

It's only test MOD, I don't take any responsibility if you broke your system/rom/phone :D . If it was useful maybe I will start new thread about this mod.

Here The Illustration:

​

The file can be downloaded in Attachment

NOTE: YOU SHOULD UNZIP AND MANUALY COPY THE FILE INTO /system/etc/init.d/ (THIS WASN'T AUTO INSTALLER THAT CAN BE RUN IN RECOVERY)!!!!

Sorry colexe... I Borrow Your Thread for This Mod :) Hope you don't Angry with me (Angry bird???)... And sorry for my english....