New and improved Apps to SD(more stable, more powerful, etc) Tutorial

Search This thread
J

Joeriginal

Guest
I did this now everytime I install an app of the market my phone reboots.
 

andonnguyen

Senior Member
Nov 12, 2008
842
3
Your "apps2sd 2" app, copying apps to sd works fine, but copying dalvik cache leaves a copy on both the internal memory and /system/sd, was that intentional?
 
J

Joeriginal

Guest
How do I make the app-private folder I think that might be my problem.
 

soulsponjah

Member
May 3, 2008
11
0
Great app. Went from JFvMOD by LucidREM APPS on SD to Dudes .94. For those having issues (broken icons) with protected apps after running this, delete the protected app, reboot and reinstall.
 
J

Joeriginal

Guest
Ok it says file exists already how do I link the app-private file back to the phone
 
J

Joeriginal

Guest
My phone keeps rebooting after doing this procedure what should I do whenever I try installing an app
 
Last edited:

isolated_epidemic

Senior Member
Sep 15, 2007
227
32
Spokane, WA
Works Great Now

3: If you want your apps to go to the sd card, you must have a directory "/system/sd/app" If you didn't have apps to sd before on the ext2 partition do the following in terminal emulator:
Code:
su
mkdir /system/sd/app
If you want the private-apps, data cache or dalvik-cache moved you can replace "app" in that code with ""app-private", "data" or "dalvik-cache" respectively.

That did it. All apps going to the sd card now and the massive amount of system memory shows a decrease when new apps are installed. Thanks!
 

lbcoder

Senior Member
Jan 21, 2009
2,613
98
What happens if you make a single ext2 partition on the sdcard? Is the system still able to mount and unmount it normally (though the gui), or is that strictly limited to vfat? Also, assuming that no system components are on the sdcard, what happens if you unmount the sdcard? Will the apps just disappear from the menu as if they were uninstalled (deleting manually from the commandline, I notice that they simply disappear from the menu gracefully), or will something terrible happen?

Now even further; assuming that all above works ok and we adjust the apps2sd onto the first partition and change the unionfs member to /sdcard, if we insert a card that contains apps and if the system is able to automount it (being ext2), would it automatically join the unionfs and have its apps appear in the menu?

Objective: keep everything on the sdcard in a single partition, let the android system mount and unmount it as it currently does with the vfat first partition, move only applications and their associated data and dalvik cache over to the sdcard, be able to unmount (and possibly eject) the sdcard, having the applications disappear from the menu gracefully, be able to insert an sdcard (perhaps a DIFFERENT sdcard), have it automount, join the unionfs, and have its apps appear gracefully onto the menu.


This would be an ideal system, and even if it wouldn't work as is, it would be trivial to implement. If anyone from google is looking at this, this system, with one addition, would be a suitable component for inclusion... that addition would be a simple encryption of the filesystem of the sdcard using a key associated with the google account of the user, which could be stored in a private area of the device fs (i.e. requires root to read) for offline access. This would prevent regular users from being able to read the protected apps off the sdcard.
 
Jun 15, 2007
1,091
9
What happens if you make a single ext2 partition on the sdcard? Is the system still able to mount and unmount it normally (though the gui), or is that strictly limited to vfat? Also, assuming that no system components are on the sdcard, what happens if you unmount the sdcard? Will the apps just disappear from the menu as if they were uninstalled (deleting manually from the commandline, I notice that they simply disappear from the menu gracefully), or will something terrible happen?

Now even further; assuming that all above works ok and we adjust the apps2sd onto the first partition and change the unionfs member to /sdcard, if we insert a card that contains apps and if the system is able to automount it (being ext2), would it automatically join the unionfs and have its apps appear in the menu?

Objective: keep everything on the sdcard in a single partition, let the android system mount and unmount it as it currently does with the vfat first partition, move only applications and their associated data and dalvik cache over to the sdcard, be able to unmount (and possibly eject) the sdcard, having the applications disappear from the menu gracefully, be able to insert an sdcard (perhaps a DIFFERENT sdcard), have it automount, join the unionfs, and have its apps appear gracefully onto the menu.


This would be an ideal system, and even if it wouldn't work as is, it would be trivial to implement. If anyone from google is looking at this, this system, with one addition, would be a suitable component for inclusion... that addition would be a simple encryption of the filesystem of the sdcard using a key associated with the google account of the user, which could be stored in a private area of the device fs (i.e. requires root to read) for offline access. This would prevent regular users from being able to read the protected apps off the sdcard.

First, removing the sd card will just make those apps disappear... and if for some reason you have the dalvik-cache of an app on the sd but the app itself on the phone memory it will make that app crash.

I'm not entirely sure how the android system would handle just having an ext2 partition and trying to use that as the /sdcard, because I don't know exactly how it does or doesn't rely on that being FAT. The only problem with that suggestion though is that an awful lot of people here use windows to put stuff on their sdcard and would be left out in the cold.

Probably the better implementation would be to make an ext2 image file on the sdcard and loop mounting that, which I have been looking into with JF and MartinFick's help.
 

AustinKnight45

Senior Member
Jan 11, 2009
704
21
Austin
WoW Thx man, this worked the first time 439mb FREE:D When I try to install Apps it reboots is there a fix for this or a undo so I can go back to the original apps2sd ?????????
 
Last edited:

gimiento

Senior Member
Apr 11, 2009
234
16
Oakland CA
I'm unclear on how to use AppstoSD2. First, you make the directory, and then you run the app? You say have to follow the tutorial to use the app, just not sure what that means.

Thanks for all the work!
 

lbingham

Senior Member
Aug 11, 2008
211
15
Bonney Lake, WA
Worked Fine

