• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Question about a2sd zipalign

Ok, I repartitioned the card and ran a2sd check...all looks good. According to the output from a2sd check, I need to type a2sd cachesd to run the dalvik cache on the sd card. I did this and it caused the phone to reboot (although before it did I saw an error message in Terminal Emulator...something about a "broken pipe"). I ran a2sd check again once it finished rebooting and it looks like the change took, though...dalvik is now running on SD. I then typed a2sd zipalign...I got the same error in the readout right after the Launching Apps2SD line ("cat: write error: Broken pipe"...whatever that means!). But it looks like it worked as well...I see "Starting DarkTremor Apps2SD in zipalign mode". So, if the "broken pipe" error isn't critical, I'm ok with it.

The most important thing is: I now have 217mb free of internal memory (woo hoo!), which was really the whole point of this whole exercise, so it looks like I was successful. My last question: when I ran the old Apps2SD app just to check, it says there are still a couple of apps that can be moved to external storage. I didn't do anything with them, but should I? Or can I just remove apps2SD app completely now, because it's really not doing anything? Thanks again for the help...I definitely can see the light at the end of the tunnel!
 
1) I wouldn't worry too much about the broken pipe error if it's working. A2sd is just a series of scripts. That particular error is a tad general, so without seeing exactly what was going on, I can't really say what happened. If it didn't work, I'd probably ask for some logs.

2) You now have free space because about 60 MB was moved to the card. If you'd like to see exactly what happened. run this from the terminal:

ls -l /data/davlik-cache

You'll see that it's now symlink to (likely) /system/sd/

3) Unless you ran a2sd reinstall, your apps are still running on internal storage, which means you can still use froyo apps2sd all you want. Until you run a2sd reinstall to move all apps to the card, you're not fully using a2sd to its full potential. Once you do that, make sure all apps are back on internal storage (according to Android), as they'll actually be on the ext partition (Android still thinks they're internal). You can keep an apps2sd app around if you like just to make sure no apps accidentally get moved to the card via that method.
 
Ok, I tried the a2sd reinstall...got a few FC's, but it went through the process of moving apps and rebooted. Now I've got 320MB free (awesome)...ran ad2d check and it all looks good. Question: does a2sd automatically move NEW apps to SD, or do you need to run this again after each app install and/or reboot?

Now, I've got another curveball question from MikFroyo's page. According to it, you should move the Dalvik cache back to the /data partition for optimum performance using the following command:

su
a2sd nocache

Do you agree that this is recommended for maximum performance in general? Or is it just a good idea for Mik's ROM?
 
1) Force closes are normal when running a2sd reinstall. It's moving all the apps, so naturally, whatever is running will crash. It doesn't really matter, as it just reboots when it needs to.

2) *All* apps that exist in /data/app and /data/app-private are now on the sdcard. The only apps that can possibly exist on internal storage are now those in /system/app. The only way to get apps back on internal storage is to run a2sd with the command to move them back (it escapes me at the moment). Basically, Android now thinks your apps are on internal storage, but they really aren't. From its perspective, it will continue to put apps in /data/app (and /data/app-private, for some things). What you've done, however, is make a link from /data/app and /data/app-private to the mount point for the ext partition on your card. When you install new apps, they just go straight there, and you never have to think about it again. You can look for the thread I created about it for more information if you're curious.

3) Eh, *techinically* you might get better performance if you move dalvik back to internal storage. If you do, it makes more sense to run a2sd nocache, then a2sd cachepart, so that it's internal, but doesn't use your usable space on /data. To be honest, I have dalvik on the card along with apps, and I have no issues. I'm on CM now, but I did the same with Mikfroyo. That being said, I have a 16 GB class 10 card, so if you're using something less than that, just use your phone for a bit, and see if feels like there are performance issues. If so, move it back. That being said, any performance issues you may have are probably more related to having moved apps rather than dalvik cache.


Sidenote: Now that you've moved apps to the card, if you run across any cases where storage and usage don't seem to add up, keep in mind that you've fooled the phone into moving all apps to a much bigger area. Install something like DiskUsage, and you'll see that it calculates total internal storage by adding free space (from /data) to used space (total MB worth of apps). Since your apps are on the card, it will calculate that your /data partition is way larger than the normal 430 MB. Just something to think about in case you ever get confused later on.
 
Wow guys, this was one of the MOST insightful and educational threads I've ever read either on here or XDA. Really helped me to understand how this all works and solve some of the very same problems the OP had i.e. internal storage. I'm off now to try my hand at this when I get home and have some free undisturbed time. I just wanted to let you know how much I appreciated this exchange and how helpful it really was. Outstanding and kudos to both of you. THANKS!
 
Back
Top Bottom