I'm not a developer (THANKS TO BACKSIDE http://www.modaco.co...le-s2e-in-g300/ that gave me the clue) so I need some help to improve some things and test in other ROM's.
This was tested in GB stock ROM and ICS Stock too, so please test it in other ROM's to know if it works or it has to be done in other way (I think Link2 SD script is placed in init.d folder in ROM's that supports it).
This is just a simple guide to use the 2Gigas internal memory as EXT-SD so we can use the Link2sd program to move apps, davilk cache and libs to this space than normally is not used when we have the external SD card. This is similar to S2ext, but I like more the options that Link2sd gives us and the fact that it works on every ROM directly and works with FAT32.
First of all we need an SD, and we have to create 2 primary partition, the both of them must be FAT32. You can use Minitool Partition Wizard to make this, or Gpated in Linux
Now we will put this partitioned SD card in the phone and install Link2sd apk. Once we run Link2sd, the program will ask us to select the filesystem of the second partition on SD, just chose the one you used. Once the script is created by the program we will restart the phone.
Now using RootExplorer we will edit the file /system/etc/install-recovery.sh.
#!/system/bin/sh
#added by link2sd
LOG=/data/link2sd-install-recovery.log
echo "$(date) mounting..." > $LOG
mount -t vfat -o rw /dev/block/vold/179:34 /data/sdext2 1>>$LOG 2>>$LOG
mount -t vfat -o rw /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
And we will edit in this way (notice /dev/block/mmcblk1p2 is now /dev/block/mmcblk0p19)
#!/system/bin/sh
#added by link2sd
LOG=/data/link2sd-install-recovery.log
echo "$(date) mounting..." > $LOG
mount -t vfat -o rw /dev/block/mmcblk0p19 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
Now we will turn off the phone and we will change the partitioned SD card by one is not (our usual SD card) and restart the phone and is done. Open Link2SD and you will see that now you have a 2Gigas 2º partition that is mounted in /data/sdext2. Now use Link2SD normally to move all the data you want to this new partition.
Is not really needed to make the external SD to create the Link2sd script, you can paste the modificated install-recovery.sh file directly in /system/etc, and fix permissions and change woners (RWE-R E-R E, Owner ROOT and Group ROOT). Then you have to create manually the /data/sdext2 directory and restart the phone. The just run Link2SD.
I thouhg it would be a problem when you plug the phone to the PC and turn on USB Storage, because once the internal memory was mounted the linked apps will stop running, but is not.. Link2SD an the system still can access the files through /data/sdext2 at the same time that PC (Stock File Manager or the other file manger using /HWUserData folder can't do it). I linked Android Weather app and put its widget on the desktop, and even the internal memory was mounted, it still worked.
CWM Recovey an TW recovery (if selected), will include the internal memory (/datadata) in their backups and restores, so you don´t have to install or restore the linked apps manually.
Tested on GB (B892), ICS (B927) and INFUSION B927*
*Thanks to wso277.
Please let me now if this works in other ROMs.
Regards.
Edited by elperroderoke, 06 August 2012 - 06:42 PM.







Sign In
Create Account


Back to top











