yashsingh1/xdaforums huggingface dataset:
[EVO 4G Android Development] tkirton:
It allows you to adjust the low memory killer function that is native to Android. That will tell Android at what memory threshold to kill programs.
[EVO 4G Android Development] aaron130:
Will this work on 2.2 Roms?
[EVO 4G Android Development] snandlal:
Yes but the kernel needs to support it
[EVO 4G Android Development] aaron130:
DO u know if the stock kernel supports it? I'm running stock deodexed.
[EVO 4G Android Development] tkirton:
Stock roms do not support it straight from Sprint. The boot image has to be modified with the correct launch commands.

This is true for any form of Apps2SD.

Check with the developer that built the rom to see if they added support for apps2sd.
[EVO 4G Android Development] tkirton:
It will, but the rom developer needs to put the launch commands into the init.rc, just like for any other rom.

I'm running CyanogenMod 6.0 (a daily build version) and I was able to get Apps2SD working on it in roughly two minutes (just added the commands that are in the Apps2SD Rom Guide)
[EVO 4G Android Development] tkirton:
Bump...new version of Darktremor Apps2SD (2.7.5 RC2)
[EVO 4G Android Development] kokwei:
hi tkirton,

I'm a huge fan of your A2SD script and I've been using it on the CM6 nightlies for HTC Desire everytime I flash a new ROM release.

Everything is working like a charm (with Dalvik-Cache moved to SD) but I'm really curious on your experimental code on allowing the /data/data directory to be moved to SD as well.

I can help test if you need any assistance. I'll just do a Nandroid backup prior to trying anything risky ;-)

I actually wanted to try and create a data directory in /system/sd and manually create a symlink from /data/data to point to /system/sd/data.

Need your expert advise if this is practical.
[EVO 4G Android Development] tkirton:
You can actually do that without interference from Apps2SD. I took the code out that forced it back to /data/data in 2.7.5 Preview Fix.

My results have been that it resets settings when moved (it could have been the rom I was using as well). It's almost like I have to move something else.

Anyways, I didn't put the code back to force /data/data to go back to Internal storage, so if you wish to experiment, feel free to. I am interested in your findings, though, as I may decide to add this feature before I finalize 2.7.5.
[EVO 4G Android Development] tkirton:
Bump...new version 2.7.5 RC3 released.
[EVO 4G Android Development] freeza:
fantastic!
[EVO 4G Android Development] tkirton:
RC3C is released...it's mainly a bug fix for the CyanogenMod nightly build.

I have RC4 being cooked up as we speak. Another set of major changes on the way.
[EVO 4G Android Development] rjmjr69:
Awesome news thanks
[EVO 4G Android Development] freeza:
Can't wait :).

Do you accept donations?

This is probably the single most useful tool on Android to date, and showing my appreciation for your time and effort would be my honor.
[EVO 4G Android Development] ro2themax:
i just rooted my EVO phone and im using clockwork recovery with a rooted stock 2.1 rom. i tried flashing app2sd but when i get into recovery, there is no command to partition the sd card. can somebody help me with that please?
[EVO 4G Android Development] jerdog:
May be a really dumb question... but do you need to format your SD card if you only want to move dalvik to the cache partition and maybe utilize JIT?

Or is it all or nothing?
[EVO 4G Android Development] ro2themax:
i formatted the sd card but it still doesn't give me a path to partition it.
[EVO 4G Android Development] ogrenator:
im right there with you also on an evo and no option for the partition menu
[EVO 4G Android Development] tkirton:
You shouldn't have to with the RC3C. I know this will definitely be the case with RC4 as the dalvik-cache functions will be moved to the beginning of the process. If you run a2sd cachepart without an SD card, it should work (a2sd cachesd won't work without an SD card...for obvious reasons).

For JIT, you don't need an SD card for that.
[EVO 4G Android Development] tkirton:
It's odd that clockworks doesn't have that option.

Sorry...I don't have an Evo (waiting until October before moving to the Evo...if anyone has any in stock when October 1 comes around).

Is there an Amon_RA version or a GodSpeed version? You may want to talk to Darchstar or Toastcfh (both created GodSpeed) to see if there's a version available for the Evo.
[EVO 4G Android Development] jerdog:
So JIT is automatically installed with RC3C? Or is that a separate install?

I ran the "New Install" for Rc3c and everything went in. I rebooted back into Recovery and tried running "a2sd cachepart" and I get that a2sd can't be found....

EDIT: so I rebooted - and after some "loops" where the animation restarted it finally booted - and I went into adb shell and got the following:

