yashsingh1/xdaforums huggingface dataset:
[Hero CDMA Android Development] kkruse:
I have tested the following with the frest 2.1 2.0b2 build and it does enable Apps2SD.

Ver 3 now should work on fresh fine, and damageless (sometimes I found enabling apps2sd on damageless causes lockups at boot, these can be fixed by doing WIPE for DATA for now) :/

MAKE NANDROID BACKUP

This has been tested on: Fresh 2.0b2

ADDED INSTRUCTIONS TO ENABLE ON DAMAGELESS

Also this has been edited so the first few pages refer to the old style before I had signed zips working. xD

Flash the Update Zip Attached VIA recovery menu. That means copy it to the root of your sdcard (aka /sdcard/).

I tested this after a fresh wipe with a blank ext2 partition and one vfat (normal). I did not even boot it first run but you should be able to flash this on an existing rom. Others can test on other roms but I am using this for now on fresh 2.1 2.0b2.

Afterwards run the following after booting

FOR VER 3 SIGNED

[B]
adb remount
adb shell

cd /system/bin
ln -s /system/xbin/busybox /system/bin/sed
ls -l /system/bin/sed # make sure it exists
cd /
apps2sd on

# should say apps2sd enabled

reboot[/B]

FOR VER 1 SIGNED

[B]
adb remount
adb shell

cd /system/bin
busybox --install /system/bin
ls -l sed # make sure it exists
cd /
chmod 755 /system/bin/apps2sd
chmod 755 /system/xbin/apps2sd
apps2sd on

# should say apps2sd enabled

reboot[/B]

FOR VER 3 SIGNED for DAMAGELES

[B]
adb remount
adb shell

cd /
apps2sd on
# should say apps2sd enabled
# below fixes up the scripts generated by the 'apps2sd on' line.. who ever wrote that had it put DOS CR/LF on the ends and thats whats breaking APPS2SD on damageless!

cd /system/etc/init.d
dos2unix 04apps2sd
dos2unix 05userinit

reboot[/B]

Enjoy
[Hero CDMA Android Development] afazel:
Will this work on the other 2.1 ROMs?
[Hero CDMA Android Development] kkruse:
I have only tested on fresh 2.1 2.0B . I would think that logically this should work on the other fresh 2.1 2.0 and perhaps Damageless's. As for darchstar's try it I havent run that rom in a few days.
[Hero CDMA Android Development] damageless:
If someone could test this out and let me know if it works on my ROM then I would love to just use the same method to get it going with the author's permission (credit will be given).
[Hero CDMA Android Development] networx2002:
i keep no space left on device when i do this command

cat /dev/zero > /dev/mtd/mtd2
[Hero CDMA Android Development] lcwallace:
same for me

cat: write error: No space left of device
[Hero CDMA Android Development] damageless:
If I remember right it is a different file than what he posted...

I will have to check.
[Hero CDMA Android Development] mrcharlesiv:
Maybe you can help me w/ this... When I adb shell in recovery I get "/#" instead of "#" & I can't "mount -a"...
[Hero CDMA Android Development] Sirchuk:
Another one with this issue.

Running Fresh 2.1 2.0b2 on a clean install.

Already have a partitioned SD card with apps installed (from fresh 1.1 rom)

Has anyone besides OP gotten this to work?
[Hero CDMA Android Development] swaze:
/# would mean you are adb into recovery......I think
[Hero CDMA Android Development] Sirchuk:
Aye, / # means you are in recovery mode on the phone is all.

Not sure why you aren't able to mount -a. I'm curious if anyone has gotten this method to work yet..?
[Hero CDMA Android Development] mrcharlesiv:
So I went ahead and did every step despite the errors it gave just to see what happens... It's booting....

EDIT: Seems like it worked. My internal memory dropped by a/b 20 megs and I'm reinstalling everything. Idk.
[Hero CDMA Android Development] Sirchuk:
K, I attempted to reboot and it hangs at the HTC screen, so I'm going to boot back into recovery and try to continue from the out of space error.
[Hero CDMA Android Development] Deleted member 884763:
Last night I tried adding a2sd, e2fsck to /system/bin of Fresh and made a directory SD in /system

