yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] BtbN:
I think i'm stuck.

Which is the place/moment/time the a2sd script has to be run? Is it realy that early in boot process?

And why does it get run twice? I only did the change to init.rc from the rom-building-post, which from what i see should only run it once, not twice.

Or is the on boot trigger executed more than once?

Edit:

Ok, found it out. On recent CM, the /system/bin/sysinit script executes the stuff in /system/etc/init.d, so they actually got run twice.

But still, App2sd script can't access sd-ext, as the device is not present at it's early state in boot. I somehow have to achive that it gets run after vold got run.

Edit2:

I simply added a start vold before running sysinit, but even if log looks good for vold starting before a2sd, it still does not manage to access /dev/block/mmcblk0p2. What has to happen first for this to work?
[Desire Android Development] Lawliet:
Couldn't get it to work with Desire stock ROM rooted by unrevoked. Got into an infinite boot screen at the "HTC Quietly Brilliant" screen.
[Desire Android Development] BtbN:
Got it working on my desire. I created a modded CM6 nightly rom, with gapps and this a2sd builtin.

The solution was: add some mknod to the init-script for a2sd, so the dev-nodes get created before a2sd needs them. This works perfectly :)

Someone interested in that rom i created? If so, i'll upload it.
[Desire Android Development] vrmp:
I'm interested in the ROM you created, maybe even more in a patch which can be used on any CM6 ROM :)
[Desire Android Development] Nekromantik:
if you could upload the modded files so we can flash them onto any of the nightly's :)

thanks
[Desire Android Development] BtbN:
The problem is, that it needs to modify the boot.img, so it's not done with copying some files over.

I'll look if i can create some kind of auto-patch procedure. Atm i'm uploading the fully modded cm6 nightly rom. Will take some minutes :D
[Desire Android Development] Nekromantik:
ah ok.

I thought maybe copying the edited boot image and then using the Darktremor Apps2SD fix would work.

what version of the nightly's have you got?
[Desire Android Development] BtbN:
I only modded the one for htc desire. Download is here:

http://btbn.de/files/cm-bravo-nightly-with-gapps-and-a2sd-07172010.zip

The mod is quite simple. Should be no problem to automate this. At least for HTC Desire.
[Desire Android Development] Nekromantik:
thanks

can we just flash without anything else? after a wipe of course.
[Desire Android Development] vrmp:
Thanks will try it :)
[Desire Android Development] Nekromantik:
does it move davlink cache?

if it dont, will the commands on the first page to move davlink work?
[Desire Android Development] BtbN:
In my test of it I just did a wipe, flashed it, and it worked. Of course it's an experimental CM nightly build, so the usual risks apply :)

Edit: To move dalvik-cache, you just have to run a2sd cachesd once.
[Desire Android Development] Nekromantik:
ok thanks

will try once fone charged,

I gotta type the command in ADB while phone in recovery right?
[Desire Android Development] BtbN:
No, while it is fully booted. It will move the cache on the sd, and then do a reboot.
[Desire Android Development] Nekromantik:
ok.

This is good news.

Well done :)

Hopefully your mod works on the CM6 RC1 once its released.
[Desire Android Development] Nekromantik:
i wiped and flashed and im stuck on the htc white screen.

sounds like a ext not mounting issue.
[Desire Android Development] BtbN:
Does a simple soft-reset(Press Power+VolDown+Trackball) solve it? Had this hang sometimes, too. No idea what causes it.
[Desire Android Development] Nekromantik:
sorted it

Had to mount and remount in linux.

i has same issue with Adam G's Sense ROM

davlink cache to sd worked fine too :)

got 98mb and 60 apps

brightness setting not workiing is annoying tho.

will try and add your boot image and a2sd to tonights nightly which might have a fix.
[Desire Android Development] BtbN:
Great :)

I'm setting up a whole crapload of sh-scripts that patches any CM6 Bravo rom. Will see if i get this sorted :)
[Desire Android Development] Nekromantik:
awesome

10 chars
[Desire Android Development] BtbN:
Patching-process works:

http://btbn.de/files/cmpatch.tar.gz

Most likely only runs on linux.

Usage: copy cm6 nightly image into the cmpatch-directory and run ./doPatch cm_bravo-*.zip.

I'm not sure if you have to jarsign the resulting newimg.zip. The one i uploaded is jarsigned.

And I have not yet tryed flashing a rom this script generates :D
[Desire Android Development] HWeidlich:
Hi!

