yashsingh1/xdaforums huggingface dataset:
[Hero CDMA Android Development] tkirton:
I downloaded the Rodriguez rom...it should launch via 04apps2sd (a copy of a2sd)

Would need a logcat when the boot starts in order to see if it is actually reading the file or did an error occur.

You can try another version of Update 3, called 3b: http://www.darktremor.info/files/a2sd/a2sd-2.7-update3b-signed.zip.

EDIT: If it autostarts with nocache, then I think I know what the issue is...it has something to do with where dalvik-cache is located at. I noticed that the Rodriguez Rom is based on Modaco, which is a rom that causes serious issues with Darktremor A2SD. I think the issue is where the dalvik-cache is being placed. Try the Update 3b...this may correct that issue.
[Hero CDMA Android Development] tkirton:
You don't have to do that...Darktremor A2SD will automatically move the apps to the SD card.

To move the dalvik-cache, type a2sd cachesd in an ADB shell.
[Hero CDMA Android Development] tkirton:
Android just formatted the FAT32 partition of the SD card.
[Hero CDMA Android Development] britoso:
All is good now.

see http://xdaforums.com/showpost.php?p=6957232&postcount=551 <--that boot image works perfectly

:)
[Hero CDMA Android Development] tkirton:
Sweet. Works completely in Froyo and I just fixed an issue with Update 3.
[Hero CDMA Android Development] tkirton:
Darktremor A2SD 2.7 Update 3r1

New version of Darktremor A2SD is out. If you are using Update 3, you may want to load this version, as it fixes a bug in fixa2sd where the dalvik-cache was moving automatically to the SD card.

Also, the launch segment of A2SD has been moved to a new program called launcha2sd. This is now ran using bash rather than sh (a2sd just launches launcha2sd..this is still ran using /system/bin/sh).
[Hero CDMA Android Development] djmcnz:
OMG! :eek:

This is amazing! I've just integrated Darktremor A2SD into my Kang-o-rama froyo FRF83 build and it's astonishing, so well constructed and so reliable.

Guys, this is truly awesome work, so much better than what we had before.

For sure there's going to be a BIG call out to your guys and this thread when I release, hopefully soon.