Hey, this is superb. I had a little trouble because I didn't read the entire thread first. I wound up with a boot loop, I wiped, and reapplied the JF1.5 update.zip. Then, I reformatted my ext2 partition on my Vista machine. When that was done, I did the manual update by copying the init.rc and apps2sd.sh files etc etc... I booted, checked my storage and I show 1GB of free internal space. I install apps and the amount of free space decreases.

3 questions. Do I need the Apps2SD2.apk? What would be the benefit of having a specific app on the actual phones internal mem? If it DID still default to the internal memory, what would happen once it filled up; would you still get the low storage warning that everyone hates so much?

Thanks again for this to everyone that had a part in it. This is really great.
 

overground

Retired Senior Moderator / Inactive Recognized Dev
Hey, this is superb. I had a little trouble because I didn't read the entire thread first. I wound up with a boot loop, I wiped, and reapplied the JF1.5 update.zip. Then, I reformatted my ext2 partition on my Vista machine. When that was done, I did the manual update by copying the init.rc and apps2sd.sh files etc etc... I booted, checked my storage and I show 1GB of free internal space. I install apps and the amount of free space decreases.

3 questions. Do I need the Apps2SD2.apk? What would be the benefit of having a specific app on the actual phones internal mem? If it DID still default to the internal memory, what would happen once it filled up; would you still get the low storage warning that everyone hates so much?

Thanks again for this to everyone that had a part in it. This is really great.

The APPSTOSD2 just does what you already did, so, no, you don't need it. However, the two from the market are the only ways I've found to donate to Marcus for all his hard work, so I buy em anyway.
 

Sistum Id

Senior Member
Jan 2, 2009
497
26
Phoenix
Sweet got it working. I did the donated app to sd 2 last night and did the update but the app didnt seem to move apps to sd even after a quick wipe. I did it manually posted in the 1st post.

By default all future apps are installed to the sd card. In order to move an app to the internal memory do the following in terminal emulator:

Code:
su
cp /system/sd/app/[the app you want to move] /system/intmem/app/
rm /system/sd/app/[the app you want to move]

How do we tell how much space is left if we add apps back to internal memory?
 

AustinKnight45

Senior Member
Jan 11, 2009
704
21
Austin
Hmm this is really perplexing... I'm not even sure what to have you check. Do the apps actually get installed? Like do they show up after it restarts? Did you make a /system/sd/app directory?
Ya they start to install then the screen turns black and it reboots and the app isn't installed, I made a /system/sd/app directory. I think before I went from The Dude build .93 strait to JF 1.5 (without a wipe)and everything was good, I did the original apps2sd and that was good I was running that for a week. I dont know Ill try it later I just re flashed Jf 1.5 an wiped so .
 

madunix

Senior Member
Jan 16, 2009
571
70
New York
Well, some of you may have heard my ramblings around here that I've been working with some of the devs here(JF and MartinFick deserve major praise, probably more than me) on getting a better way to do the whole apps to sd thing.

After 3 days of talking/discussing/working on it, I've finally reached the fruits of that investigation and thought I'd share. This new method uses the filesystem unionfs to essentially meld the /data directory with the /system/sd directory, so that they appear to be one. This has the potential to allow users to move specific apps to or from the sd card, is far more stable than the normal symlink method(will still boot, etc even if there's no SD card) and should be easier to set up. Now, onto the tutorial of setting this up.

REQUIREMENTS:
1: This only works on JF(possibly only on 1.5, not sure about the others). If you try it on Haykuro's or the Dude's it simply won't set up apps to sd(no bootlooping, yay!)
2: This still requires you to have 2 partitions set up, first FAT32 and seconds ext2.
3: If you want your apps to go to the sd card, you must have a directory "/system/sd/app" If you didn't have apps to sd before on the ext2 partition do the following in terminal emulator:
Code:
su
mkdir /system/sd/app
If you want the private-apps, data cache or dalvik-cache moved you can replace "app" in that code with ""app-private", "data" or "dalvik-cache" respectively.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

Alright, first there's some files you need.
1: init.rc in .zip attached to this thread
2: a2sd.sh in .zip attached to this thread

All the above listed files should be put on your sd card(my tutorial will assume they are in the root directory of the sdcard(the topmost folder)

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

If you need to undo the normal apps to SD first do the following in the recovery terminal(it's not strictly necessary but I'd recommend it):
Code:
mount data
rm /data/app
mkdir /data/app
if you moved the dalvik cache, repeat steps 2-3 with "dalvik-cache" instead of app. If you moved the data cache, repeat them with "data" instead of "app"

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

Then go to terminal editor and type the following:
Code:
su
mount -o remount,rw /dev/block/mtdblock3 /system
cp /sdcard/init.rc /data/
cp /runme.sh /data/
cp /sdcard/a2sd.sh /data/

Then reboot and you're set. By default all future apps are installed to the sd card. In order to move an app to the internal memory do the following in terminal emulator:

Code:
su
cp /system/sd/app/[the app you want to move] /system/intmem/app/
rm /system/sd/app/[the app you want to move]

I will be incorporating this into my appstosd app soon(probably as a JF-only version until the rest of the devs get on board).

UPDATE: I have now included a copy of appstosd 2, which will copy all apps from internal memory to the sd card with an option to remove them from the internal memory. This will only work if you have followed this tutorial.

EDIT: after talking to the dude a bit, he decided to incorporate this into his next build(without any need for user setup). Exciting!

EDIT EDIT: now installs apps to sdcard by default and allows apps to be moved back and forth between phone mem and sd card.



sooo i just did all of this, and now my phone read that my internal memory has 468mb available, what did i do?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    umm when i run appstosd it says it formats but then when i push reboot now nothing happens.. also, when i type reboot at the terminal it tells me i dont have permission even tho im already running su