yashsingh1/xdaforums huggingface dataset:
[Hero CDMA Android Development] JTOLOGY:
Fresh 2.0d A2SD Apps not being moved out of internal memory

I have HTC HERO, Fresh 2.0d rom, 16gb sd card and RA 1.6.2. I have partitioned sd, created ext2, converted ext2 to ext3 and installed rom and apps. All apps load and function but they are being put into internal mem and copied rather than moved to sd\apps. Memory check shows internal and sd memory decreases with installation of apps.

Here's a screen shot of my command prompt showing that Apps and Apps Private are being reassigned to sd card properly:

Microsoft Windows [Version 6.0.6002]

Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\VP>cd\

C:\>cd tools

C:\tools>adb remount

* daemon not running. starting it now *

* daemon started successfully *

remount succeeded

C:\tools>adb shell

# ls -l /data

ls -l /data

drwxr-xr-x system system 2010-04-26 10:55 tombstones

drwx------ system system 2010-04-26 10:08 backup

prw-r--r-- system system 2010-04-23 16:32 gps_nmea_fifo

-rw-rw-rw- media system 12 2010-04-26 00:04 StreamingPacketLost.txt

-rw-rw-rw- media system 2 2010-04-26 12:11 pvcodec.txt

drwxrwxr-x system system 2010-04-26 11:54 system

drwxrwx--x system system 2010-04-23 16:28 anr

drwx------ root root 2010-04-26 10:09 agent

drwx------ root root 2010-04-23 16:27 agent_htc

lrwxrwxrwx root root 2010-04-23 16:27 app-private -> /system/sd

/app-private

lrwxrwxrwx root root 2010-04-23 16:27 app -> /system/sd/app

drwxrwxrwx bluetooth bluetooth 2010-04-26 10:09 btips

drwxrwxrwx root root 2010-04-23 16:27 DxDrm

drwxrwx--x system system 2010-04-26 10:54 dalvik-cache

lrwxrwxrwx root root 2010-04-23 16:27 drm -> /data/local

drwx------ root root 2010-04-26 10:07 property

drwxrwx--x system system 2010-04-26 10:54 data

drwxr-xr-x shell shell 2010-04-23 16:27 local

drwxrwxrwx wimax wimax 2010-04-23 16:27 wimax

drwxrwx--t system misc 2010-04-26 12:10 misc

drwxr-x--- root log 2010-04-23 16:27 dontpanic

drwxrwx--- root root 2010-04-23 16:27 lost+found

# exit

exit

C:\tools>

Please let me know what I can do to get A2sd working properly on Fresh 2.0d rom whether its a manual or auto version or any other fix. I use lots of apps and I am getting low memory warning from the system.

Thanks
[Hero CDMA Android Development] energizer1389:
Same problem here. Please help
[Hero CDMA Android Development] troyboytn:
Easy fix. just flash Tkirton's Darktremor A2SD zip in recovery. Works perfectly. http://xdaforums.com/showthread.php?t=670087
[Hero CDMA Android Development] 4SidedDie:
What do you type in the terminal to make it show that infomation?
[Hero CDMA Android Development] tkirton:
ls -l /data

That will give you a directory listing.
[Hero CDMA Android Development] bobr0949:
I installed apps2sd 2.5 and my internal memory went from 50 to 129.
[Hero CDMA Android Development] tkirton:
Darktremor A2SD version 2.6.1

I get fielded with a lot of questions that ask "How can I verify if the Apps2SD (or a2sd) is working correctly." And many people, including myself, have written message after message regarding how you can check to see if your data is on the SD card.

