How 2 A2SD (via DarkTremor and Joneidy's Custom Recovery)


  1. teh_dude

    teh_dude Well-Known Member

    Partitioning your SD card:
    ---------------------------
    Preface: This covers only steps involving using an SD already in the phone. Steps involved with installing a new SD are similar, but just involve extra steps with unmounting the original card, turning the phone off, and installing a new card before proceeding with partitioning.


    1. Reboot the phone into recovery, plug in, toggle USB M-S to ON, and backup the contents of your SD to your computer.(Partitioning the SD wipes its contents completely. If you've gone as far as installing a custom rom, you should already know how to do this backup. Backups of everything are a lifeline for any android nut.) Turn off USB M-S.

    2. Go back into the main menu for recovery, and choose "Partition sdcard". It will ask you to confirm by pressing menu or any other key to abort. Confirm.

    3. Now you set the partition sizes. Follow on-screen instructions to do so. Linux swap ("Swap-size") is a partition that is used largely in the same way as Windows uses a page file if I understand correctly (I'm open to corrections). It's not always used, but I would say it's a bad idea to not have one. Set one just in case. The typical size is 32 MB. SD-EXT ("Ext2-size") is the partition that will be used to move your apps and dalvik cache to your SD card. Typical size is 512 MB. I used that size until my recent upgrade to an 8 GB SD card, on which I partitioned 1024 MB (1 GB) for SD-EXT. After setting these two, recovery will automatically use the remainder of the SD card's storage space for FAT32 ("FAT32-size"). FAT32 is the filesystem for the very large partition of the SD card that you can see and use. The contents you backed up to your computer are stored in this partition.

    4. Once you've set the partition sizes, recovery will now ask you, "Continue partitioning?" Again you must confirm or abort. Confirm. It will then begin to partition the card. This is where you become grateful that you've backed up everything that was on your SD card, because now, it's empty.

    5. When it finishes, it tells you, and you have your partitioning menu back. Scroll down to the option that says "SD:ext2 to ext3" and select it. Confirm your choice. (An Ext3 partition is necessary for A2SD to work here. It'll take a minute and then finish, as before.)

    6. Go back to the main menu, and toggle USB M-S to ON again. Copy your previously-backed-up SD contents to the card. Turn off USB M-S, go back to the main menu, and reboot the phone.
    ------------------------------------------------------------------------------------------------------------------------------------

    A2SD steps for DarkTremor scripts already installed:
    ------------------------------------------------------
    Preface: note "already installed". If you have a rom installed like Joneidy's sense rom, then you have DarkTremor A2SD scripts installed. If you do not have them installed, here's a link that should help, and also has some similar instructions to what I provide here on usage after install: (
    Darktremor Installation Instructions | Facebook). If you need the scripts, here's a link: (http://forum.xda-developers.com/showthread.php?t=715940)These steps only explain how to use the DarkTremor scripts. The first set of steps explain how to do it through ADB Shell, and the second set of steps explain how to do it using A2SDGUI, the app designed specifically to work with the DarkTremor scripts. If you want to do this the ***easy*** way, skip past and scroll down to the steps for A2SDGUI.

    Through ADB Shell (These steps assume you already have ADB installed and know how to get into it, and gain superuser access. These steps start after having already come to the superuser prompt, noted by a "#" before where you type in the command prompt or terminal):

    1. Type "a2sd check". This will give you a run-down of the status of where your Dalvik cache runs from, and where your apps and private apps run from. Read carefully through the results that come up (you can scroll through the command prompt--just maximize the window and scroll up), and they should explain what must be done next.

    2. If the above reveals that your apps are NOT running from SD card, then you should see that it has told you to type "a2sd reinstall". Do that, and sit there and watch the magic happen (as it moves your apps to your SD-ext partition). It'll take a minute or two, and then your phone will reboot (the command prompt will tell you when it's about to--don't disconnect your phone), and you will be exited out of adb shell. (Once you move your apps to SD, the main boot process won't change much, but after your homescreens load, in your app drawer, some things will appear to be missing. Maybe even your home launcher will lock up and try to force close. If so, just tap Wait, and in either case, just wait a minute. It'll all come back. This is how boots will be from now on, but after that, everything will proceed as normal.) Once booted, go back into A2SDGUI.

    3. If the "a2sd check" told you that your Dalvik cache is still running from internal storage, go back into adb shell and into the su prompt, then type "a2sd cachesd". This will migrate your Dalvik cache to your SD-ext partition as well in the same fashion as above, including a reboot. On either this step or the last step, you may see some sort of error toward the end of either process. Continue with the next steps to verify that you've achieved the above tasks. If so, don't worry about it.

    4. Run "a2sd check" again. If the results tell you all is well, and that your apps, private apps, and dalvik cache all run from the SD card, then no worries, you should be good to go.

    5. To see the benefits once you've completed the above steps, go back into ADB shell again, and type "a2sd sysinfo". Yes, you will get a BUTTLOAD of information thrown at you. scroll back up, and you should find crammed in there a line that says "[ ] Partition Information:", and then below that, a large list of partitions. Many of them are just your list of apps on SD, but the first few are where you want to look. Easy identification is found by looking in the right-hand column for any of these entries under the heading "Mounted on". Look for the line that says "/data"--it should be the 4th one down. That's your phone's internal storage for apps. Each line has size, used, and available. You should see that out of ~200 MB, you still have a majority of it remaining after you've moved everything to SD.

    6. The last thing I recommend is setting ZipAlign to run every boot. I don't understand all the technical stuff behind it, but I take it to mean kind of a "defrag" of all your apps. Basically your data will all be streamlined, and you'll boot up much faster. I sure do. Just type in the command "a2sd zipalign", and you should be good to go. Then reboot your phone twice. You should see a faster boot on the second reboot.
    ------------------------------------------------------------------------------------------------------------------------------------

    Through A2SDGUI (First off, this is an app available for free on the Android Market. This is the easy method. It will only work for you if you are a) of course rooted (you wouldn't even have DarkTremor if you weren't), and b) you have the DarkTremor scripts installed (again, in this case they come already with Joneidy's sense rom). Just search the Market for "A2SDGUI" exactly. It should be one of the first results that come up. Download/Install the app, open it, then follow these steps):

    1. Opening the app, a popup will tell you roughly that you're doing this at your own risk, and you can't get mad at them if things go wrong, but that everything will probably go alright. Click "Yes" to continue. (Later steps will only cover buttons that apply to achieving the goal of migrating stuff to SD-ext and setting up zipalign. Other buttons will not be mentioned.)

    2. The first tab it always starts on is the Apps2SD tab. After you click "Yes" to continue and the app finishes loading, the first button on this tab will either say "Apps are on internal Storage!" or it will say "Apps are on SD!". If it says "Apps are on internal Storage!", tap the button to move your apps to SD. I think the phone is supposed to reboot here, I'm not sure. It does reboot when doing this in ADB Shell, so it probably does here. I have too many apps to move them back to internal storage with the gui to try it out lol (I originally moved my apps to SD with ADB). If it says "Apps are on SD!" then, well, leave it alone lol. (Once you move your apps to SD, the main boot process won't change much, but after your homescreens load, in your app drawer, some things will appear to be missing. Maybe even your home launcher will lock up and try to force close. If so, just tap Wait, and in either case, just wait a minute. It'll all come back. This is how boots will be from now on, but after that, everything will proceed as normal.) Once booted, go back into A2SDGUI.

    3. The next button says either "Zipalign on boot is OFF!" or "Zipalign on boot is ON!". ON is better and = faster boots. Turn it on if it's off. I have yet to see any adverse effects. Reboot your phone, and then reboot again. After the 2nd reboot when everything has already been zipaligned, you should see a difference in boot speed. For a somewhat laymen's description as to what Zipalign is, see step 6 above in the ADB Shell instructions.

    4. Tap the 2nd tab at the top. It should look like a pie-chart with the word "Dalvik" underneath it. The tab will take a minute to load as it's analyzing where everything is at. Once that's done, you'll see three options up top with blue or white dots next to them. The one with the blue dot is the current status. The statuses are: "Dalvik Cache on SD-EXT", "Dalvik Cache on /cache", and "Dalvik Cache on Internal memory". If it's already on SD-EXT after the tab loads, leave it alone. If it's on internal storage, tap the option for SD-EXT, observe the statement in RED that says "Any of these actions will reboot your device!", and then tap "Move!", and let your phone do its thang.

    5. Once you're rebooted, go back into the A2SDGUI app, and make your way over to the 4th tab labeled "System Info", that has a green circle with a white "i" in it. Once it loads, you can see the benefits of your apps+cache migration. You should have over 100 mb freed up in your internal memory.

    Enjoy! :D

    EDIT: For reasons posted in another thread, I ended up re-flashing Joneidy's updated Sense ROM, and after getting it all set up and rebooting a few times, I've noticed that this time around I'm not experiencing near the delay that I was before for all things SD to kick in. So you might have better luck than I first described. :)

    EDIT 2: I've discovered with experience that Joneidy's recovery, bless his heart, can't do much with an SD-EXT partition except create it and upgrade it. If you want the ability to specifically wipe the SD-EXT partition without re-partitioning the card, use getitnowmarketing's All In One 2.2.1 recovery. Here's a scenario in which you might want to wipe SD-EXT along with /data, etc:

    If you're switching roms, but you know the next rom you use you'll still be using A2SD, whether it's included or going to be installed later, you'll want a fresh start, with fresh app installs from TiBu, etc. This is needed because when you wipe /data, /system, etc, you're removing all the symbolic links created by A2SD, and so you'll have a bunch of useless stuff in your SD-EXT partition. So you wipe it with everything else, but you don't need to partition the card, so your FAT32 partition can stay as-is.

    Joneidy's a great guy (so nothin personal man), but here's a link to getitnowmarketing's recovery:
    http://androidforums.com/getitnowmarketing/330813-all-one-recovery-thread.html

    His recovery (and a lot of them) are navigable in largely the same way. You should be able to adapt my original instructions to his menus. Also, his recovery lets you backup SD-EXT, and really, backup everything to one giant big fat bloated image of your phone, SD, etc, except your FAT32 partition--still on your own for that of course. This is useful with A2SD, since SD-EXT is made part of the file system.

    Advertisement
  2. alfick3

    alfick3 Well-Known Member

    Great info!
    teh_dude likes this.
  3. Are we certain the swap is even needed? I remember reading it wasn't needed for some reason so I made mine 0 and I have not noticed any problems...
  4. teh_dude

    teh_dude Well-Known Member

    I haven't used it either. I was mainly saying to make one because if you do end up needing to use it, it'll be there, instead of having to go back and re-partition.

    EDIT: You can see if swapping is even turned on in the A2SDGUI app on the first A2SD tab. I just didn't cover it because it doesn't have anything directly to do with moving your apps/cache to SD.
  5. pl4life52

    pl4life52 Well-Known Member

    Great Job, thank you i couldnt get it to work right before this write up helped alot:D
    but i only have 80mb of internal :/
  6. teh_dude

    teh_dude Well-Known Member

    You're welcome. As to the 80 mb, well, I dunno. If you moved both your apps and your dalvik cache to sd-ext as described above, not sure what else you can do, but I also don't know how many apps you have installed. A tiny bit of space will still be used in internal storage for each app, but not much.
  7. pl4life52

    pl4life52 Well-Known Member

    yea i know some is going to be used up but i dont have many apps installed.
    whats weird is that i cant move somethings to the sd card like themes i have moved them before. also would this increase the quadrant score?
  8. teh_dude

    teh_dude Well-Known Member

    You say you can't move some things, and this tells me that you're still trying to use the native Froyo apps2SD. Is this the case? In other words, are you going into settings>manage applications and picking individual apps and trying to use the "Move to SD card" button?
  9. pl4life52

    pl4life52 Well-Known Member

    yes, am i doing it wrong?
    i used gui and clicked the move to sd, so maybe all of the apps are on sd?
  10. teh_dude

    teh_dude Well-Known Member

    Yeah with this kind of A2SD, it is entirely different from doing it through settings. This is the kind of setup where you go into that GUI or through ADB, do it once, and then every user app just gets installed on SD by default afterwards.

    To fix your problem, do you have ADB installed on your computer? I would guess so considering you've got the sense rom, etc., right?

    If so, plug your phone up to your computer via USB, open a command prompt, and type in "adb shell", <enter>, "su", <enter>, then "a2sd check", then <enter>. Here's what your results should look like:

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Users\The Dude>adb shell
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    sh-3.2$ su
    su
    sh-3.2# a2sd check
    a2sd check
    [ ] Apps2SD is launching...
    __ _____
    | \ |
    | | |
    |__/ | Darktremor Apps2SD 2.7.5.2 (2010-09-30)

    [ ] GetProp Command = /system/bin/toolbox getprop
    [ ] SetProp Command = /system/bin/toolbox setprop
    [ ] Mount Point = /system/sd
    [ ] Creating /cache/dc
    [ ] Symlinking /cache/dalvik-cache to /data/dalvik-cache
    [ ] Starting Apps2SD Check Program.
    [ ] Checking for ext partition

    Darktremor 2.7.5.2 Apps2SD Status Report
    ================================================================================
    ===
    Legend:
    [*]=Setting is correct
    [!]=Setting is correct, but not optimal.
    [X]=Setting is incorrect and needs to be fixed or option is not availabl
    e.
    ================================================================================
    ===
    Block Device -
    [*] Found
    -
    [*] /dev/block/mmcblk0p2
    EXT Partition -
    [*] Mounted
    Mount Point - [ ] /system/sd
    Partition Type -
    [*] EXT3
    Support EXT2? -
    [*] Yes
    Support EXT3? -
    [*] Yes
    Support EXT4? -
    [*] Yes

    Apps - [ ] Linked to SD Card.
    [ ] No Apps2SD Flag File not found.

    [*] Programs run from SD card
    To run from internal storage, type a2sd remove

    Private Apps - [ ] Linked to SD Card.
    [ ] No Apps2SD Flag File not found.

    [*] Private Programs run from SD card
    To run from internal storage, type a2sd remove

    Dalvik Cache - [ ] Symbolically Linked.
    [ ] Dalvik to SD flag file found.

    [*] Dalvik runs from SD card
    To run from internal storage, type a2sd nocache
    To run from /cache partition, type a2sd cachepart

    Swap - [ ] Partition not present or no swap support.

    [*] Swap does not start.

    ZipAlign -
    [*] Running at boot.
    To deactivate it, type a2sd nozipalign

    Dalvik Heap(MB) -
    [*] 32m

    Low Memory
    Killer Settings -
    [*] 1536,2048,4096,5120,5632,6144
    Note: Values are in pages.
    1 page = 4KB memory.

    Values represent the following:
    1st number = Foreground App
    2nd number = Visible App
    3rd number = Secondary Server
    4th number = Hidden App
    5th number = Content Provider
    6th number = Empty App

    [&#915;
  11. pl4life52

    pl4life52 Well-Known Member

    alright just ran the check all is the same except for:
    Dalvik Heap(MB) -
    [*] 32m
    mine is 24m not 32m
  12. teh_dude

    teh_dude Well-Known Member

    EDIT: Sorry about the super long reply. I do that sometimes--ever notice? LOL...please read it all though, I hope it's useful.

    That's not going to change how much internal storage you're using. That's more of an efficiency issue--how much memory gets to be used at once to run apps and other processes before it has to kill something else if I understand correct.

    If you have asterisks next to everything saying it's all running off of the SD, then you've got it set up right. Basically, all the user apps are running off of SD, but DarkTremor creates a symbolic link on internal storage, so Android still "thinks" it's on internal storage. So using Android's native apps2SD doesn't really do much at that point except try and store some data in the android.secure directory on your SD card.

    What this means is the user apps that you think are NOT on SD, really ARE on SD

    If you want to be certain, you can always go back into the Froyo apps2SD, and "move them to phone", and then using the GUI or ADB, switch apps back to phone, and then back to SD again, but I don't think it makes a real difference except it gets rid of the unnecessary record in android.secure. In the GUI, it's a button tap, as should be self-evident. In ADB, the command to move apps to the phone is "a2sd remove", and the command to move them to SD is "a2sd reinstall".

    The other thing you can do is observe that there are certain apps that were included with the Sense ROM that are listed as system apps, but are not really system apps, like Phandroid, PlayerPro, etc. Go into Titanium Backup, and go to the main Backup/Restore list, and find them. If they're treated as a system app, their name will be in red text. Do a long-press on them, and scroll through the list of buttons that comes up to find the one that will convert them to a user app. Tap that button and let it do its thing. When it works, the app will then be listed there with white text.&nbsp; Sometimes it may not quite convert it all the way--if not, the text will still be red for that app. Just do it again and it oughtta work.&nbsp; And then either reboot or redo a2sd if need be (I can't remember if either is necessary, nor can I remember what I did lol), and those apps too will get moved over.&nbsp; Just be careful though, and don't convert something that really is a system app. Like don't go converting Gmail or car home or settings--things that are truly integral to Android's workings need to stay on the phone.

    Then if you still have at best 80 MB remaining on internal, well, I dunno what to tell ya. Mind telling me what apps you're using by chance? or at least a count? You can get a quick count if you go into Titanium Backup, hit Menu&gt;Batch, and scroll down to the backup/restore menu in batch mode, and next to the option to back up all user apps, there'll be a number of how many you have.

    Also, you might see if there's any apps that you have that store large amounts of userdata, but for some reason store it on the phone instead of on SD.&nbsp; Most seem to make a folder on SD and store it there.

    One thing that's interesting to note, however, is that at least with me, ADB commands will always work to remove and to reinstall, and also to move the dalvik cache, but the GUI will only let me move everything to SD, and otherwise correctly show me the status of where everything is at. the GUI will not let me move anything back to the phone. Apps I can understand--I don't have the room. Dalvik Cache will fit though. No big deal though, because I can use ADB if I have to, and I like everything being on SD. I can "breathe better" lol.

    In addition, if you're curious on your own as to what exactly got moved to SD via DarkTremor, go into Root Explorer (if you don't have it, pay the few bucks and get it--it's an invaluable file explorer that lets you reach every inch of your phone's file system pretty much), and go to /system/sd. Scroll through and see what you see. You'll find it's all the "com.weirdpartialappname.this.that.apk", so I find it easier to scroll slowly enough to let all the icons load, because I recognize them instantly lol.

    I've added apps since I made this thread, and I'm down to 117 MB internal remaining, and I've used up a total of 315 MB in SD-EXT including apps and dalvik cache. You might just have more apps than you think lol. I just backed up 16 new apps and new updates together. Didn't realize I had that many new ones lol.
  13. pl4life52

    pl4life52 Well-Known Member

    ok that def broke it down to me alot better lol
    i have seen the "com.weirdpartialappname.this.that.apk" when i go through settings then apps.
    i have a total of 51 apps, i sure thought i had alot less lol
    i have 146mb free of internal now out of 201

    and what about these com.weirdpartialappname.this.that.apk things can you delete them?, what are they really there for?

    thank you for the help
  14. teh_dude

    teh_dude Well-Known Member

    Do not delete!!!!!!!!!!!!!!!!!! They're an integral part of your installed apps. In the case of what I was referring to, they are the big chunk that was moved to SD since they are in the /system/sd folder.
  15. pl4life52

    pl4life52 Well-Known Member

    alright i just wanted to make sure thanks
  16. kris0933138

    kris0933138 Well-Known Member

    once im done and threw doing everything do i need to keep a2sd installed?
  17. alfick3

    alfick3 Well-Known Member

    I do believe so. If I'm not mistaken, it's integral to how everything is set up and how your phone now handles storage for your apps. If I'm mistaken, please someone correct me so I'm not leading kris0933138 astray.
  18. starstress

    starstress Well-Known Member

    Great post but lemme ask you this. Doesn't this happen automatically when you flash the rom? I don't remember doing it anything when I flashed the rom my apps just went to sd. As long as I had the sd card partitioned.
  19. alfick3

    alfick3 Well-Known Member

    Were you asking me this? I know that with Aplus ROM, he put A2SD built into the ROM. I had to go in and check a couple of settings to move dalvic cache and something else that I don't remember now, but other wise it was pretty seamless.
  20. starstress

    starstress Well-Known Member

    I was asking teh dude. The I'm just wondering if doing this saves even more space or is it just the same process
  21. teh_dude

    teh_dude Well-Known Member

    Sorry about the delay in my reply. It's an interesting question. The truth is, I didn't learn about all the details of this until after installing the latest update of Joneidy's sense. Read on...

    I think that maybe when I was using the previous version where I couldn't get bluetooth working, that it was automatically set up, as I always did have a bunch of free space for internal storage. I had observed that through Titanium Backup. However, in TB, it wasn't showing the A2SD/SD-ext partition back then, and I still thought that using the native froyo apps2SD would do the trick. I now know it wasn't showing it in TB because I didn't have A2SD entirely set up properly.

    When I flashed this latest update, I noticed that I no longer had all that free space, and I was struggling to fit all my apps, even after using the native Froyo apps2SD. That's when I started learning about all this. Evidently with the latest update for some reason, it wasn't automatically triggered this time to run everything from SD (even though of course DarkTremor was installed along with the ROM). So I learned to do everything that I posted about here, and when I realized how bloody useful it is, I made the post. So for anyone who might be in the situation I was after the latest update, or who otherwise wants to try out the DarkTremor scripts, I figured it might be useful.

    If it's already properly set up though in the first place, then redoing it should have no effect. Like if I went back and re-did mine, I'd be in the same spot I'm in now, since any new app installed after proper A2SD setup gets automatically installed to the SD card. If any extra space is gained in redoing it, then best I can tell, that just means there were some apps that for some reason weren't running from SD entirely--something that "a2sd check" will usually catch. "a2sd reinstall" fixes it every time though.
    starstress likes this.
  22. teh_dude

    teh_dude Well-Known Member

    Yes, to my knowledge, you must keep it installed. At the very least, it doesn't seem to be a space hog of its own, and you'll want the scripts there to use if something goes wrong, because you'll be able to use them to repair a2sd or undo it if you need to for some reason (like if you're replacing your SD card, etc).

    If it's not totally necessary, it might make sense in the idea that it has already created the symbolic links necessary for what's there, but if you remove it, there won't be anything to my understanding that will be present to immediately migrate new apps and new dalvik cache elements over to SD.

    Maybe you can think of it like a trash compactor lol. You know, the kind you can have in the kitchen under the sink, where you just line the can and throw your trash in there, but occasionally run the compactor so you dont have to change the bags as often? If you compact the trash once, great, you get more room for a little while. So then you uninstall the trash compactor and put the trash can back in its place. But what happens when you fill the bag up again? No more compactor means you gotta replace the bag. So you keep the compactor so you can keep re-compacting as more trash is added. Same way, I think that you have to keep the DarkTremor scripts installed, so when you add more apps or the dalvik cache gets changed, you can still send the new stuff over to the SD card (in this case, automatically) and it won't fill up your internal storage.
  23. starstress

    starstress Well-Known Member

    no matter how you slice it though a2sd kicks ass cause the internal memory isnt enough by a long shot
  24. teh_dude

    teh_dude Well-Known Member


    TRUE! I think the time for serious phone upgrade consideration for me will be when even with A2SD, I'm out of internal storage from too many symbolic links, and I don't wanna get rid of any of the apps I have anymore and I'm stuck trading out installations from Titanium Backup records lol.

    Hopefully that'll be quite awhile since I'm still free by over 100 MB and I have an 8 gig SD. Because well, I can't afford a new phone right now lol.
  25. kris0933138

    kris0933138 Well-Known Member

    after i have done the partition part i get stuck in the animation boot just keep playing over and over. just had to whip and reinstall my rom? any reason this happening?

Share This Page