Thanks!
[Hero CDMA Android Development] craig198:
cool thankyou. I wasnt going to do it again thats for sure. And moving dalvik cache wont break my program associations in android?
[Hero CDMA Android Development] tkirton:
Wow. I never received such a rave review. Thank you very much...I appreciate it.
[Hero CDMA Android Development] tkirton:
No, it won't. Worst case scenario if you have issues after the move, you can run a2sd resetcache to wipe the cache. The phone will reboot and start the dalvik-cache build process (same as if you flashed your favorite rom on your phone for the first time without doing a wipe.)
[Hero CDMA Android Development] tkirton:
bump for thread title change (need to remember to change the thread title when I'm updating the first message.)
[Hero CDMA Android Development] craig198:
what does "eventually, a2sd cache will be deprecated" mean exactly? does it create a problem eventually and you have to reset it?
[Hero CDMA Android Development] tkirton:
No, the command is being replaced with a2sd cachesd.

Until Update 3, you could only move the cache between internal storage and the SD card. Now that you can move the cache to the /cache partition, the cache command needs to be renamed to cachesd to identify it as moving dalvik-cache to SD card, as opposed to cachepart, which moves dalvik-cache to /cache partition.

a2sd cache, although not listed in a2sd help, still works in moving your dalvik-cache to SD card...however, at some future version, this command will no longer work.
[Hero CDMA Android Development] flibblesan:
Update 3r1 fails badly on my Huawei device. 2.7 worked fine.

I moved dalvik cache to SD, and rebooted. logcat has these errors:

06-27 19:18:46.701: ERROR/dalvikvm(1185): Can't open dex cache '/data/dalvik-cache/system@framework@core.jar@classes.dex': No such file or directory
06-27 19:18:46.701: ERROR/dalvikvm(1185): Can't open dex cache '/data/dalvik-cache/system@framework@ext.jar@classes.dex': No such file or directory
06-27 19:18:46.701: ERROR/dalvikvm(1185): Can't open dex cache '/data/dalvik-cache/system@framework@framework.jar@classes.dex': No such file or directory
06-27 19:18:46.711: ERROR/dalvikvm(1185): Can't open dex cache '/data/dalvik-cache/system@framework@android.policy.jar@classes.dex': No such file or directory
06-27 19:18:46.711: ERROR/dalvikvm(1185): Can't open dex cache '/data/dalvik-cache/system@framework@services.jar@classes.dex': No such file or directory
06-27 19:18:46.711: ERROR/dalvikvm(1185): Can't open dex cache '/data/dalvik-cache/system@framework@com.huawei.android.launcher.jar@classes.dex': No such file or directory
06-27 19:18:46.711: ERROR/dalvikvm(1185): Can't open dex cache '/data/dalvik-cache/system@framework@widget_multimedia.jar@classes.dex': No such file or directory
06-27 19:18:46.721: ERROR/dalvikvm(1185): Can't open dex cache '/data/dalvik-cache/system@framework@widget_info.jar@classes.dex': No such file or directory
06-27 19:18:46.721: ERROR/dalvikvm(1185): ERROR: no valid entries found in bootclasspath '/system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/com.huawei.android.launcher.jar:/system/framework/widget_multimedia.jar:/system/framework/widget_info.jar'
06-27 19:18:46.721: WARN/dalvikvm(1185): JNI_CreateJavaVM failed
06-27 19:18:46.721: ERROR/AndroidRuntime(1185): JNI_CreateJavaVM failed

clearing cache and rebooting doesn't resolve the issue. Phone takes ages to boot and once booted I get a few force closes.

If I move dalvik cache back onto the device, clear and reboot, then the phone works fine.

Anything related to /system being read only?

edit: Looks like a2sd is no longer mounting the /data partition on boot and thus dalvik is unable to find it's cache.
[Hero CDMA Android Development] Burrid:
I just wanted to say my phone is in a boot loop for 3 days now, and I can't find anything to make it work again, not even nandroid restore worked :(

I made a thread here:

http://xdaforums.com/showthread.php?t=710415
[Hero CDMA Android Development] tkirton:
Hmmm....this looks like the same issue I was getting on Blue Echo with Update 3. 3r1 doesn't do this.

Which 2.7 are you using to make it work? There are:

2.7 beta 1-10

2.7 final

2.7 Update 1

2.7 Update 2

2.7 Update 3

2.7 Update 3r1

Which rom are you using?

Also, nothing changed with the mount command...mounting happens before dalvik-cache is even looked at. If the partition fails to mount, the program is designed to send dalvik-cache back to internal storage.
[Hero CDMA Android Development] tkirton:
Here's what you do:

1. Wipe everything, including all data, dalvik-cache and SD ext information

2a. Reflash the Modaco rom

-or-

2b. If your Nandroid backup was before you put A2SD on the phone, restore that.

Now, try to start it. It should return back to nornal.
[Hero CDMA Android Development] flibblesan:
I'm using a2sd-2.7-1-signed.zip which works fine. Is this 2.1 update 1?

2.7 update 3 didn't work so I upgraded to 3r1 and it still didn't work. I even did a full ROM reflash and upgraded from 2.7 to update 3r1. Got the errors once I rebooted after moving dalvik to cache.

I'm using FLB-MOD (my own ROM) which is for the Huawei U8220/Pulse device. Previous roms for this device have used the MoDaCo a2sd.

When I created the rom I just dropped 2.7 into the rom and it worked without any issues.

So with 2.7 update3r1 I boot into Android and do a2sd check from adb shell. It tells me that dalvik-cache is on the device. So I move it to SD. a2sd does what it's suppose to do and moves dalvik and creates the symlinks, as 2.7 does. Rebooted and it seems that the phone is trying to use the dalvik cache before /data is mounted. It never used to do this.
[Hero CDMA Android Development] flibblesan:
Could it be caused by a2sd using the wrong mount points? My device is:

df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 52.7M 12.0k 52.7M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock1 110.0M 102.3M 7.7M 93% /system
/dev/block/mtdblock2 80.3M 20.3M 59.9M 25% /data
/dev/block/mtdblock3 20.0M 1.1M 18.9M 6% /cache
/dev/block/mmcblk0p2 457.9M 13.6M 419.8M 3% /system/sd
#
[Hero CDMA Android Development] miguelfp1:
I haven't been able to boot after flashing over Fresh ROM 2.3 beta and moving the Dalvik-cache to /cache (using a2sd cachepart) and running a2sd cachereset....

got a ton of force closes after running a2sd cachepart while booted
[Hero CDMA Android Development] tkirton:
The /data partition should be read-write at boot by the init.rc.

What is more likely the issue is that the SD card isn't mounting. On the next boot loop, try this: go into adb shell and type the following:

cd /data

cd app

/system/xbin/busybox pwd

Let me know what pwd returns...it may return /data. If so, see if there was an error when you did cd app. If there was an error, the SD card isn't mounting. I would need to get a logcat of the boot process to see what's going on (I suspect it may be a new file somewhere in the modaco build that isn't working with my A2SD).
[Hero CDMA Android Development] tkirton:
Some roms don't handle the moving of the dalvik-cache to the /cache partition. If you get this issue, move the dalvik-cache either back to the internal storage or to the SD card.
[Hero CDMA Android Development] miguelfp1:
ok, thanks!!
[Hero CDMA Android Development] djmcnz:
Am on the road so more details later but latest release is working perfectly for me on my new Froyo rom but I did have to change the mount command in the script. Even with fstab I had to make the mount explicit in the script. I noticed a busybox syntax trying to mount (in boot logcat) but I couldn't find it... I just re-typed a verbose mount command into the script and it works every time...

I am totally impressed with this man, well done.

Check it out... 12 hours, 1000 downloads... http://xdaforums.com/showpost.php?p=6973422&postcount=2139

Edit. Correct link
[Hero CDMA Android Development] tkirton:
The busybox used is busybox.a2sd (this is the one included in the package...this ensures that there is a busybox to use no matter what). It is located at /system/bin/busybox.a2sd.

The mount commands run the busybox.a2sd. The idea is to ensure that the mount command is consistent throughout any rom (I've had troubles with the mount command in the past).

It's interesting that the busybox.a2sd isn't working right with the mount command. It's possible that there is an incorrect permission applied. I'll look at the package to see.

EDIT: The permission is 777, which is wide open for all users...so I'm not sure what gives here.
[Hero CDMA Android Development] Burrid:
I did both of those, but they didn't work :(

I'll try again though.

Edit: solved!

I always tried the factory wipe and cache clear from my custom recovery but that didn't work.

Then I did a factory wipe and cache clear from my standard recovery and he started up again :D

Thanks tkirton!
[Hero CDMA Android Development] tkirton:
Try 2.6.1...the fixes you tried to push through are in it plus other fixes.

But, if you're comfortable with 2.5, then that's okay.
[Hero CDMA Android Development] smw6180:
I'll mess with it tomorrow, I saw you posted that right after I made my entry. :)
[Hero CDMA Android Development] tkirton:
Before you try...I think I may be seeing what you are seeing. The thing reverted my dalvik-cache.

Got a feeling that the same thing that is in Fresh 2.0d (which I had to make a workaround) is in DC 2.7.2. I now see the issue and am tracking it down. Should have a fix tomorrow for you (it will be 2.6.1 as well).

EDIT: Found the issue. I was trying to determine if the /data/dalvik-cache was a directory if it couldn't find the flag file (looks like this: if [ -d /data/dalvik-cache ];). While that looks fine, it doesn't behave as expected. Apparently, if you have a symbolic link called /data/dalvik-cache, it treats it as a directory as well (I guess that is due to it being linked to a directory). Changed the code to read: if [ ! -h /data/dalvik-cache ];, which says: if /data/dalvik-cache is not a symbolic link. Now it works as expected.

That was strange, because I wasn't seeing that in the Rom I was testing (which, oddly, was a 1.5 Rom since there was a lot of requests to make my version of A2SD compatible with 1.5 Roms).

I tested it on DamageControl 2.7.2, so I know it works now.
[Hero CDMA Android Development] Insomaniac10:
i tried flashing both 2.6.1 cache and 2.6.1 no cache on my rooted cliq, running Handler Exploit 1.5......when attempting to flash the .zips via recovery it says "error in install.sh" "run_program PACKAGE:install.sh" then it says "installation aborted"

-this occurs when it gets the the "copying files" stage of the .zip install

-again this happened for both versions of the .zip

anyone have any thoughts?

thank you in advance!
[Hero CDMA Android Development] smw6180:
Sweet. Downloading now, let you know how it goes.

Edit:

Ok, downloaded it and flashed it...same as before. It's rebuilding dalvik each time. Plus it's force closing pretty much everything but sense itself when it finally does boot. Going back to 2.5 again.
[Hero CDMA Android Development] tkirton:
What recovery are you using?
[Hero CDMA Android Development] tkirton:
Need you to send me what you see in logcat when you boot. I know I fixed this issue since I'm running DC 2.7.2.

Note: I just rebooted and my dalvik-cache is holding.

EDIT: Try again, this time, send me the logcat before you move back to 2.5. E-mail address rtkirton at gmail.com
[Hero CDMA Android Development] smw6180:
Recovery 1.6.2.

Give me a few and I'll flash it again and get you a logcat.
[Hero CDMA Android Development] smw6180:
Sent.

Thanks for looking. Not sure where the issue is. But in the logcat I sent you I'm showing this:

I//system/bin/sh( 66): [*] Starting Darktremor A2SD version 2.6.1
I/HTCIPC ( 61): Android IPC Server (C) HTC Corporation 2009
I//system/bin/sh( 66): [ ] Searching for Mount Point...
I//system/bin/sh( 66): [!] Mount point found..no further action required.
I//system/bin/sh( 66): [ ] Checking for ext partition
I//system/bin/sh( 66): [!] Ext partition found.
I//system/bin/sh( 66): [!] Skipping check due to dalvik-cache symbolic link
I//system/bin/sh( 66): [ ] Mounting ext partitions
I//system/bin/sh( 66): [*] Ext partition mounted.
I//system/bin/sh( 66): [ ] Checking for Fresh 2.0 Startup Sequence...
I//system/bin/sh( 66): [ ] Searching for Swap Partition
I//system/bin/sh( 66): [ ] Swap Partition Found...Turning on swap.
I//system/bin/sh( 66): [ ] Searching for Data directory on ext partition.
I//system/bin/sh( 66): [ ] Checking Dalvik-Cache Link.
I//system/bin/sh( 66): [X] Dalvik Cache not symbolically linked, but Dalvik
I//system/bin/sh( 66): Cache flag file not found. Correcting...
I//system/bin/sh( 66): [ ] Clearing /system/sd/dalvik-cache.
I//system/bin/sh( 66): [ ] Removing Dalvik Cache directory.
I//system/bin/sh( 66): [ ] Creating Dalvik Cache symlink.
I//system/bin/sh( 66): [*] Dalvik Cache is now stored on EXT partition.
I//system/bin/sh( 66): [ ] Searching for Dalvik-cache directory on ext partiti
on
I//system/bin/sh( 66): [ ] Searching for App directory on ext partition
[Hero CDMA Android Development] tkirton:
2.6.1 release 2 is out - finally fixed the flashing issue where a lot of recovery images were not able to flash the file. It now uses standard syntax.
[Hero CDMA Android Development] qngds:
2.6.1 works fine on Gumbo 1.5c. Was using an assortment of 2.1 roms, but could never get an audiofix that worked completely.

Oh well, nothing wrong with Gumbo :)
[Hero CDMA Android Development] tkirton:
Nothing wrong with Gumbo at all. It's a good solid Rom.
[Hero CDMA Android Development] StephenMilone:
just flashed over fresh 2.0d using a2sd built in that rom and my phone locks up during the boot animation [the animation stops animating haha]...any thoughts? wait it out? its been 2 minutes...

now been 15 minutes, something is wrong. i'll reflash the zip and report back
[Hero CDMA Android Development] tkirton:
Perform a nandroid restore and download the nocache version. I just talked to TrevE (who also builds an Apps2SD that is a bit more feature packed than mine). He was stating the 2.1 Roms (the ones that have the 2.6.29 kernel) don't have the timing mechanisms that were present in 1.5 (probably wasn't put in during porting). Trying to move everything at once while dalvik is running is causing an instability issue. Using the nocache version will prevent the dalvik-cache from moving on boot (or it should).
[Hero CDMA Android Development] redram38:
Is this what would cause my phone to hang at the first HTC screen after flashing this? Would it work to move the dalvik after the first boot is complete?
[Hero CDMA Android Development] tkirton:
Its possible. The a2sd-2.6.1-nocache version is suppose to do just that...keep dalvik-cache from moving. You would have to manually execute the a2sd cache command to initiate the move.

This is happening more on the 2.1 roms based on the 2.6.29 kernel. It looks like it is okay on 1.5 Roms and possibly 2.1 roms based on kernel 2.6.27.

I'm thinking on redoing everything to compensate.
[Hero CDMA Android Development] fixxxer2008:
how would i incorporate this in a rom im building off of fresh 2.0d? would i have to use the no-cache version than have the users move the dalvik manually via command? i tired to build in trevs gui app and it doesn't work.
[Hero CDMA Android Development] fixxxer2008:
what version do we flash if were running fresh 2.0d?
[Hero CDMA Android Development] StephenMilone:
tried that and that failed too, i then noticed flipz/toast released a new OC rom so i decided to just wipe/flash and try that. it's pretty nice, but now I was *hoping* someone can direct me to a 2.1 rom w/ a working camera that will work with the way my SD is now setup for the new dev rom aka EXT4 so i can nandroid back and forth at will....cause Fresh 2.0D + this release isn't working for me in any which way. thanks everyone.
[Hero CDMA Android Development] tkirton:
With Fresh 2.0d, I put it in two locations:

/system/bin/a2sd (this is for user instructions...normally this is where the system launches)

/system/etc/init.d/04apps2sd (this is where Fresh 2.0d launches the a2sd from).

There is code in place that will detect where you launch it from (in your case /system/etc/init.d/04apps2sd) and, if it sees 04apps2sd and that the /data/dalvik-cache directory is a physical directory, it will prevent the dalvik-cache move routines from launching (it will literally create the .nocache flag on /system/sd...but only if it can actually mount the ext partition.)

So, when you build your rom, obviously you should reset the dalvik-cache to be a directory again during your ROM installation.

Good luck and, if you need assistance, let me know.
[Hero CDMA Android Development] djmcnz:
It's not a problem, I worked around it. It was using the proper busybox.a2sd but threw a syntax error with "mount /sdcard" which I know is silly. Nevertheless, when I replaced with the mount -o, rw blah, blah, it worked! :) Yes, manually added fstab, did nothing.

I am happy! :)
[Hero CDMA Android Development] flibblesan:
Ok I'll do this now. The odd thing which I've now worked out is that after a minute Android finally is able to read the dalvik cache and the system boots. It takes about 4-5 retries of finding the cache though.