I assume because my Evo was plugged in and the SD Card was mounted via USB....

I then got:

I now am getting FC for everything...... rolling back to my nand backup. Any ideas?
[EVO 4G Android Development] tkirton:
1. Apps2SD automatically runs (it never really installs since it is a script, not an apk) at startup. There is no reason to run a2sd without any parameters after boot.

2. Force Closes may be due to the rom you are using. Is the rom you installed using SenseUI? If so, SenseUI, I think, resets the dalvik-cache if it is on the /cache partition (actually, it resets everything on that partition). So, your dalvik-cache will build as normal, only to be wiped out by SenseUI.

Either you are going to have to put the dalvik-cache somewhere else (either internal storage [via a2sd nocache] or the SD card [via a2sd cachesd]) or switch to a rom that doesn't use SenseUI (i.e. CyanogenMod).

3. JIT doesn't automatically install (some roms can't handle it). To install, type a2sd jit. Type a2sd help for additional commands.
[EVO 4G Android Development] jerdog:
I am using Calkulin's 1.1 build.... It was SenseUI, but I thought I had removed all Sense objects loading (Rosie.apk and other asundry HTC widgets and such).

I will try the a2sd cachesd....
[EVO 4G Android Development] ro2themax:
after doing some long research, what i did was download rom manager from the market and it gives me the option to use either clockworks or amon ra.....i used amon ra and it gave me the options to partition the sd card....unfortunatly i read somewhere that is a2sd is not supported on rooted stock roms, so it didn't work for me.....
[EVO 4G Android Development] freeza:
let me know if you successfully get the dalvik moved to the cache partition
[EVO 4G Android Development] tkirton:
You may have...it could be the framework...not sure which one does it, but I've experienced the issue you are talking about when a rom had SenseUI.
[EVO 4G Android Development] tkirton:
That's correct. Unless the stock rom is modified to launch Apps2SD during boot (launch commands need to be a part of init.rc), it will not run Apps2SD...any version, any flavor.
[EVO 4G Android Development] jerdog:
Couldn't get it moved to the cache partition due to SenseUI issues - even after removing....

But here's what I got when I tried putting dalvik on the SD

1. I repartitioned my SD

2. Ran the zip to install A2SD

3. Rebooted successfully

4. Went into ConnectBot and ran a2sd cachesd

5. Rebooted and phone was SLUGGISH - don't think my SD is quick enough

6. Ran a2sd nocache to move back to normal

7. After reboot ran a2sd jit

8. Restarted but never got past the splash screen......

So I guess I am out of luck right now.....
[EVO 4G Android Development] tkirton:
Give it some time...If I'm not mistaken, nocache actually wipes the dalvik-cache and forces it to rebuild. Final version will not do that. It should take about 5-15 minutes.

That or it did move the cache, but got stuck on something.

If you wait 15 minutes and nothing happens, see if you can go into adb shell and run the following command:

a2sd resetcache

This will force the dalvik-cache to rebuild after a reboot.

Also, regarding JIT...make sure your rom that you are using doesn't already use JIT. Many ROM developers are building their roms with JIT capabilities. Also, JIT doesn't work on 1.5 roms (I was assuming you were using at least 2.1) and JIT is already built-in to 2.2 roms (part of Froyo...uses a more optimized JIT than what is included with Darktremor).
[EVO 4G Android Development] jerdog:
I had rebooted after running the "nocache" option and it had worked. Then I ran a2sd jit - it installed and then rebooted me. That's when it just sat there at the splash....

Are you saying I should wait on the JIT for a max of 15 minutes? Or was that in reference to the nocache?
[EVO 4G Android Development] freeza:
My phone takes a LONG time after resetting or moving the cache to microSD card. It takes anywhere from 3-5 minutes sitting on the bootup animation. This is also because I have a lot of apps :)
[EVO 4G Android Development] jerdog:
Yeah - but this halted at the splash EVO screen not the animation.... I waited a good 10min too....
[EVO 4G Android Development] freeza:
Ah, well that's something different entirely lol.
[EVO 4G Android Development] tkirton:
JIT isn't going to work for you. Restore using Nandroid.

EDIT: Nevermind...just thought of something. Try running a2sd resetcache. If I remember correctly, you have to reset the entire dalvik-cache after running JIT.