I'm confused whether this 'Apps2SD 2.7.5 Preview Fix 4a' will work on a Desire rooted through unrevoked. Was someone successful? I don't wanna brick my toy :-)

Thanks
[Desire Android Development] Nekromantik:
I will test it tonight when new nightly is out. I got a Linux VM so can do it in there.

Do you mean the nightly zip file or just the boot image from the nightly?
[Desire Android Development] BtbN:
The whole zip-file. It will output a new zipfile. Which you might need to sign with keytool/jarsign. Not sure if recovery accepts it if you don't sign it.
[Desire Android Development] tkirton:
Try this one: http://www.darktremor.info/files/a2sd/dtapps2sd-2.7.5-rc1-preview-signed.zip

This is the 2.7.5 RC1 I'm working on...it has a 5 second delay built in if it doesn't find /dev/block/mmcblk0p2.

If that doesn't work, can you send me a list of the /dev/block directory? I want to see what block devices the kernel discovered.
[Desire Android Development] Nekromantik:
ok thanks

10chars
[Desire Android Development] tkirton:
isn't vold used to mount the Fat32 partition on the SD card? I know in other roms that vold runs much later in the init.rc script...but the /dev/block/mmcblk0p2 device is present well before vold is ever called (at least in other phones).
[Desire Android Development] tkirton:
It doesn't run with any stock rom (for any phone). The launch commands in init.rc are missing in stock roms.
[Desire Android Development] tkirton:
It will if the necessary components to launch it are included in the init.rc.
[Desire Android Development] BtbN:
The key was to simply mknod the missing device nodes. Simple, does not cause delay, and works. I think this should be added instead of a 5 sec delay, which just introduces a race-condition, which is never good. A phone which fails to boot properly every 2nd try is not that good ;)

For those who'd like to get CM6 with this app2sd, try my patcher. atm it only works for HTC Desire and maybe N1(The bravo phones).

If you want to use it on other phones, edit the boot.img patch script to use your devices kernel base address.
[Desire Android Development] Nekromantik:
BtbN I used the script for the new nightly and it created a newimage.zip file but when I try and flash it says bad.

Dont think its the singing issue as I got signature verification off in clockwork mod.

if you could try and flash a zip created by the script and let us know if it works.
[Desire Android Development] tkirton:
How do you introduce a race condition? The "on property:cm.filesystem.ready=1" prevents such a race condition by pausing the init.rc before DalvikVM gets a hold of it.

Without that statement, the init.rc continues loading as apps2sd continue loading. This isn't a problem so long as everything is in its proper position...but the moment that anything is moved (/data/app, /data/app-private, and especially /data/dalvik-cache), DalvikVM basically has a "programming crisis" because something got moved while it was running. Either everything will fail to open until reboot or DalvikVM simply stops processing information, which puts you into a boot stall.

This is one of the reasons Cyanogen put that statement in the init.rc...to prevent such a race condition from occurring. Believe me, I learned that lesson the hard way in Darktremor Apps2SD 2.5.

But doing a mknod shouldn't need to happen. There's a fundamental issue in the way the kernel is booting if it can't create all of the block devices before it starts launching the init.rc. It's a workaround to the issue at hand and I'll put that in instead of the sleep delay, but that really doesn't solve the root issue that the block device isn't being created during the kernel load.

The only other thing I can think of is that the ext partition is actually on another block device instead of mmcblk0p2. There were some questions over in the Incredible forum about that (they actually have both an mmcblk0p2 and a mmcblk1p2...not sure which one is the correct device to mount to...the program has issues with the mmcblk0p2 device).
[Desire Android Development] tkirton:
Since the discussion is now to try to add the block device mmcblk0p2 before apps2sd start, I'm trying something new.

I've added code in boota2sd and launcha2sd that will do the mknod if it doesn't find the /dev/block/mmcblk0p2. Unfortunately, I can't test this code as my phone actually creates the /dev/block/mmcblk0p2 before the init.rc runs.

Here's the RC1 preview code: http://www.darktremor.info/files/a2sd/dtapps2sd-2.7.5-rc1-preview-signed.zip

If someone will test this out on a rom that has the apps2sd launch commands in the init.rc, but doesn't have the mknod commands, I would greatly appreciate it.
[Desire Android Development] Lawliet:
Thanks for the clarification. I've gone ahead and flashed a ROM :)
[Desire Android Development] BtbN:
Updated the patcher:

