Move Applications to Memory Card

April 12, 2009

This is little write-up assumes two things:

  1. Your Android device has Busybox installed. (You have either Haykuro 5.01+ or JesusFreke ROM) 
  2. You have the Android SDK installed on your computer and your environment includes the path to your Android SDK.

Now this was written for an HTC Dream (T-Mobile G1); however, I assume this can also be used for other Andoird based devices.

  1. Launch the Terminal or Command Prompt
  2. In the terminal or command prompt type:
  • adb shell
  • df -h (This will show you a list of partitions available to the device)

At this point you will see something like this:

 

# busybox df -h

Filesystem                Size      Used Available Use% Mounted on

tmpfs                    48.4M         0     48.4M   0% /dev

tmpfs                     4.0M      8.0k      4.0M   0% /sqlite_stmt_journals

/dev/block/mtdblock3     67.5M     64.0M      3.5M  95% /system

/dev/block/mtdblock5     74.8M     34.1M     40.7M  46% /data

/dev/block/mtdblock4     67.5M      1.4M     66.1M   2% /cache

/dev/block/mmcblk0p2    552.5M    432.0k    524.3M   0% /system/sd

/dev/block//vold/179:1

                          6.8G     42.5M      6.8G   1% /sdcard

 

I’m using a 8GB memory card, your volume sizes will differ. The location to where you’ll be moving your applications to would be the /system/sd partition. Make sure this exists and its size is the one your partitioned it to be earlier. If the partition doesn’t exist your partitioning went wrong somewhere so back up and try again, until you see it.
  • cp -a /data/app /system/sd (This will copy the applications from your applications directory to your memory card)
  • cp -a /data/app-private /system/sd
  • rm -r /data/app (This will remove the applications from the phone’s memory)
  • rm -r /data/app-private
  • ln -s /system/sd/app /data/app (This will create a “link” so that you can install applications on your memory card.)
  • ln -s /system/sd/app-private /data/app-private
  • reboot

That’s all. If you need additional help the wonderful folks at xda-developers can assist you. Additionally, a more in-depth version of this is available here.

Comments

Leave a Reply

You must be logged in to post a comment.