FORUMS

Apps-to-SD in Recovery Terminal Tutorial(includes cache and dalvik-cache)

1,094 posts
Thanks Meter: 9
 
By [email protected], Senior Member on 14th April 2009, 08:15 PM
Post Reply Email Thread
Alright, I've been posting this all over trying to help people figure out how to do this and figured it's time to make a dedicated thread. If at any point you get an error DON'T PROCEED. See if I referenced the error you're getting and, if so, do what I suggested. If not, post your error here and I'll try to get back to you ASAP.

NOTE: This can now also be done through my appstoSD app posted on this forum!!!! It will do everything for you.

This tutorial assumes you have:
A: A micro-sd card with 2 partitions, the first must be FAT32 and the second must be ext2.
B: Your phone must have one of the apps-to-sd ROM's installed.
C: Busybox installed into the /system/xbin directory. For steps on this please reference Darkrift's thread.

Before we start, let's make sure your phone is set up to handle this. Open up the terminal emulator app(available in the market) and type:

Code:
su
busybox df -h
If /system/sd doesn't appear, something is wrong. Either your sd card isn't partitioned correctly or your phone has a ROM that doesn't have apps to sd enabled. If /system/sd does show up then you're set and can start the tutorial

NOTE: Moving the cache is highly unstable and works for some people but not for most. I don't recommend trying unless you have a good idea of how to get your phone back to a usable state if it starts boot looping.

Now, for the first step you need to copy all the apps over to the sd card. To do this type(still in the terminal emulator)(The third and fourth lines are for cache to sd only):
Code:
busybox cp -a /data/app /system/sd/
busybox cp -a /data/app-private /system/sd/
busybox cp -a /data/dalvik-cache /system/sd/
busybox cp -a /data/data /system/sd/
exit
exit
Once the terminal emulator app closes, power off your phone. Then, turn it on in recovery mode by holding down the home button and then pressing the power button. Continue holding the home button until the "T-Mobile G1" icon goes away and a menu comes up. Then press Alt-x to go to recovery terminal. Press enter and a prompt should come up with a "#". Now type(If you only want your apps on your sd card and not the caches, skip steps 6-9)
Code:
mount data
rm -rf /data/app
ln -s /system/sd/app /data/app
rm -rf /data/app-private
ln -s /system/sd/app-private /data/app-private
rm -rf /data/data
ln -s /system/sd/data /data/data
rm -rf /data/dalvik-cache
ln -s /system/sd/dalvik-cache /data/dalvik-cache
reboot
And... you're all set! Your phone might take a while at the android screen since it has to populate the apps tray. If it lasts >5-10 minutes then something likely went wrong. Make sure you did all the steps correctly and if you did try the steps in the recovery terminal section of this tutorial again. If it still doesn't work, post here and we'll try to get it sorted out. That aside, enjoy having your apps on SD card and the permanent 72-73MB available!

EDIT: forgot the app-private directory. Thanks, LucidREM!!!
The Following User Says Thank You to [email protected] For This Useful Post: [ View ] Gift [email protected] Ad-Free
14th April 2009, 08:51 PM |#2  
Senior Member
Flag Westport/Plaza Kansas City Mo.
Thanks Meter: 3
 
More
Maximus is the man.
14th April 2009, 09:38 PM |#3  
LucidREM's Avatar
Senior Member
Flag Baltimore
Thanks Meter: 5
 
More
Quote:
Originally Posted by [email protected]

Now, for the first step you need to copy all the apps over to the sd card. To do this type(still in the terminal emulator)(The second and third lines are for cache to sd only):

Code:
busybox cp -a /data/app /system/sd/
busybox cp -a /data/dalvik-cache /system/sd/
busybox cp -a /data/data /system/sd/
exit
exit
Once the terminal emulator app closes, power off your phone. Then, turn it on in recovery mode by holding down the home button and then pressing the power button. Continue holding the home button until the "T-Mobile G1" icon goes away and a menu comes up. Then press Alt-x to go to recovery terminal. Press enter and a prompt should come up with a "#". Now type(If you only want your apps on your sd card and not the caches, skip steps 4-7)
Code:
mount data
rm -rf /data/app
ln -s /system/sd/app /data/app
rm -rf /data/data
ln -s /system/sd/data /data/data
rm -rf /data/dalvik-cache
ln -s /system/sd/dalvik-cache /data/dalvik-cache
reboot

i see a missing step here .. what about /data/app-private
14th April 2009, 09:40 PM |#4  
OP Senior Member
Thanks Meter: 9
 
More
Quote:
Originally Posted by LucidREM

i see a missing step here .. what about /data/app-private

RIGHT! I keep forgetting that one cause that folder pisses me off and I move all the apps there to the normal app folder lol. Will fix in 5, 4, 3...
EDIT: 2,1,0
14th April 2009, 10:59 PM |#5  
Senior Member
Flag Westport/Plaza Kansas City Mo.
Thanks Meter: 3
 
More
cp: cannot stat '/data/davlik-cache': no such file or directory

whats up?
NEVERMIND. i need to go back to spelling class.
14th April 2009, 11:09 PM |#6  
Senior Member
Thanks Meter: 14
 
More
I'm sure its been asked and answered but I'll ask again! I understand it can take quite a few minutes to boot but is this every time you reboot or just the first time?

Thanks
14th April 2009, 11:11 PM |#7  
Senior Member
Flag Westport/Plaza Kansas City Mo.
Thanks Meter: 3
 
More
Quote:
Originally Posted by DynaMight

I'm sure its been asked and answered but I'll ask again! I understand it can take quite a few minutes to boot but is this every time you reboot or just the first time?

Thanks

just the first time. its moving all the apps and cache from phone to sd card during that first reboot.
14th April 2009, 11:11 PM |#8  
Smokuevo's Avatar
Senior Member
Flag Schaumburg
Thanks Meter: 50
 
More
won't that slow down the phone even more?
14th April 2009, 11:14 PM |#9  
beagz's Avatar
Senior Member
Flag Greenacres, FL
Thanks Meter: 23
 
More
the first time takes much longer. Subsequent reboots are of normal duration, comparable to the standard build.
14th April 2009, 11:18 PM |#10  
Senior Member
Flag Westport/Plaza Kansas City Mo.
Thanks Meter: 3
 
More
Quote:
Originally Posted by Smokuevo

won't that slow down the phone even more?

if you use a class six sdcard, the apps will load faster. i believe that class 6 flash media is faster than the phones flash.
15th April 2009, 12:04 AM |#11  
Senior Member
Thanks Meter: 5
 
More
Quote:
Originally Posted by stogchris81

if you use a class six sdcard, the apps will load faster. i believe that class 6 flash media is faster than the phones flash.

Pushing (writing) a 2MB file through adp push seems a bit faster to the SDCARD compared to the internal memory.
-> rough average for SDCARD : 1200 KB/s
-> rough average for system storage : 1000 KB/s

Regarding pulling (reading), internal seems faster :
-> rough average for SDCARD : 1247 KB/s
-> rough average for system storage : 1250 KB/s

These tests are everything but serious.. This is using the famous SanDisk 8GB Mobile Ultra (class 6).
To conclude I'd say that speed is almost the same, sometimes a bit faster for SDCARD.
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