I'm not complaining, mind you...I personally like the attention. But, I'm also trained from various programming jobs that require a lot of support (the one I'm currently at is a good example). When I see a lot of people asking the same questions, I think to myself "there's got to be an easier way to do this." That's when I start working on a program solution to the issue.

For those of you who are new to Apps2SD, here's what you do:

Now, if you do decide to run the stock A2SD, or any other variant, here's how you check that version (this will also work for any version of Darktremor A2SD):

You can manually move the data yourself by typing the following commands:

mkdir /system/sd/app

mkdir /system/sd/app-private

chmod 777 /system/sd/app

chmod 777 /system/sd/app-private

cp /data/app/* /system/sd/app

cp /data/app-private/* /system/sd/app-private

rm /data/app

rm /data/app-private

ln -s /system/sd/app /data/app

ln -s /system/sd/app-private /data/app-private
[Hero CDMA Android Development] tkirton:
1. Flash the Darktremor A2SD 2.6.1: http://xdaforums.com/showthread.php?t=670087

2. Reboot

3. Once the phone reboots, go into your phone (adb shell) and type:

/system/bin/a2sd cache

That will move the dalvik-cache. Once the move is complete, reboot the phone.
[Hero CDMA Android Development] frostrunner:
Hey i just got finished installing A2SD 2.6.1 and i have a class 2 16gb sd card and my internal mem is reading like 74/159, is that normal?

I DID install the correct version for class 2 cards

and i did your /system/bin/a2sd check

and it looked like everthing checks ok

In A2SD status report i got this

[*] /data/app link active

[*] /data/app-private link active

[*] /data/dalvik-cache NOT active

No Cache flag file present

[X] Swap partition NOT present

i read that the other guy had 100+ mb free after A2SD and i also remember back on 1.5 when i had tried it out i got similar numbers.

Anything else i can do to maybe check if i did everything alright?

or maybe already know why im getting still such a low internal mem?
[Hero CDMA Android Development] fallentimm:
you should check out the GUI version of apps2sd http://xdaforums.com/showthread.php?t=670098

2.5 just crashed my phone, the GUI version not only fixed all my problems but it sped everything up signaficantly. Im not an expert with computers either so this was very easy to use
[Hero CDMA Android Development] tkirton:
You picked up the one that doesn't activate the cache on boot. Just type

/system/bin/a2sd cache in adb shell.
[Hero CDMA Android Development] frostrunner:
Actually i did, and my memory stayed the same at 70~
[Hero CDMA Android Development] tkirton:
Wow...and you didn't even give me a chance to fix it.

Treve uses a GUI to set things up. Other than that, the basic concept is the same (it's based on my earlier Darktremor A2SD, which itself is based on the original Cyanogen Apps2SD). It pretty much follows the same method to move files as I do. His is easier to setup if you are new at this. I try to make mine automatically set things up.

Nothing is wrong with what he's doing...it's definitely a different way of doing it and, as long as it works, more power to him.
[Hero CDMA Android Development] tkirton:
Hmmm...what Rom are you using?

Sorry...brain's scrambled. If it's Fresh 2.0d, it is designed not to activate dalvik-cache due to instabilities while the dalvik-cache is being recreated during boot (it sometimes freezes). Just type the command from earlier (a2sd cache) and that will move your dalvik-cache to the sd card.
[Hero CDMA Android Development] fallentimm:
I chose to go with his beaucse of the extra tweaks, it really makes a huge difference in performance. His install was flash and go, no fixing, commands to enter, anything. These are NOT even close to the same concept. Look at the benchmarks on the first post, they speak for themselfs.

*edit* also i used his version on fresh 2.0d with dalvik cache and im testing the new heap changes to fill the empty space, that should be a bigger performance jump
[Hero CDMA Android Development] frostrunner:
Fresh 2.0d
[Hero CDMA Android Development] frostrunner:
i did try the command, /system/bin/a2sd cache

and it went through with no errors and its still right around 75~

and i rebooted
[Hero CDMA Android Development] tkirton:
First off, you said it yourself...extra tweaks. That's outside A2SD. I know he's running zipalign (which I don't do because I haven't proven the stability yet). Zipalign will increase your performance...that's why a lot of Rom developers use it to get higher benchmarks.

And I said it's based on an earlier version of Darktremor A2SD (I pulled the code...I know this), just like mine is based on Cyanogen's Apps2SD.

This is Treve's list of options and my comments regarding my A2SD implementation:

Turn on/off A2SD - I have that feature as well (a2sd install/a2sd remove)

Move Apps to SD - Automatic with mine (unless A2SD is turned off)

Move Dalvik to SD - Automatic with standard version, manual with nocache version. Can be turned on/off (a2sd cache/a2sd nocache)

Enable JIT - Luckily, he keeps that off (there's an incompatibility headache I'm sure he's dealt with). I leave it up to the Rom developers to implement that.

ZipAlign on Boot - This is not implemented on mine as I haven't validated its stability (just because it works for you doesn't mean it will work for everyone). Zipalign I normally leave to the Rom developers. but I can entertain it for a future release.

Enable SD Swapping - Automatic, can be turned on/off (a2sd swap/noswap)

Dalvik heap - This is something new that I will check up on.

LowMemKiller - I leave that with the Rom developers to do on their own. If you want a GUI version, try AutoKiller.

Banned Apps - I leave that with the developers (this is what makes each Rom so interesting...the different apps they allow/disallow)

So, most of what he's doing, I do as well. The rest differs because I leave all but one up to the Rom developers (it is, after all, their roms). Dalvik heap is the only thing I wasn't aware of and will look into it to see if it will fix some stability issues.
[Hero CDMA Android Development] frostrunner:
im still stickin with yours tkirton ^^ i just wanna make sure its workin a ok =P

ive already done the a2sd cache command and it seemed that there were no changes in my internal memory..
[Hero CDMA Android Development] tkirton:
What's your memory look like now?
[Hero CDMA Android Development] frostrunner:
still the same at 75~
[Hero CDMA Android Development] tkirton:
Did you reboot after you did the a2sd cache?

I'm presuming you're using Fresh 2.0d. Type ls -l /system/etc/init.d/04apps2sd and see if that is symlinked to /system/bin/a2sd.
[Hero CDMA Android Development] frostrunner:
yes and yes
[Hero CDMA Android Development] tkirton:
Just to make sure, go to Settings -> SD and phone storage. Tell me what the available space on the internal phone storage is.

I just want to make sure we're not seeing erroneous numbers before we continue. (had that problem in the past)
[Hero CDMA Android Development] frostrunner:
Total space is 13.75

Available space is 12.57
[Hero CDMA Android Development] tkirton:
That's the FAT32 partition on the SD card.

Go lower...it's the last item at the bottom of the list.
[Hero CDMA Android Development] frostrunner:
Internal phone storage

75.70 MB
[Hero CDMA Android Development] tkirton:
Hmmm...check /data/dalvik-cache. That just doesn't seem right after you typed a2sd cache.
[Hero CDMA Android Development] frostrunner:
ls -l /data/dalvik-cache?

i get a super long list of .dex files
[Hero CDMA Android Development] tkirton:
Easier method:

cd /data/dalvik-cache

pwd

That should show you which directory you are in. If you are symlinked, it will show /system/sd/dalvik-cache.
[Hero CDMA Android Development] frostrunner:
all i get is /data/dalvik-cache

so its not getting it to the sd
[Hero CDMA Android Development] tkirton:
Run /system/bin/a2sd cache again. Then change to the /data/dalvik-cache directory and type pwd.
[Hero CDMA Android Development] frostrunner:
now im getting /system/sd/dalvik-cache

want me to reboot and do the check again?
[Hero CDMA Android Development] tkirton:
Yes...reboot and check again.
[Hero CDMA Android Development] fallentimm:
Well he also has to include a custom kernel. Heres a hint to you your code is broken because at the kernel level it is building folders while the rest of the system is trying to boot. treve had to rewrite part of damages/freshes new sprint kernel inorder to get it booting properly. his apps2sd script runs THEN the os boots. your stuff can just never work especially moving dalvik cache on first boot. this is why your fresh is broken. you end up with a race condition where if your steps take too long to complete and the os goes to touch something first stuff breaks.
[Hero CDMA Android Development] tkirton:
Actually, it does work. Tested it out many times on my phone and others have used it successfully without running commands.

I'm not here to start an argument with you. Treve has his way of doing it, I have my way. I told you why I do things the way I do them without discrediting Treve (no need...he's very talented and I'm glad the Apps2SD is being taken to a new level). I told you that a lot of my code does the same as his (and even pointed that out).

Simply put, Treve has his version, I have mine. If you like his version, stick with his...period. Don't trash my product to justify why you switched to his.

Oh, and here's something you'll really enjoy:

# !/system/bin/sh

#

# A2SD version 3

# Edited By: TrevE @ xda for damagedrom

# Based on the modded Apps2SD by Robert Travis Kirton

# Automatic ZipAlign by Wes Garner

That's from his A2SD. Treve labels his version 3 (it's vastly different than mine).

The line based on the modded Apps2SD by Robert Travis Kirton. That's would indicate it's based on a version of Darktremor (at the earliest 2.0 since that was in DamageControl's ROM...possibly 2.5).

I'm done.
[Hero CDMA Android Development] JTOLOGY:
THANK YOU!!!!

Just a quick thanks to everyone for your help. I installed a2sd 2.6.1 zip on my sd card, went into recovery and flashed the zip, rebooted and voila!, a2sd working! I've installed 66 apps (so far) on top of the standard apps on the rom and I'm at 109mb still left in mem. I was totally out of memory with less than 50 apps before I got a2sd working... so thanks everyone who helped.. great job! :D
[Hero CDMA Android Development] energizer1389:
I tried that but it didnt work. After a month with Fresh 2.0d I found the Rom a little buggy and a bit slow. Quickboot issues, a2sd issues and little laggy. I Wiped everything and installed RegawMod v2.1(unthemed obviously), flashed Darktrevmors a2sd 2.6.1 and everything is awesome. No quickboot issues, a2sd working like a charm (147mb free), little or no lag. Im happy now.

Updating to recovery-RA-heroc-v1.6.2 probably had something to do with it too.
[Hero CDMA Android Development] tkirton:
I think I know why the instability (and you can thank TrevE for finding this).

There is a problem with the way Android works. The problem is that, unless you force the boot image to wait for something to get done, the boot process will run every program one after another without waiting for any of them to complete (which means FallenTimm was correct about the problem, but he blamed the wrong program...he blamed my program when the problem is really in the init.rc).

Cyanogen found this issue a long time ago (according to TrevE) and put the following line to force the init program to wait until all the programs in init.rc ran to completion:

on property:cm.filesystem.ready=1

class_start default

This snippet of code is present in all the 1.5 roms. It is more than likely present in the 2.1 custom kernels (you know, the ones the camera doesn't work in). It is not natively present in any of the Roms based on the Sprint RUU leak (note I said natively...TrevE has been fixing the issue with his implementation of apps2sd, which, ironically, fixes my stability issue).

With this line in place, the only way to force init.rc to stop (which will force dalvik to continue) is to execute a statement such as: setprop cm.filesystem.ready 1;

I didn't realize this until I got a load of complaints about the A2SD not working on any 1.5 Roms. What happens is that, if you don't set cm.filesystem.ready to 1, the init program doesn't know you are done, so it sits in an infinite wait state (in other words, phone will not boot.)

Once I added those in, the program worked on 1.5 Roms and the custom 2.1 roms without issues (and any that TrevE fixed), but not for 2.1 leaked roms (because the stop condition wasn't in the init.rc to begin with).

Version 2.5 does not have this fix (and therefore should not be used...I've been trying to get everyone to go to 2.6.1 for stability), so either it will boot if the init.rc ignores cm.filesystem.ready, or it will stall in a constant wait state.
[Hero CDMA Android Development] tbryan:
Hi tkirton,

I think I am using 2.5 still. To update, do I just do the same thing I did when initially installed? Put your zip on the SD card and then recovery mode install from sd? I just don't want to loose all my apps or something if I do it wrong.

Thanks!
[Hero CDMA Android Development] bubbacs1:
Warning, Warning....NoOb question.

Almost sure I know this one, but thought I'd double check first.:cool:

I just got a 16g class 6 sd and wish to place it into the old hero here, the original 2g is in there and I have Apps2sd working.

Is there any way to transfer the stuff on the 2g to the 16g and still have the apps2sd working or must I start over?

Thanks,

Bubba.
[Hero CDMA Android Development] tkirton:
Yep...that's all you do.
[Hero CDMA Android Development] tbryan:
tkirton gave me these instructions and they are working very well so far:
[Hero CDMA Android Development] tkirton:
I've typed this up before, but I think I went the long way of transferring data:

Here's how you do it:

1. Boot into recovery

2. Nandroid backup your system with ext

3. Toggle USB (option 2 on main menu)

4. Back entire contents of FAT 32 SD card to your computer

5. Disengage USB

6. Turn off phone and replace card.

7. Boot into recovery again

8. Partition your SD card with and ext partition and optional swap partition.

9. Turn on USB Toggle

10. Restore contents of your SD card from your computer

11. Do a nandroid restore

12. Wipe your dalvik-cache (if it was on the original sd card...otherwise skip this step)

13. Reboot.

That should be it.
[Hero CDMA Android Development] JTOLOGY:
At the risk of exposing myself for the noob that I am :o, what is the purpose of the swap option in the recovery console? I own a Sprint Hero, flashed with RA 1.6.2, fresh 2.0d and the latest a2sd because I found the auto a2sd in the fresh rom wasn't working for me. It seems to be fine, at this point I have over 80 addtional apps aside from the built in apps and still have over 120mb of internal mem. BUT, I'm wondering if maybe by not using the swap option I might be missing out on some performance enhancement or memory use advantage. Can someone please "edumicate me" on the advantages of using swap with as2d and how it works? :confused:
[Hero CDMA Android Development] tkirton:
Swap partition works the same as a swap file in Windows. When your computer begins to run low on memory, the operating system will take programs that are sitting idle and move those programs from main memory to swap. It doesn't shut the program off, it simply moves it to swap until the program becomes active again...at that time, it will move the memory recorded in the swap file back to main memory.

If this was just a regular installation of Linux, this would be okay. However, Android has a feature called low memory killer. This features ends any idle program (depending on how the program was started) to free up memory. When you start the program again, it will load the last state back into memory (as if you never shut the program down).

Some people like the idea that the programs shut down, but others haven't put too much faith in that idea.

I've gotten a modest performance increase with the swap partition when I need to run several programs at once. However, the swap file can be a performance drag when you open a lot of programs at once. This is where the low memory killer comes into play. With the correct adjustment, the low memory killer can limit the amount of swap space used (it will use it under heavy demand or may never use it depending on how aggressive you set it). You just have to play with the settings to get an optimal effect.
[Hero CDMA Android Development] JTOLOGY:
Thanks a bunch for the help. So what you're saying is... "Swapping" functions in principle to Virtual Memory in Windows. To make it work on the Hero, it needs to be activated in the RA, then properly managed by an auto memory killer in order to see a performance gain. And that performance gain is relative to individual user multitasking habits and what attributes are set in the memory killing app? I quess my next question to you is.. In your particular use of the swap tweak, do you think the performance gain you're getting is worth it or nominal at best? And would you recommend using the AutoKiller app in Fresh 2.0d or allowing the built in memory manager to oversee that task? Again.. thanks for the help!
[Hero CDMA Android Development] tkirton:
If you are looking at strict performance, I think you would gain more with AutoKiller (yes, I recommend using it in any Rom that isn't already performanced tweaked, including Fresh 2.0d).

If you are looking to keep more programs active in memory, then a combination of swap and autokiller works.

Typical use: you probably can just get away with autokiller settings.
[Hero CDMA Android Development] JTOLOGY:
Well, all things considered, I think I'll just use AutoKiller and forget the swap. Thanks for all the info, it was very helpful!
[General Questions and Answers] dan138zig:
If I charge a li-ion battery, is it okay to unplug the charger before it reach 100%? Say about 80%. Thanks.
[General Questions and Answers] orb3000:
http://xdaforums.com/showthread.php?p=6072868#post6072868
[General Questions and Answers] dan138zig:
sorry man, didn't mean to flood the forum, but my questions are different if you really look at it.
[General Questions and Answers] timmymarsh:
thread closed, question is the same.
[Nexus One General] Paul22000:
Google's Listen app updated to 1.1.2.

What's new in 1.1.2?

... bunch of stuff.... and...

"FroYo Support"

!!!!!

:3

[Edit]:

Install Listen -> Menu -> Help What's new

!!!!!!!!!!!
[Nexus One General] Rock3nrenigade:
Epic! Maybe it will address some of the rough edges I notice from using 2.1!
[Nexus One General] NexusDro:
Nice. I hope the Nexus One will be the first one to get it!
[Nexus One General] andonnguyen:
??? 10.char. :)
[Nexus One General] irishrally:
Whaaaat? Share the wealth, please.
[Nexus One General] TFJ4:
Link me? I call BS, can't find the link anywhere
[Nexus One General] Paul22000:
Haha, lol, no you don't. FroYo is still months away. Lying bastard : P
[Nexus One General] TFJ4:
This.

and after installing the app, it does say that
[Nexus One General] Paul22000:
Haha, yeah. For people who don't believe, me install Listen -> Menu -> Help -> What's new
[Nexus One General] grainysand:
Bloody hell. It's real. Thought you were trying to pull a late April's Fool or something.

Maybe we can expect FroYo around the same time (or preferably some time before) the Evo comes out?
[Nexus One General] ram130:
I think next week a leak will happen..:rolleyes:
[Nexus One General] DigitaL BlisS:
What's with the frozen yogurt thing, sounds like something you'd eat on a diet.
[Nexus One General] icegad:
Haykuro already dropped a leak ...maybe it was a aprils fools joke
[Nexus One General] Meltus:
:) 10chars
[Nexus One General] Rusty!:
It's often better than ice cream ya know!
[Nexus One General] fahim_k:
http://code.google.com/p/enh/wiki/IcsBot

changelog:

Verision

1.3	Better VTIMEZONE handling. Froyo support.
[Nexus One General] Eclair~:
I'm going to assume some Google employees already have Froyo if applications are already starting to support it. Though, I don't see why they would make notice to us that Froyo support has been added to applications if it isn't publicly available or coming soon. Unless.. it is coming soon :/
[Nexus One General] TFJ4:
That would be a safe guess...look at 1-4 on the Nexus One section

http://www.greenecomputing.com/apps/linpack/linpack-by-device/
[Nexus One General] GldRush98:
What the hell is FroYo. I have never heard of it

Oh, codename for the next Android version. Sheesh