I'll do your guidelines and report back.
[Hero CDMA Android Development] flibblesan:
Ok did what you suggested

$ adb shell
# cd /data
cd /data
# cd app
cd app
# /system/xbin/busybox pwd
/system/xbin/busybox pwd
/system/sd/app

Oddly since I did a full device wipe and SD partition last night then installed my ROM and upgraded A2SD to 2.7 update3r1 I can now boot into the system but the errors are still there early on in the boot process.

I've attached my logcat to the post.

View attachment 351143
[Hero CDMA Android Development] tkirton:
I didn't see the logcat attached.

Send me the logcat: rtkirton@gmail.com and I'll see if I can figure out what's going on.

This is definitely something I want to look at since it could affect more than one rom.
[Hero CDMA Android Development] flibblesan:
It took 4 attempts to get the attachment to show in the post :). I've emailed it to you also. Any other parts of my ROM do you need to look at?
[Hero CDMA Android Development] nfinitefx45:
Well I have read somewhere else (I will try to locate the rom in question) but they ended up adding a delay in the A2SD in order to by some time for the phone to build the dalvik, this sound very similar to what is happening with you.

I will post teh link when I locate it again.
[Hero CDMA Android Development] flibblesan:
With help from tkirton I've got this resolved on my ROM. The issue was busybox being right at the end of the boot.img init.rc which meant that SD wasn't being mounted until the phone has pretty much booted. A few changes to move this earlier in the boot process means that A2SD launches sooner and the SD is mounted before dalvik-vm wants it's cache.