I'll have run automatically on the final 2.7.5.
[EVO 4G Android Development] noregretzzzz:
sorry If these are newb questions, but if I understand it right, putting cache on a cache partition gets screwy with sense ui and apps to sd is dependent of the rom and kernel I am using? I was also wondering if u possibly know how netarchy was able to put cache on cache partition with his burnt droid rom that runs on sense (only problem I had with it is that I couldn't do apps to sd) I'm trying to have my cake and eat it too. Lol.
[EVO 4G Android Development] SteelH:
Is there any way to uninstall apps2sd ?
[EVO 4G Android Development] tkirton:
Sorry for the delay in response...been busy trying to finalize 2.7.5.

With SenseUI that I have seen, the dalvik cache gets screwy if it is on the /cache partition. The 2.7.5 final actually has a workaround for CyanogenMod (unrelated issue) that forces the /cache/dalvik-cache to symlink to /data/dalvik-cache. If you want to put the dalvik-cache on the /cache partition, it will be directed to /cache/dc. I have not tested this setup on SenseUI...so I don't know if that will also fix the issue encountered.
[EVO 4G Android Development] tkirton:
There no true way of uninstalling it. You can tell Apps2SD not to activate by running the a2sd remove command and a2sd nocache command (it will move all links back to the internal storage).

If you truly want to keep it from running, remove the following files:

04apps2sd in /system/etc/init.d

a2sd in /system/bin

Just run the two commands above first, otherwise you'll end up with big issues.
[EVO 4G Android Development] freeza:
Final won't get past splash screen :(

fresh 3.2.0.0

netarchy 4.1.9.1cfs

Flashed back to rc3c and all is well.
[EVO 4G Android Development] tkirton:
Okay...I didn't test it with Fresh 3.2.0.0 (since I don't have an Evo...yet...maybe in three weeks if I can find one), but I did test this with Fresh Hero 3.2.2 and did get into that boot loop you were talking about. My problem has something to do with the programs on the SD card. Once that was cleared, it worked fine.

If you go back to 2.7.5 Final, can you send me the dta2sd.log located in /data? I may be able to see what is going on with that log. Send me the log when you do a boot loop.

You could also try resetting the dalvik-cache after you save the log by running a2sd resetcache. That may help, but the log file will hopefully shed some light on what's going on.

