[Android Software/Hacking General [Developers Only]] icecreamisdrugs:
Hi ^^

Like many of us I was having some concerns about moving away from cm6 to cm7. I was using firerat's magpie build of cm6 and LOVED it. My biggest concern was that losing a2ext is not an option for me as I have a ton of apps that I use only occasionally and don't want them taking up space on my internal memory. After looking around I found a couple of solutions that work extremely well together (so far). There was not nearly enough documentation in one place to get everything working out of the box, but hopefully this post will give you enough to get started. My solution involves using a modified version of cMTD by firerat and two apps available on the market or from xda: link2sd and S2E (simple2ext).

Background information:

Firerat's cMTD is a patch that you flash in recovery which allows you to control the size of /system, /cache and /data partitions. Using this patcher you can reduce the extra space left on /system by ~30mb, /cache by ~45mb, and increase the size of /data by the combined difference. I would suggest checking out an older post of mine (linked below) that discusses adjusting the threshold value for low space warnings if you decide to use cMTD as the threshold is a percentage value based on the size of /data. This means that the more /data space you have, the higher the threshold will be (ex: default for n1 is ~20mb, after cMTD modifications that increases to ~35mb).

Ennon's eFOS is a script that you flash in recovery which moves non-essential gapps from /system/app to /data/app, thus freeing up even more space on your /system partition. This *may not* be entirely necessary as the newest gapps archive is *much* smaller (~5mb) than previous versions and many of the gapps are available directly from the market. I'm including the scripts just in case anyone wants them.

Link2sd is a frontend for a script which manages the moving of apps to your ext partition (also supports fat) and creates syslink files in your /data/app folder which point to the app's actual location on the ext partition.

S2E(Simple2Ext) is similar to Link2sd, but instead of creating symlinks for individual apps it allows you to symlink entire folders to the ext partition. S2E may require an EXT flavor partition, but I haven't tried fat so I can't say for sure. I use S2E to move my dalvik cache and download cache folders to my ext partition freeing up even more space on internal memory.

Basic Method:

[a2ext ONLY]

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

Description:

This method will install a copy of Link2SD and S2E(Simple2Ext) to /system/app, create the mounting scripts for an ext3 partition, and adjust your low space threshold value from 10% to 3%. If you wish to recover additional space on your /system and /data partitions using FRcMTD and eFOS, see the Easy or Manual methods below.

Requirements:

+ cm7 rom

+ cm7-a2ext-installer-0.1.zip - http://hotfile.com/dl/112853289/7d2e803/cm7-a2ext-installer-0.1-signed.zip.html

Steps:

1. Download cm7-a2ext-installer-0.1.zip and move it to /sdcard/.

2. Reboot into recovery.

3. NANDROID BACKUP!!!

4. [optional] Wipe all data if installing cm7 for the first time (see the cm7 install instructions for more info).

5. Flash cm7.

6. Flash gapps.

7. Flash cm7-a2ext installer from /sdcard/cm7-a2ext-installer-0.1-signed.zip.

8. Reboot into CM7.

9. [Optional] Open S2E and enable the dalvik cache and download cache options. Moving applications are not necessary.

10. Open Link2sd (if you are prompted to select a partition type, see the link2sd note below. otherwise you should have working a2ext).

11. Reboot to complete the S2E changes.

12. Congratulations! You should now have a2ext with cm7 ^_^

Updating CM7:

1. Reboot into recovery.

2. NANDROID BACKUP!!!

3. Flash CM7.

4. Flash cm7-a2ext installer from /sdcard/cm7-a2ext/cm7-a2ext-installer-0.1-signed.zip.

5. Reboot into CM7.

6. [Optional] Open S2E and enable the dalvik cache and download cache options. Moving applications are not necessary.

7. Open Link2sd (if you are prompted to select a partition type, see the link2sd note below. otherwise you should have working a2ext).

8. Reboot to complete the S2E changes.

10. Congratulations! You should now have a2ext with cm7 ^_^

Easy Method:

[a2ext + FRcMTD + eFOS]

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

Description:

This method will install a copy of Link2SD and S2E(Simple2Ext) to /system/app, create the mounting scripts for an ext3 partition, and adjust your low space threshold value from 10% to 3%. It also includes optional steps that will enable FRcMTD and move less essential gapps from your /system/app folder to your /data/app folder.

Requirements:

+ cm7 rom

+ cm7-a2ext-package-0.1.zip - http://hotfile.com/dl/112853580/9b85471/cm7-a2ext-package-0.1.zip.html

Steps:

