Haykuro Apps to SD
From Android Wiki
Apps-to-SD on Haykuro Roms
This guide might work on other roms, but is not made for them, so use at your own risk (well, you use at your own risk anyways, but you get the point). Also it is recommended that you DO NOT do this with a class 2 card, and most likely not a class 4. They are too slow and can cause repeated crashes/constant reboots.
Preparing SD card
First you need to have 2 partitions on your SD card to do this. A good size for your apps (ext2) partition is anywhere from 150mb to 500mb. If you feel you need more than that, you are probably wrong. At this time I have 212 apps installed with other things moved to my apps partition using 120mb. Any more than this and you will slow down your phone. I have a 450mb apps partition on my 8g card.
If you are running windows you can use disk management (found in Administrative tools>computer management) if you have access to it to do some of this. Open disk management and pick the device (do not make a mistake if you like the computer you are working on). Delete the current partition on it and make a new one that is a little smaller. Once you are done you will want to use a linux live cd to make the ext2 partition. I recommend *buntu and gparte. Make sure your fat partition is FIRST and the ext2 partition is SECOND. hard disk esterno western digital
I used gparted to do this. I had an empty 8g card which I resized. I then created the fat partition also using gparted. Make sure your fat partition is FIRST and the ext2 partition is SECOND.
- Download the latest version of the rom you which to use from the Sapphire-Port-Dream Googlecode Site or from site de poker and flash it like you would any other rom (download, rename to update.zip and place in /sdcard. flash in the recovery manager).
- Boot up your new build and run "adb remount" to make /system writable, then "adb shell" to connect to it. If you do not have adb installed, you will need to download the sdk and get it from the tools folder.
If your build has busybox already installed you can skip step 1, 2.1 and 2.2 (you still need step 2, just not the sub steps) and you will NOT need to type in "busybox" before each command
- download busybox and place this file in your /sdcard. (DO NOT TRY TO FLASH BUSYBOX--IT IS NOT A ROM)
- run "adb remount" (on your desktop), then "adb shell" and then the following commands (to setup busybox):
dd if=/sdcard/busybox of=/system/xbin/busybox
chmod 4755 /system/xbin/busybox
- we need to move your apps to the new partition, and remove the old copies, then create a symlink between the 2 so the device doesnt know they moved.
busybox df -h
- look for /system/sd on one of the lines, if you see it continue, if not, something is wrong with your partitioning, start at the top.
busybox cp -a /data/app /system/sd
busybox rm -r /data/app
busybox ln -s /system/sd/app /data/app
When those commands are complete, type in "reboot" at the command line and wait for it to reboot. If all looks well, try installing some apps, or testing the ones you already had.
Setup in 5.0.1 onwards
You do not need busybox in these builds as the cp ln and rm commands are already available. So what you run from ADB would be:
- Check if your phone is recognised.
- Mount the phone into ADB.
- Bring up the shell.
- Check if /system/sd is visible.
- Skip this step if you already have your apps on SD.
cp -a /data/app /system/sd
- Skip this step if you already have your app-private on SD.
cp -a /data/app-private /system/sd
- Remove the current apps folder on device.
rm -r /data/app
- Remove the current app-private folder on device.
rm -r /data/app-private
- Link the app folder on sd to the one on device.
ln -s /system/sd/app /data/app
- Link the app-private folder on sd to the one on device.
ln -s /system/sd/app-private /data/app-private
- Finally Reboot.