Then I added to the init.rc

on property:cm.filesystem.ready=1

class_start default

start a2sd

and

service a2sd /system/bin/logwrapper /system/bin/sh /system/bin/a2sd

disabled

oneshot

then mkbootimg and placed that boot.img into fresh's zip and resigned it.

It flashed ok. But still didn't take. I'm still learning, the stuff I did to iniit.rc I was just basically copying and pasting from other roms with a2sd init.rc's I was going to start a thread until I saw this one.
[Hero CDMA Android Development] Sirchuk:
I was able to boot back into recovery and complete the setup past the out of space error (I still get it though) and reboot. It booted up, but apps are still installing to the internal memory, so it did not work.
[Hero CDMA Android Development] swaze:
Try this from CMD Prompt

Adb remount

Adb shell

# cd /data/app

#pwd

let us know what you get

if data/app it didnt work.
[Hero CDMA Android Development] mrcharlesiv:
So I've reinstalled about 15 apps and my internal memory is staying at 73... :D

I'm still kinda worried about those errors I got.
[Hero CDMA Android Development] jmoch2:
same here... anyone know where to go from here?
[Hero CDMA Android Development] kashb91:
did you try doing what swaze said?
[Hero CDMA Android Development] mrcharlesiv:
Way to rain on my parade! Yeah it didn't work. Idk why my memory dropped and stayed lower then?
[Hero CDMA Android Development] swaze:
or try this

adb remount

adb shell

ls /system/sd/app

If you get a list of apps, then you are working.
[Hero CDMA Android Development] jmoch2:
does this need to be done after a fresh partition of the SD card or can the SD card be as is if I was running apps2sd on Fresh 1.1?

Edit, it removed all my apps, but they are not on my SD card and are now unavailable on my phone. Help please!
[Hero CDMA Android Development] swaze:
If you were running it previously, you shouldn't have to re-partition it.
[Hero CDMA Android Development] Sirchuk:
I tried it again with the espresso rom from Damageless and still no luck, I get the same out of space error as before and it didn't take.

Any ideas on why were getting that error? should I wipe my SD card EXT partition?
[Hero CDMA Android Development] bcnice20:
Is that first file flipz kernel I could care less about a2sd I just want tht
[Hero CDMA Android Development] mrcharlesiv:
Well I just did that and got my list of apps... Let's see what happens.
[Hero CDMA Android Development] kkruse:
You might check your recovery rom version. I used the 1.6.2 recovery posted the other day.

the cat /dev/zero error is normal it always does that.. your just eraseing the old BOOT image prior to writing it with flash_image
[Hero CDMA Android Development] kkruse:
I just took peices of others work and peiced it into somethign that worked (for me) so if you can incorporate it into the rom, have at it. All i did was borrow the kernel from flipz and threw it on an initrd/ramdisk-boot file that works with a2sd. :D

Only thing stopping me from doing update.zip is i dont have a post count = 5 on androidcommunity to download LinSign.zip ;/
[Hero CDMA Android Development] mrcharlesiv:
I'm using the new recovery and the mount -a command isn't working... once it showed my apps I did a reboot and it wouldn't boot up.
[Hero CDMA Android Development] swaze:
Well if you got all your apps then you are good to go. I would try a reboot to make sure it sticks after a reboot.
[Hero CDMA Android Development] mrcharlesiv:
The reboot froze up even after a battery pull.. I'm about go give up.
[Hero CDMA Android Development] kkruse:
That is odd.

what does:

say?

The other option is to manaully mount your vfat partition:

somethign like:

You may need to change the :1 to :0 or :2 depending on your sdcard partition
[Hero CDMA Android Development] mrcharlesiv:
Typing "which mount" does nothing. Neither does manually? ****. Everything works except for what I need to do in recovery. Where do I go from here?
[Hero CDMA Android Development] mrcharlesiv:
mount -a

mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: No such files or directory
[Hero CDMA Android Development] afazel:
Phone got stuck in fastboot USB until I pulled the battery. Reflashing 2.0b2 now.
[Hero CDMA Android Development] mrcharlesiv:
Has anyone had any luck with this?
[Hero CDMA Android Development] jmoch2:
I ended up wiping and flashing 2.1b and reinstalling all my apps from backup.
[Hero CDMA Android Development] kashb91:
so in other words, other than the op, this is pretty much a fail?
[Hero CDMA Android Development] JsChiSurf:
I don't use apps2sd, but, it's pretty inefficient to copy the same binary to both /system/bin & /system/xbin.

Provided it even has to be in both folders, just create a symbolic link from one to the other. Every bit of space helps :)
[Hero CDMA Android Development] kkruse:
I just wiped data and reflashed the file fresh-cdma-hero-2.0b2.zip.

My recovery is recovery-RA-heroc-v1.6.2.img

I'll figure out whatever is the issue with most of it. I am reflashing now... Give me a bit to dig. I have a family to tend to xD.
[Hero CDMA Android Development] kkruse:
I just wiped, reflashed the fresh 2.0b previously mentioned, and follow the steps in the edited the original post. If you adb logcat you can usually see if A2SD is enabled or not when it boots. Its pretty much almost right at the start of the boot cycle after the unit loads the kernel.

I want to know if anyones had any luck getting this to work besides me?
[Hero CDMA Android Development] mroien:
It won't let me push boot.img /sdcard/ says file not located, but it is on my SDcard and I can't push apps2sd either. Does anyone know what other steps I can take to enable apps2sd?
[Hero CDMA Android Development] wtphoto:
when I get to flash_image boot /sdcard/boot.img I get flash_image: not found any help?
[Hero CDMA Android Development] networx2002:
when i do this command

ln -s /system/xbin/apps2sd apps2sd

i get "link failed file exists"
[Hero CDMA Android Development] wtphoto:
I did the same thing you forgot to cd to /system/bin

but I still cant get the boot image flashed
[Hero CDMA Android Development] networx2002:
like this

adb push boot.img /sdcard/

adb remount

adb push apps2sd /system/xbin

adb shell

cd /system/bin

ln -s /system/bin/apps2sd apps2sd

busybox --install /system/bin

chmod 755 /system/xbin/apps2sd

cat /dev/zero > /dev/mtd/mtd2

out of space errors are normal...

flash_image boot /sdcard/boot.img

apps2sd on

reboot
[Hero CDMA Android Development] daryelv:
Am I missing something? The apps2sd script is modifying the /system/etc/init.d/04apps2SD script that is non-existent. Also, don't you need to create a /system/sd so that the 04apps2SD has a place to mount the SD card?

-Daryel
[Hero CDMA Android Development] networx2002:
im getting the same think
[Hero CDMA Android Development] tejasrichard:
@kkruse

hey man! I see you're a fellow austinite! Which part of town do you live in?
[Hero CDMA Android Development] Pyro8:
that happened when i try attempt second

I type that, I get "File or directory doesn't exist"

I get that too.

I must have apps2sd.. i only have 10 mb left internal... :eek:
[Hero CDMA Android Development] centran:
I could not get it to work as described in this post. For those who have it working are you 100% it is working?

Fully boot into the phone and go into the adb shell

run this

busybox df -h

Do you see a line that has /system/sd at the end of it?

If not then the apps2sd script never ran
[Hero CDMA Android Development] centran:
SUCCESS... kind of

I have gotten apps2sd to work on fresh 2.0b2 but it should work if the ROM has the apps2sd init.d script.

I say kind of because a reboot will freeze up the phone but there is a workaround. Actually the fix would be if someone can tell me how to run a script at bootup because I can't figure out how to make the apps2sd script to run when the phone boots. If someone can do that then this will work perfectly.

Anyway here are the steps.

Let the phone boot up. You will then need to edit /system/etc/init.d/04apps2sd

to allow it to run. open up adb shell

mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
busybox sed -i 's/A2SD_ENABLED=`getprop cm.a2sd.enabled`;/A2SD_ENABLED=1;/' /etc/init.d/04apps2sd
busybox --install /system/bin

those lines...

makes /system writable

replaces a line in the script to force it to run

install busy box in bin so we can run the script

Now you can run

/etc/init.d/04apps2sd