1. Download cm7-a2ext-package-0.1.zip and extract the contents to your sdcard.

2. [cMTD] Copy mtdpartmap.txt from the /sdcard/cm7-a2ext/cMTD folder to /sdcard/.

3. Reboot into recovery.

4. NANDROID BACKUP!!!

5. [optional] Wipe all data if installing cm7 for the first time (see the cm7 install instructions for more info).

6. [eFOS] Flash eFOS step 1 from /sdcard/cm7-a2ext/eFOS/ennon-fso-gapps1-signed.zip

7. Flash cm7.

8. Flash gapps.

9. [eFOS] If you are using eFOS, flash step 2 from /sdcard/cm7-a2ext/eFOS/ennon-fso-gapps2-signed.zip.

10. [cMTD] Flash cMTD recovery from /sdcard/cm7-a2ext/cMTD/Recovery-cMTD.zip.

11. [cMTD] Flash cMTD boot from /sdcard/cm7-a2ext/cMTD/Boot-cMTD.zip.

12. Flash cm7-a2ext installer from /sdcard/cm7-a2ext/cm7-a2ext-installer-0.1-signed.zip.

13. Reboot into CM7.

14. [Optional] Open S2E and enable the dalvik cache and download cache options. Moving applications are not necessary.

15. Open Link2sd (if you are prompted to select a partition type, see the link2sd note below. otherwise you should have working a2ext).

16. Reboot to complete the S2E changes.

17. Congratulations! You should now have a2ext with cm7 ^_^

Updating CM7:

1. Reboot into recovery.

2. NANDROID BACKUP!!!

3. Flash CM7.

4. [cMTD] Flash cMTD boot from /sdcard/cm7-a2ext/cMTD/Boot-cMTD.zip

5. Flash cm7-a2ext installer from /sdcard/cm7-a2ext/cm7-a2ext-installer-0.1-signed.zip.

6. Reboot into CM7.

7. [Optional] Open S2E and enable the dalvik cache and download cache options. Moving applications are not necessary.

8. Open Link2sd (if you are prompted to select a partition type, see the link2sd note below. otherwise you should have working a2ext).

9. Reboot to complete the S2E changes.

10. Congratulations! You should now have a2ext with cm7 ^_^

Manual Method:

[a2ext + FRcMTD + eFOS]

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

Description:

This is my original method and is more involved, but it contains all of the steps required to setup a2ext, move your cache folders, adjust your partition sizes using FRcMTD, and move gapps from /system to /data using Ennon's eFOS scripts.

Requirements:

+ cm7 rom

+ cm7-a2ext archive - http://hotfile.com/dl/112487448/8264b72/cm7-a2ext.zip.html

+ root explorer, adb, or terminal access

Steps:

1. Download cm7-a2ext.zip and extract the contents to your sdcard.

2. [cMTD] Copy mtdpartmap.txt from the /sdcard/cm7-a2ext/cMTD folder to /sdcard/.

3. Reboot into recovery.

4. NANDROID BACKUP!!!

5. [optional] Wipe all data if installing cm7 for the first time (see the cm7 install instructions for more info).

6. [eFOS] Flash eFOS step 1 from /sdcard/cm7-a2ext/eFOS/ennon-fso-gapps1-signed.zip

7. Flash cm7.

8. Flash gapps.

9. [eFOS] If you are using eFOS, flash step 2 from /sdcard/cm7-a2ext/eFOS/ennon-fso-gapps2-signed.zip.

10. [cMTD] Flash cMTD recovery from /sdcard/cm7-a2ext/cMTD/Recovery-cMTD.zip.

11. [cMTD] Flash cMTD boot from /sdcard/cm7-a2ext/cMTD/Boot-cMTD.zip.

12. [optional] If you have access to adb in your recovery see the note about adb below.

13. Reboot into CM7.

14. From root explorer:

a) Navigate to /sdcard/cm7-a2ext/link2sd-config-scripts/ use multi-select on 11link2sd and 99complete then select Copy.

B) Navigate to /etc/init.d/ and select mount r/w from the upper right corner of the screen.

c) Paste the copied files.

15. Long press 11link2sd and select Permissions. Ensure that the permissions are set to rwxr-x---. Repeat this step for 99complete.

16. Reboot phone.

17. From the market install Link2sd and S2E.

18. [Optional] Open S2E and enable the dalvik cache and download cache options. Moving applications are not necessary.

19. Open Link2sd (if you are prompted to select a partition type, see the link2sd note below. otherwise you should have working a2ext).

20. Reboot to complete the S2E changes.

21. Congratulations! You should now have a2ext with cm7 ^_^