http://btbn.de/files/cmpatch.tar.gz

Patched the current nightly with it, and flashed it on my phone after a wipe. Had to soft-reset it, because it froze on HTC Screen after reboot. But after the reset it works great, a2sd startsup without problems(Your current preview, without my mknod patch).

This is ONLY for the CM6 bravo build and will most likely don't work on any other build.
[Desire Android Development] Nekromantik:
im getting pushd not found error and popd not found errors while running the script
[Desire Android Development] BtbN:
Strange, which shell are you using? Try editing the two scripts to use bash.
[Desire Android Development] Nekromantik:
just using terminal in ubuntu.

last one worked fine in terminal.

I changed the first line in the scripts to #!/bin/bash and now I get a

data/autogen-desire.sh: line 50: patch: command not found error
[Desire Android Development] BtbN:
Seems like there are som essential tools missing on your system. I don't know how to get them on Debian distros.

You'll need diff/patch and java. And maybe some other stuff. Just install what it complains about.
[Desire Android Development] Nekromantik:
were those tools required for the first script you made?

as that worked fine but just did not let me flash it on my phone.
[Desire Android Development] BtbN:
Yes, patch was needed(but i forgott adding a check to make it abort if patch failed). java was not needed.
[Desire Android Development] Nekromantik:
edit: got it working

flashing now cheers :)
[Desire Android Development] Pyr0x64:
for anyone else new to ubuntu, and wanting to try BtbN's patcher, apparently other distros link sh to bash, but ubuntu links sh with dash instead

you can run the following commands to change it if required

in terminal, type:

ls -l /bin/bash

to verify you have bash installed

ls -l /bin/sh

will check whether sh is linked to bash

my ubuntu said

/bin/sh -> /bin/dash

so it needed changing

you can remove the link with

sudo rm -f /bin/sh

then make a new link between sh and bash with

sudo ln -s /bin/bash /bin/sh

after that, there were no more pushd and popd errors
[Desire Android Development] Nekromantik:
thats useful to know

I just had to use apk get to download patch as it was missing like BtbN said.

then it worked.
[Desire Android Development] Pyr0x64:
after reading a little more (linux n00b here :p), i'm not sure if that's really a "correct" way of doing it, but it worked for me lol :o
[Desire Android Development] HWeidlich:
OK,

thanks for the clarification. Is there a way to modify init.rc without flashing a custom built ROM? I like my stock ROM :-), I'm just so low on memory.
[Desire Android Development] Nekromantik:
what stock ROM do you have?

CM6 is as stock as your going to get. No Sense.

Just vanilla Android 2.2 with ADW launcher. You can even get rid of ADW if you want stock launcher. If you mean stock Sense then you can get both Sense 2.1 and 2.2 with a2sd built in already.
[Desire Android Development] BtbN:
You need to get your boot.img, unpack it, modify init.rc, and repack it, and then flash it.
[Desire Android Development] HWeidlich:
Yes I mean stock sense. I'm currently trying LeeDroid, hope that comes close to HTC sense.
[Desire Android Development] Nekromantik:
AdamGs Sense ROM inc's a2sd
[Desire Android Development] narta:
Last CM6 nightly, patched with BtbN patch and flashed with RC1 a2sd zip. working fine here. First reboot stuck on white HTC screen, soft reset, up and running

I only have a class 2 micoSD so dalvik cache is on internal memory

65MB free space with 20 or so apps installed
[Desire Android Development] BesFen:
dtapps2sd-2.7.5-rc1

Hi Kirton,

I can confirm that your dtapps2sd-2.7.5-rc1 is working well, but need some additional in init.rc:

start a2sd
class_start default

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

I don't know how that ode make it work but it work well after I added that code

Thank you, I am Happy now.:D:D:D
[Desire Android Development] tkirton:
Unless you want more problems when you are moving dalvik-cache, I would recommend you put the lines indicated in bold in your init.rc.
[Desire Android Development] tkirton:
Good...glad the RC1 is working. I will speed up my code for log entries and get the RC1 officially released. I'll continue working on it tonight.
[Desire Android Development] tkirton:
Darktremor Apps2SD 2.7.5 RC1 now available.
[Desire Android Development] fakts13:
do we still have to patch the init.rc with rc1 on roms that don't have a2sd+ supported? also, is there any way to make system/app on sd instead of data/app?
[Desire Android Development] tkirton:
Yes...just like any rom that doesn't support apps2sd, you'll have to patch the init.rc (otherwise, nothing will launch it).