but here is the tricky part. you need to reboot your phone but you just broke it with that command. why is it broken? because that command need to be run every time the phone boots. However, you can sneak the command in before the phone crashes

So...

reboot

and then keep trying to get back into adb shell till it lets you connect then...

/etc/init.d/04apps2sd

Don't freak out you have enough time and if you didn't get it in time then just issue a reboot and try again.

Now apps2sd is working BUT whenever you reboot the phone you need to sneak in real quick to issue that command. So, can someone please tell me how to run that command at boot?
[Hero CDMA Android Development] kkruse:
im over in pville xD
[Hero CDMA Android Development] tejasrichard:
Right on! I'm just up the road in RR, a few blocks from Dell.
[Hero CDMA Android Development] watzone69:
Super-south Austin,

Slaughter and Manchaca!

Has anybody tried gbhil's advice?

http://xdaforums.com/showpost.php?p=5838155&postcount=449
[Hero CDMA Android Development] swaze:
So is this confirmed to be working now?
[Hero CDMA Android Development] afazel:
Didn't work for me.
[Hero CDMA Android Development] kkruse:
Ahh not too far from me off heatherwilde.
[Hero CDMA Android Development] centran:
Not the process on this first page but if you follow my directions above it should work. However, you cannot let the phone reboot unless you have a computer with adb to issue that last command or else the phone will crash. You can fix it by issuing the command while it boots so no damage done but it would be a pain in the ass if you are out and about.
[Hero CDMA Android Development] daryelv:
Something to try... posted by tkirton... I'm using my phone for work right now, or else I'd be going through these steps.

http://xdaforums.com/showpost.php?p=5844950&postcount=1200

-Daryel
[Hero CDMA Android Development] kashb91:
has anyone tried daryelvs suggestion? ive tried repeatedly to do the process the op wrote but it never worked. kept running into random troubles. also just noticed that he boldly stated what rom he used to get it to work, fresh 2.0b2. is this the same rom that everyone else is using and encountering errors on or is it the first version without the video camera?
[Hero CDMA Android Development] :
I just had a look at the boot.img , there is no reference to a2sd, app2sd or apps2sd in the init.rc In my learning quest to get app2sd working on fresh, I've extracted a few boot.img's with working app2sd and they all call it from the init.rc. I'm just wondering what the OP changed in the boot.img. Again I'm just trying to learn.
[Hero CDMA Android Development] centran:
CONFIRMED

working and a much better solution then OP because he added the shared libraries of ext2 which I didn't give a crap about.(it's on a sdcard... when things break they really break)

Yep. this is the issue I ran into. Was trying to figure out how to either run a script at boot through another one or make a bootimg to fix init.rc.

However, the above example fixes everything and adds the right shared libraries which OP did not include.
[Hero CDMA Android Development] Moguledyouth:
I tried both of these methods and I could not get either of them to work, while tkirton's method seemed to work, after reboot none of my apps showed up and the folders are still pointing to the ones on the phone. Can someone please just figure this out already, it is the one thing that I need.
[Hero CDMA Android Development] Pyro8:
Followed thsoe steps and reboot.. still stuck at boot up.. is it working? Should I wait and let it go or something wrong?

when i type ln -s flash_image-arm-uclibc flash_image then i get"link failed File exists and i go ahead to keep going.. was that ok?
[Hero CDMA Android Development] washjayb:
scratch that.
[Hero CDMA Android Development] kkruse:
ALL Please Read 1st post again. Instructions have changed!! Now you can just flash update.zip
[Hero CDMA Android Development] dcdave63:
I keep getting "permission denied" in every directory...now what?
[Hero CDMA Android Development] ejqr5:
Where is it?

I guess I got impatient! Testing now.
[Hero CDMA Android Development] kkruse:
I took ramdisk from a 2.1 rom that had apps2sd xD and put the kernel from the fresh rom. Most of the init structure wasnt there for apps2sd. It just calls the script in /system/init.d/04apps2sd at boot.
[Hero CDMA Android Development] kkruse:
did you forget to:

chmod 755 /system/bin/apps2sd
chmod 755 /system/xbin/apps2sd