Additional Steps:

22. [threshold value] If you are getting low space messages with ~30mb free space on internal memory, you should consider checking out my tutorial on adjusting the threshold value. The link is at the bottom of this post.

Updating CM7:

1. Reboot into recovery.

2. NANDROID BACKUP!!!

3. Flash CM7.

4. [cMTD] Flash cMTD boot from /sdcard/cm7-a2ext/cMTD/Boot-cMTD.zip

5. [optional] If you have access to adb in your recovery see the note about adb below.

6. Reboot into CM7.

7. From root explorer:

a) Navigate to /sdcard/cm7-a2ext/link2sd-config-scripts/ use multi-select on 11link2sd and 99complete then select Copy.

B) Navigate to /etc/init.d/ and select mount r/w from the upper right corner of the screen.

c) Paste the copied files.

8. Long press 11link2sd and select Permissions. Ensure that the permissions are set to rwxr-x---. Repeat this step for 99complete.

9. Reboot phone.

10. [Optional] Open S2E and enable the dalvik cache and download cache options. Moving applications are not necessary.

11. Open Link2sd (if you are prompted to select a partition type, see the link2sd note below. otherwise you should have working a2ext).

12. Reboot to complete the S2E changes.

13. Congratulations! You should now have an updated system with a2ext^_^

notes:

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

adb / terminal note:

If you have access to adb from your recovery, you can potentially avoid an extra reboot by copying the config scripts from /sdcard/cm7-a2ext/link2sd-config-scripts/ to /etc/init.d/ before you boot cm7 for the first time. I haven't tested this, but I see no reason that it shouldn't work. I'm not going to go into too much detail about terminal commands because I will assume that if you're trying this you know what you're doing and if you don't, you should probably just buy root explorer and save yourself the hassle.

cMTD Note:

As of this writing the current install size for cm7 nightlies is just under 120mb. If you install cMTD make sure that the values in mtdpartmap.txt allow for enough room to fully install cm7 or you will have issues. The current values are set to 125mb system, 5mb cache, and everything extra goes to /data. It should also be noted that cm7 dynamically detects the cache value and moves the cache location if the size is <20mb.

link2sd Note:

Normally when you start link2sd for the first time, it asks you to select your partition type so it can create a script to mount the partition at boot. The config scripts (11link2sd and 99complete) serve this function, so if you are prompted to create the script /sd-ext and /data/sdext2 have not mounted properly. This is probably due to a device specific configuration issue. The included files are for an ext3 partition. If you have a different flavor of ext, you will need to adjust the 99complete script accordingly. Also keep in mind that if you are using s2e, it does not yet support ext4 so use at your own risk.

default install location note:

Since you have gone through all this trouble, it might be pertinent to change the default install location to internal in settings > cyanogenmod settings > application > install location. This will prevent cm7 from installing apps to the native FroyoApps2SD, thus negating all the benefits of using a2ext in the first place.

updating cm7 note:

You should be aware that many of these steps will have to be reproduced every time you update cm7. This is due to the fact that cm7 overwrites many of the files you are installing when you update. Fortunately, you won't lose anything on your ext partition and things go much quicker the second time through. See the section updating cm7 above for instructions.

Links:

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

cm7-a2ext:

cm7-a2ext-package-0.1.zip - http://hotfile.com/dl/112853580/9b85471/cm7-a2ext-package-0.1.zip.html

cm7-a2ext-installer-0.1.zip - http://hotfile.com/dl/112853289/7d2e803/cm7-a2ext-installer-0.1-signed.zip.html

cm7-a2ext archive - http://hotfile.com/dl/112487448/8264b72/cm7-a2ext.zip.html

Apps:

Link2sd - http://xdaforums.com/showthread.php?t=919326

S2E (simple2ext) - http://xdaforums.com/showthread.php?t=917377

cMTD Stuff:

Firerat's cMTD - http://xdaforums.com/showthread.php?p=7061471#post7061471

cMTD cm7 specific - http://forum.cyanogenmod.com/topic/17752-cm7-issues-with-cmtd/

patched cMTD for cm7 (original post) - http://www.teamuscellular.com/Forum/viewtopic.php?f=29&t=178

Ennon's eFOS:

original thread - http://forum.cyanogenmod.com/topic/...-cyanogenmod6-firerats-cmtd-ennons-fso-gapps/

other:

How to change threshold value - http://forum.cyanogenmod.com/topic/...n-space”-warnings/page__p__107672#entry107672

cross posted from http://forum.cyanogenmod.com/topic/19160-how-to-a2ext-for-cm7/