I don't recommend putting /system/app on the SD card. /system/app is your core services. If your card goes bad or fails to mount, your phone will go into either a boot loop or a boot stall. That will require restoring via backup or reflashing a rom.

But, if you want to put what you believe are non-critical files on the SD card, you simply copy the .apk from /system/app to /data/app (which will be symlinked to /system/sd/app).
[Desire Android Development] jeff_ding:
I used it on CM6 RC1, it works fine. Thanks.
[Desire Android Development] StuMcBill:
So if I understand this correctly, I can install CM6 RC1, and then flash DarkTremor RC1 and I will have Apps2SD enabled in CM6?

Or is there something else I need to do?
[Desire Android Development] jeff_ding:
Yes, there is nothing else need to do.
[Desire Android Development] Poodlemastah:
You need to modify init.rc in the boot.img.

Can someone comfirm the kernel base adress for the desire? Is it 0x20000000?
[Desire Android Development] dawmuz:
Thanks a bunch, works fantastic on my desire with CM6!
[Desire Android Development] GANJDROID:
Flashed on latest CM6 nightly, and it doesn't seem to have worked? Do we just flash and leave it or...?
[Desire Android Development] fakts13:
did you modify the init.rc using the patcher in this thread before flashing?
[Desire Android Development] twicejr:
I did not.

40 apps installed , 50mb free..

Seems like it's working since it was 90 before installing anything.

Except it doesn't do the dalvik-to-sd automatically?
[Desire Android Development] tkirton:
No, it doesn't move it automatically. That is for stability.

However, you can move the dalvik cache to the SD card by typing a2sd cachesd in an adb shell.

You can also move the dalvik cache to the cache partition by typing a2sd cachepart, but I've heard various results on this depending on the rom (sometimes it works great, other times people have gotten massive force close issues).
[Desire Android Development] StuMcBill:
Ok I have this running on my desire and apps2sd is running ok.

I have tried running that dalvik move script (as noted in the 2nd post), in connectbot terminal emulator, on the device and it gives a load of errors.

Do I need to run it in a command prompt on windows while in recovery mode?

Any chance of a quick walkthrough?

I am running CM6 RC1.
[Desire Android Development] dawmuz:
No need to be in recovery, just run cmd in android sdk on your pc

adb remount

adb shell

a2sd cachesd

You should also run

a2sd check

just to make sure all is working. If you get errors there, run

a2sd repair

Done.
[Desire Android Development] johndani:
How can I move an app from SD card back onto the internal memory? :)
[Desire Android Development] tkirton:
A single application can be put on your /system/app directory (adb remount first). You simply copy it from /data/app to /system/app.
[Desire Android Development] Buzzinhomer:
I loose internal storage. Although Apps2SD is working, my internal storage decreases soo much that I have at least 30 Apps installed and it still rumors...

What can I do?
[Desire Android Development] tkirton:
Run a2sd check to make sure it is working.
[Desire Android Development] tkirton:
Which dalvik-cache move command are you using? a2sd cachesd or a2sd cachepart

I'm starting to see issues with moving dalvik-cache to the /cache partition when using the HTC framework. Apparently, that framework doesn't like it (it doesn't seem to be a problem with AOSP framework).
[Desire Android Development] StuMcBill:
I tried running a2sd cachesd through a Terminal Emulator and it didn't work (although I never typed remount or shell commands), I have just ran the commands listed above given by dawmuz and it seems to work fine. Ran the check script and all seems well.

Thanks

Stu
[Desire Android Development] ephumuris:
Did you type su first in terminal emulator?

Is it possible to make dalvik to SD default on first boot? Instead of typing the command. Thanks.
[Desire Android Development] tkirton:
On first boot, the Apps2SD flash package is designed to put the dalvik-cache on internal storage for stability (attempt to reduce the number of boot loops).

However, if you symlink dalvik-cache to the sd card and create a .dalvikcache file in /data, it will boot the first time with dalvik-cache on SD.
[Desire Android Development] ephumuris:
Ok thanks for the reply. Will look up symlinking first lol I'm a learner.
[Desire Android Development] hsnmz:
Noob Here: a quesion which may not be related to this post, but would appreciate any help;

I have clockworkMod 2.5.0.1 and Rom Manager 2.0.1.6. I have partitioned the sd card through rom manager but don't know if its ext2 or ext3. I really like to have a ext3 or ext4 on my sd. there isn't any option of partitioning the sd in clockworkMod recovery. How can I partition my card? which recovery to use? I have a windows Pc and don't know about linux commands :(

see my signature for the ROM I am using, it supports ext4
[Desire Android Development] ephumuris:
Search amon ra recovery. Ahmgsk made a fake flash port of it. Can upgrade your ext to 3 or 4. Will not wipe your data :-)
[Desire Android Development] ephumuris:
Is it possible for me to edit it to auto do dalvik to sd at all? What file would i need to change there seems to be a lot of a2sd files there...