?
[Hero CDMA Android Development] :
About to try again. Working or not I applaud your effort kind sir!
[Hero CDMA Android Development] dcdave63:
Ok, that wasnt there before...lol

Anyway, did that again, this time when I did the apps2sd on, it gave me an error, told me to reboot. Then remounted and did it again, then it gave me the message that it was on, then it told me to reboot (again). But I think it worked. Going to try installing some apps and see if the memory sticks at one number.

Wish me luck!

Thanks for the help!
[Hero CDMA Android Development] morbidpete:
can I use move apps to sd card in recovery or do i have to remove all my apps and re install them?
[Hero CDMA Android Development] kkruse:
after the reboot it should move them to the /system/sd partition i believe. It wont touch /system/app (as it should probably not).
[Hero CDMA Android Development] :
Hell ya!!!! It works! kkruse you are the man.. My main memory is holding around 153 after installing several apps and stuck after a reboot. I can't thank you enough.
[Hero CDMA Android Development] ejqr5:
I didn't see any difference in my storage. Did you try this fresh from a wipe? I guess I will try again.
[Hero CDMA Android Development] dcdave63:
Ok, that didn't work. Dropped from 86 to 79 MB after installing a few apps. Not sure if doing all of it over and over will actually change anything, since I think I followed every step a few times. Guess I will have to live with it until the next iteration of ROM changes.
[Hero CDMA Android Development] kkruse:
I just updated Post 1 with another version of the kernel. It fixes the perms for ya so you have less CLI commands to do.
[Hero CDMA Android Development] :
Yeah I was still on 2.0b. I just flashed 2.0b2 wiped everything. I did not boot. Then flashed kkruse's fix. Ran my first boot then entered his commands. Also not sure it matters, I had formatted my SD card and made new partitions trying to get apps2sd to work the last couple days.
[Hero CDMA Android Development] kkruse:
Ok now ppl running other roms can maybe send their reports to me via PM?
[Hero CDMA Android Development] Pyro8:
Is it for based eris dump only?

edit: I failed with 2.0b.
[Hero CDMA Android Development] ejqr5:
Ok, I tried it again. I just went from 73 megs up to 132! Looks like it works. Great work! I really appreciate this!
[Hero CDMA Android Development] centran:
For everyone talking about checking the storage on the phone, that is not how you check if it is working. There is still an app folder on the phone for default apps.

after the phone reboots adb shell into it

Two ways to check

busybox df -h

You should see a line that has /system/sd at the end of it. That will only mount if the apps2sd script ran as the phone will never mount that by itself.

The other proof is to

busybox ls -la /data

You should see these lines

lrwxrwxrwx 1 0 0 14 Mar 10 10:57 app -> /system/sd/app

lrwxrwxrwx 1 0 0 22 Mar 10 10:57 app-private -> /system/sd/app-private

The dir -> dir listing means a symbolic link is created and it is getting the app directory from your card.

Please check with the method above before reporting that it is not working.
[Hero CDMA Android Development] dcdave63:
Neither are there. So it didn't work for me.
[Hero CDMA Android Development] :
My results.
[Hero CDMA Android Development] kkruse:
check my sig is what I test with
[Hero CDMA Android Development] doeboy711:
has anyone tested this with the Damage rom?
[Hero CDMA Android Development] morbidpete:
worked on the damage rom