My rom is sort of based on MoDaCo so this may have been the issue all along.
[Hero CDMA Android Development] Guitarfreak26:
hey i keep getting bootloops until i do a a2sd repair in adb? im on kang o rama 0.9
[Hero CDMA Android Development] tkirton:
It was an issue with Kang-o-rama (look at the post directly above the one you posted). It's been fixed, but I'm not sure it has been released. You may have to download a newer version of Kang-o-rama, or download the Darktremor Apps2SD 2.7.5 Preview (http://www.darktremor.info/files/a2sd/dtapps2sd-2.7.5-preview-signed.zip).

There's a separate thread for that one...I'm in the process of moving discussions to that one (this one is rather full): http://xdaforums.com/showthread.php?t=715116

Note: This is a preview release, so it may still have bugs in it.
[Hero CDMA Android Development] djmcnz:
I hadn't realised... do I need to change the Kang-o-rama ramdisk settings?
[Hero CDMA Android Development] tkirton:
I think we discussed this before, relating to the run-parts being executed much later than needed.

Then again, knowing me, I probably am getting stuff mixed up. This sometimes happens when I try to keep track of multiple conversations.

EDIT: Yep...getting conversations mixed up. Nevermind what I said before. The problem is in FLB-MOD. Not sure if it is in the Kang-o-rama build.

Here's the situation: On FLB-MOD, it uses busybox run-parts to launch Apps2SD. The issue occurred when Flibblesan kept getting a boot loop. The SD card wasn't mounting until well into the boot process, causing a boot loop to occur (dalvik-cache didn't have a target until later in the the boot process). The cause was that the busybox run-parts was executing at the end of the init.rc script. This should be called before dalvik is called.

The fix to this is to put the following two lines before the class_start default line in init.rc:

start sysinit

on property:cm.filesystem.ready=1

Sysinit is the name of the service that launches busybox run-parts. In FLB-MOD's case, it was named userinit. As long as the start and service names match, you can name it to whatever you want.

That's only part of the fix. The other part is the actual service line. This can be placed anywhere after the class_start default line:

service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d

disabled

oneshot

Again, Sysinit can be changed to anything you like, so long as it matches the start line from above.

Adding both parts will allow you to run the apps2sd on bootup (as well as other scripts).
[Hero CDMA Android Development] djmcnz:
Thanks for the clarification... shouldn't be a problem with Kang-o-rama but I'll do some negative testing just to be sure... still loving your work. :)