E-mail address: rtkirton@gmail.com
[EVO 4G Android Development] jerdog:
anyone seen if this works on SenseUI?
[EVO 4G Android Development] mikeinghilterra:
If I'm running CM6 with the new 7.6 kernal w/ Turbo do I still need to partition my SD card? If so what do everyone reccomend?
[EVO 4G Android Development] tkirton:
No, it doesn't work...but I'm working quickly on an update that will mount /cache/dc to /data/dalvik-cache. That definitely works in SenseUI.
[EVO 4G Android Development] tkirton:
If you are going to use Darktremor Apps2SD, then I would (otherwise, what's the point of using the program?)

The minimum size is 512MB. I used to have a 4GB partition, but have since changed it to 2GB. It all depends on the size of your SD card. 512MB-1GB is plenty for most people.
[EVO 4G Android Development] noregretzzzz:
No prob, thank you for answering my question. I didn't know if it had been tackled yet. Ur the man.

Swyped from my fresh evo
[EVO 4G Android Development] tkirton:
Okay...the problem with SenseUI and the dalvik-cache being on the /cache partition is that SenseUI can apparently sense the symbolic link (I guess it does a check to see if the dalvik-cache is on the /cache partition...but it doesn't do the same for the SD card). When it discovers that the cache is on the /cache partition, it simply does not load any data.

There is a workaround (it will be present in 2.7.5.1). If you do a bind mount (busybox mount -o bind) and mount /cache/dalvik-cache to /data/dalvik-cache, SenseUI does the check and sees that the dalvik-cache is on /data/dalvik-cache (even though the files are stored in /cache/dalvik-cache). It loads SenseUI as normal.
[EVO 4G Android Development] nemesys504:
Wont boot.

I am using dt 2.7.5 final with fresh evo 3.2 and when I changed the dalvik heap to another setting I get stuck @ the HTC bootscreen. When I check the settings it shows a weird value for dalvik heap. I tried a2sd resetcache and changing the heap back to default but nothing worked until I reverted back to rc3c. Everything is fine now but Im not sure what causes this problem in the final build.
[EVO 4G Android Development] noregretzzzz:
Sweet.

Swyped from my fresh evo
[EVO 4G Android Development] tkirton:
The heap size values are messed up in 2.7.5. They are fixed in 2.7.5.1, which will be released later today (as soon as I get the new code for heapsize to work correctly).
[EVO 4G Android Development] tkirton:
Bump...new version of Darktremor Apps2SD - 2.7.5.1
[EVO 4G Android Development] noregretzzzz:
This is where my command line know how ends.lol. I was wondering after doing a2sd check, everything is the way I would like it (asterisk in right spots) no fc's or anything, but as the check starts, I get 2 lines of cat error broken pipe. Is this something I should be concerned about?

Swyped from my fresh evo
[EVO 4G Android Development] noregretzzzz:
Plus I was wondering if u had a donate link.

Swyped from my fresh evo
[EVO 4G Android Development] tkirton:
Clear your browser cache and download again. The first releases had a rather nasty bug I missed.
[EVO 4G Android Development] jdmsohc22:
can I flash this zip if I'm on VirusROM and app2sd wasn't included..??

thanks
[EVO 4G Android Development] tkirton:
Good question. I finally broke down and got an Evo for development. I have VirusROM in a zip format on my SD card. I will load it up and post the results shortly.

EDIT: Looks like the developer has two Roms:

VirusRom series: This version has Darktremor 2.7.5 Final included and can easily be upgraded to 2.7.5.1.

VirusRom Airborne series: This version does not come with Darktremor Apps2SD, but Darktremor can be flashed onto this rom (Darktremor does start on boot, so it is fully functional).
[EVO 4G Android Development] tkirton:
Bump...new version released: 2.7.5.2
[EVO 4G Android Development] hacketbt:
Any ideas why 2.7.5.2 breaks my a2sd? Running CM6 with 2.7.5.1 now and after installing 2.7.5.2 I have none of my apps after boot. Running "a2sd check" says there is an sd-ext partition but it cannot be mounted. Was forced to restore from nandroid to get everything back.
[EVO 4G Android Development] tkirton:
Check /system/etc/init.d to see if you have an 04apps2sd. If you don't, have you tried the alternate installer version? Could be something with CyanogenMod now liking Darktremor again (which wouldn't be anything new).
[EVO 4G Android Development] hacketbt:
I do have that file. That is currently while using older a2sd. I am unsure if I have this with 2.7.5.2. Should I reflash and check?
[EVO 4G Android Development] tkirton:
If you open it up and don't see anything relating to dta2sd.log (will be on the first five lines), then it must be something else. In that case, reflash and see if that works.
[EVO 4G Android Development] kevinbear:
Help!

Argh…

So I have searched every thread and forum I can find, read every bit of info, and I can't figure this out.

Running CM6 Nightly (happen to be on #110 at the moment) on my Evo. 8GB Toshiba SD Card - Class 6. Card works just fine. Partitioned/upgraded to Ext3 with AmonRa. Tried both standard and alt installers for Darktremor.

Yet every time I boot and run 'a2sd check', it tells me "Ext partition found, but not mounted".

It's crazy. Works perfectly with the a2sd implementation found in Fresh ROM, but I can't for the life of me get it working on cm6. Managed to fix every other problem I've run into, except for this one!

What do you need from me to help me figure this out?

Thanks in advance!
[EVO 4G Android Development] kevinbear:
Looks like I might be having success by flashing Snap 7.6 (and using only ext2).

Bummer that cm6 kernel isn't currently mounting ext partitions well (from what I've read, finally). And that I still can't apparently upgrade to ext3
[EVO 4G Android Development] tkirton:
In the root of your Evo, there's a file called init.rc. Although this file, even if you were to edit it, cannot be saved (it will be replaced upon reboot of the phone), it may give me an idea of why it is not mounting.

If you could, do the following:

1. Using ADB, execute the following command:

adb pull /init.rc init.rc

2. Once you have that file, send it to me at rtkirton@gmail.com.

If you want to get ahead of me on this:

a. Open the file in a text editor.

b. Follow this link: http://xdaforums.com/showpost.php?p=7021331&postcount=4

c. Read the contents of this link and see if any of those lines in the code section are in the init.rc. If not, then either it isn't launching Apps2SD (usually CyanogenMod runs a file called sysinit from /system/bin. It is marked in init.rc as exec /system/bin/sysinit) or your version is using something different to launch (which isn't a big deal...I can add support for that quickly).
[EVO 4G Android Development] tkirton:
Hmmm...that's strange. I'll check it out.
[EVO 4G Android Development] tkirton:
That is odd that your kernel doesn't even support EXT2.

The information related to determining if the EXT2/3/4 filesystems are supported comes from /proc/filesystems. When you posted the a2sd sysinfo, it runs busybox cat /proc/partitions and puts that in the log, which didn't look like it has any of the EXT filesystem types.