::edit:: i lied :-(
[Hero CDMA Android Development] david279:
didn't work on damage rom for me. It mounted the sdcard at /system/sd but didn't move the apps there. may be a busybox thing.
[Hero CDMA Android Development] kkruse:
Maybe, I haven't tried that rom with this yet.
[Hero CDMA Android Development] morbidpete:
tried again witht he damage roma nd the new V@ posted on the first link. i think it works. all my icons are messed up in sense ui going to redownload them now to see if they do indeed work. here's my busy box stuff

busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 95.7M 0 95.7M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 170.0M 160.8M 9.2M 95% /system
/dev/block/mtdblock5 159.5M 17.2M 142.3M 11% /data
/dev/block/mtdblock4 130.0M 1.1M 128.9M 1% /cache
/dev/block/mmcblk0p2 457.4M 39.9M 393.1M 9% /system/sd
/dev/block//vold/179:1
1.4G 354.8M 1.0G 25% /sdcard
# busybox ls -la /data
busybox ls -la /data
drwxrwx--x 1 1000 1000 2048 Mar 11 00:35 .
drwxr-xr-x 14 0 0 0 Mar 11 04:29 ..
drwxrwxrwx 1 0 0 2048 Mar 11 00:35 DxDrm
drwxrwx--x 1 1000 1000 2048 Mar 11 00:35 anr
drwxrwx--x 1 1000 1000 2048 Aug 1 2008 app
drwxrwx--x 1 1000 1000 2048 Mar 11 00:35 app-private
drwx------ 1 1000 1000 2048 Mar 11 00:37 backup
drwxrwxrwx 1 1002 1002 2048 Mar 11 04:31 btips
drwxrwx--x 1 1000 1000 2048 Mar 11 04:30 dalvik-cache
drwxr-xr-x 1 0 0 2048 Aug 1 2008 data
drwxr-x--- 1 0 1007 2048 Mar 11 04:29 dontpanic
lrwxrwxrwx 1 0 0 11 Mar 11 00:35 drm -> /data/local
prw-r--r-- 1 1000 1000 2048 Mar 11 02:50 gps_nmea_fifo
drwxrwx--x 1 2000 2000 2048 Mar 11 00:35 local
drwxrwx--- 1 0 0 2048 Mar 11 00:35 lost+found
drwxrwx--t 1 1000 9998 2048 Mar 11 00:35 misc
drwx------ 1 0 0 2048 Mar 11 04:29 property
-rw-rw-rw- 1 1013 1000 2 Mar 11 04:31 pvcodec.txt
drwxrwxr-x 1 1000 1000 2048 Mar 11 04:31 system
drwxrwxrwx 1 1018 1018 2048 Mar 11 00:35 wimax

after downloading all the apps again, all the icons turned back to normal. but my bus box info is exactly the same so i have no idea if it is working. going to find a large app to download and see if internal or sd changes
[Hero CDMA Android Development] jayjay7411:
currently running b2 also and

FOR VER 2 SIGNED worked amazingly 135megs free of 159megs sweetness absolute f'ing sweetness thank you sooo much!
[Hero CDMA Android Development] david279:
i dont think its working. /data/app would be linked to /system/sd/app. See if anything was moved to /system/sd.
[Hero CDMA Android Development] morbidpete:
i didnt think so either. its cool. i only use like 10-15 apps daily. i always keep my phone clean!
[Hero CDMA Android Development] Pyro8:
c&p from root cheat sheet.

ow to tell if apps2sd (A2SD) is working

1) Connect Phone via USB

Code:

adb remount

adb shell

ls /system/sd/app/

If you get a list of applications, then apps2sd is working properly.

easy...
[Hero CDMA Android Development] morbidpete:
then it is working for me

# ls /system/sd/app/
ls /system/sd/app/
com.ajas.coinflip.apk
com.bumptech.bumpga.apk
com.disretrospect.twidgit.apk
com.estrongs.android.pop.apk
com.facebook.katana.apk
com.gibsonDev.gallery.B3.apk
com.google.android.apps.googlevoice.apk
com.google.android.apps.maps.apk
com.joelapenna.foursquared.apk
com.myspace.android.apk
com.nextmobileweb.craigsphone.apk
com.nimbuzz.apk
com.pandora.android.apk
com.pwnwithyourphone.talktomekbd.apk
com.pwnwithyourphone.talktomekbd.dictionary.apk
com.rechild.advancedtaskkiller.apk
com.shazam.android.apk
wireless_tether_1_70-pre2_htc.apk
[Hero CDMA Android Development] david279:
do this.

cd /data/app

pwd

what does it say?
[Hero CDMA Android Development] Pyro8:
Yes. It's working.
[Hero CDMA Android Development] damageless:
Don't waste your time trying to get it on my rom. I am releasing a version that has it included tomorrow.
[Hero CDMA Android Development] morbidpete:
# cd /data/app
cd /data/app
# pwd
pwd
/data/app
#
[Hero CDMA Android Development] morbidpete:
thanks for the heads up