EDIT: Looks like the starta2sd file?
[Desire Android Development] tkirton:
Just create a file called .dalvikcache (don't forget the dot in the front) in /data and reboot. The code will automatically move the dalvik-cache to the SD card upon reboot.
[Desire Android Development] tkirton:
Bump...new version of Darktremor Apps2SD (2.7.5 RC2)
[Desire Android Development] hsnmz:
Thanks :)

can I use this

http://xdaforums.com/showthread.php?t=721792
[Desire Android Development] olipheus:
Problems

I tried the latest version on LeeDroid 1.8 and it worked well until I used the dalvik scripts. First the script got an error when trying to reboot in gscript and then when I rebooted manually it boot looped. Had to reflash the ROM to make it start again!

I know LeeDroid is suppose to have A2SD+ but for some reason I get "Memory full" warnings when trying to install some apps, even tho the a2sd check script says it's working with dalvik. Thats why I wanted to try yours ;)

Hope you figure it out, unless it's a problem on my end!

/Oli
[Desire Android Development] tkirton:
1. I would try to update to RC2.

2. Once you do that and reboot, pull the /data/dta2sd.log to your computer.

3. Next, run a2sd sysinfo. Pull the dtsysdump.txt to your computer.

4. Send both to rtkirton@gmail.com and I'll take a look at what's going on.
[Desire Android Development] lilnev:
Been searching everywhere for SDcard clarification..

What micro sdcard should I buy? / are you using?

- Is 32GB Class 2 suitable for darktremor app2sd including dalvik-cache on sdcard?

- Is 16GB Class 2 suitable for darktremor app2sd including dalvik-cache on sdcard?

If not please make some suggestions so I can make up my mind on what to buy.

Thanks!
[Desire Android Development] Dave_G7:
lower the class, slower the card, (or better the garanteed speed)

From wiki:

http://de.wikipedia.org/wiki/SD_Memory_Card#Geschwindigkeitsklassen

so all suggest to have class 6! 16 or 32 GB i think its up to u... I'm using 16GB

(using a class 2 for dalvik2SD will bring u some performance issue...)

greetz Dave_G7
[Desire Android Development] lilnev:
Thanks, I just ordered a 16GB Class 6 Transcent. The 32GB I couldn't find in Class 6, only Class 2.

16GB will be OK for now.
[Desire Android Development] tkirton:
I'm also waiting for the 32GB Class 6 to come out. But that's going to be one expensive investment. :)
[Desire Android Development] gapone:
Im using the latest cm6 nightly build (0812). Do i really need to do something else than install the original dt rc2 zip bcos a2sd is working fine after i did it? A2sd check is saying that everything is fine even init.rc is patched. Why would i need to use this special init.rc patcher if original is doing the same thing?
[Desire Android Development] baklawa:
Hi,

I use CM 6RC1+720p patch. I flashed DT A2SD RC2 this morning without any patch and it works like a charm.
[Desire Android Development] andycted:
Cyanogen mod nighties

I've used successfully the modified RC1 (dtapps RC1-CM6 update.zip) for Cyanogenmod nightly, however after trying to update to the next nightly build without wipe, it ended up stuck at HTC white screen. Then applied the script again and the system booted, but ended in bootloop. tried to reapply it removing some 'delete' stuff from the script (just for the hell of it) and it actually booted correctly. But then the bootloop came the next time I used the recovery.

I know we are talking about nightly builds, I know you actually can't always update between builds without wiping, I know, I know !

Just asking if you have some ideas to work around this, before I wipe and end up reinstalling everything.
[Desire Android Development] tkirton:
Do you know which of the "delete" stuff in the script you removed? One of the issues I am fighting with is the non-standardization of startup scripts. Everyone names their scripts differently. I'm trying to be more standardized to CyanogenMod since that is where everyone is heading to, but I don't always get the right ones or new ones are added and I don't catch them.