I guess those were turned off in the kernel you are using (you can tell the kernel to turn off EXT2/EXT3/EXT4 support before it is compiled...all other developers I've encountered leave EXT2 on at the very minimum)...which sucks because no Apps2SD other than the Froyo version will work.
[EVO 4G Android Development] freeza:
Hi, is there anyway the align command can be used to zipalign apps in system/app as well? :-p
[EVO 4G Android Development] tkirton:
No. That's done for safety reasons. Zipalign has been known to cause issues with a small percentage of programs. /system/app was excluded in the event that any of the core apps could not be zipaligned correctly, causing an instability in the system.

Also, some phones (i.e. Desire) will not allow modifications to the /system partition unless the phone is in recovery, thus making any modifications to /system/app a moot point.

Rom developers, who are better suited to test for this zipalign issue, have zipaligned /system/app...however, the extent of what is zipaligned in that directory varies per rom developer. I made a decision when I integrated zipalign to leave the core programs (ones in /system/app) for the rom developers and I would only focus on /data/app and /data/app-private.

But if you are truly serious about it, here's the modified code. Put this in a file, transfer to /system/bin (or /system/xbin), change the permission to grant execution rights (chmod 755), and run it.

#!/system/bin/sh
echo "[ ] Zipaligning all .apk files in /data/app"
for apk in /system/app/*.apk ; do
/system/bin/zipalign -c 4 $apk
if [ $? == 1 ];
then
echo -e "[ ] ZipAligning $(basename $apk)"
/system/bin/zipalign -f 4 $apk /cache/$(basename $apk)
if [ -e /cache/$(basename $apk) ];
then
busybox cp -fp /cache/$(basename $apk) $apk;
busybox rm /cache/$(basename $apk);
echo "
[*] ZipAligning $(basename $apk) complete."
else
echo "[X] ZipAligning $(basename $apk) failed."
fi;
else
echo "[!] ZipAlign already completed on $apk"
fi;
done;

Nandroid backup first.
[EVO 4G Android Development] freeza:
Fantastic! I see you have a donate link up. Finally! Expect one shortly
[EVO 4G Android Development] Noxious Ninja:
I have a few questions which I didn't feel were adequately answered by the first post or other things I found while searching. My apologies if I overlooked something. :eek:

1) The primary benefit of Apps2SD is that I can move anything, not just Froyo-moving-compatible apps. Is this correct?

2) Does it automatically move everything? How does that work with widgets and things I'd wish to be available while the SD card is mounted in mass storage mode?

3) Is there much use in creating swap space on the Evo?

4) Is it better to move dalvik-cache to the SD card or to /cache?

5) If I move from one Apps2SD-enabled ROM to another, are my installed apps carried over?
[EVO 4G Android Development] tkirton:
Possibly something for me to work on.

All programs (with exception to core apps residing in /system/app) would reside on the SD EXT partition, incluing Froyo apps (however, Froyo apps that use the Froyo native apps2sd will move their apps to a secure section of the SD FAT32 partition.)

It automatically moves everything except core apps located in /system/app. All user apps located in /data/app and /data/app-private would be moved to the SD EXT partition. The EXT partition is not affected by SD Mass Storage mode as it doesn't use Vold to mount (it uses Busybox mount command).

On the Evo, probably not. But if you do, don't go above 32MB.

Depends on what SD card you have in your Evo. If you have Class 6, you can pretty much pick and choose which one. /cache partition may have issues with certain roms if you put the dalvik-cache there (though I believe this was pretty much resolved in Darktremor 2.7.5.1). Either one will work. If you can put it on /cache, that would be better.

Yes, they are. The rom may have to change the mount point if the mount directory changes (i.e. from /system/sd to /sd-ext). This may pose an issue if the rom you are flashing do not reset the /data/app and /data/app-private back to internal storage. This can be fixed if you simply perform a wipe before flashing.
[EVO 4G Android Development] Noxious Ninja:
Yes, I got a Class 6 card. I'm backing things up and flashing Fresh 3.3.0.1 right now. I'll try putting dalvik on /cache and see how it works.

So the mass storage mode only affects the FAT partition?

Thanks.
[EVO 4G Android Development] tkirton:
If you use 2.7.5.2, the Dalvik to Cache works perfectly (my Evo is running Fresh Evo and I have dalvik on /cache)

Mass storage mode only affects the FAT partition.
[EVO 4G Android Development] kevinbear:
Don't know if you got my email a little while back. Let me know if you need me to resend it.
[EVO 4G Android Development] Noxious Ninja:
I've been running Fresh 3.3.0.1 w/ a2sd 2.7.5.2 over the weekend, with a 16GB Class 6 Transcend microSDHC card and Dalvik on /cache, and everything is working perfectly. Thanks!