[HD2 Android SD Development] copenhagen:
backup2sdext explanation

(non partitioned sd users move along.. this post is not for you)

your device boots up. (lets call this the RESTORE proceedure)

-if @ boot time, data "X" exists @ /sd-ext/location but

data "X" does NOT exists @ /data/location

it is copied there.

-if data "X" exists @ /sd-ext/location and ALREADY

data "X" exists @ /data/location then it is skipped. No change.

-Once the "restore proceedure" is done,

-if fix_permissions.sh exists @ /sdcard/android/ then run fix perms.

-once fix perms is done, device reboots.

-times will all very depending on how much "data" you have on your device.

this could take anywhere from 5 minutes to 20 minutes etc... use logcat to see where it is at for progress if you want to know more.

your device shuts down. (lets call this the backup2sdext or mirroring your data process)

(if you dont' agree that it's working. do a fresh install (new data.img / clean formatted ext partition). install one or two apps. try to shut down or reboot. once you have seen it working with your own eyes, restore your data.img and boot up. Then shutdown (to mirror to ext). Then bootup again.... and check /sd-ext/ folder ... .all your stuff will be in there.

almost 100% certain that if you are still having problems that its something on your end.. (I have 206 apps installed on my device and EVERYSINGLE ONE... all my /data/data/ etc etc etc IS ALL mirrored on the sdext. anyways moving on:

-You launch shutdown/reboot from android UI.

-the native shutdown thread half way through launches

->/system/bin/shutdown (which calls busybox run-parts /etc/shutdown.d

which runs two scripts 01cleanup and 02shutdown)

01cleanup just cleansup some stuff

02shutdown performs an rsync with the following command

rysnc -amE --delete --ignore-errors --delete-excluded /data/!stuff! /sdext/!stuff!

which in english says.

-sync the files from /data/HERE to /sd-ext/HERE.

-delete any files in /sd-ext/HERE that are NOT found /data/HERE

-if you run into an error, move on, dont get hung up and stall (thats right.... i accounted for if there was to be a stall - so I KNOW its not stalling here)(used for maintaining the backedup data @ /data/here)

-and if you have a non empty folder that exists @ /sd-ext/HERE that does not exist /data/HERE delete that too. (used for maintaining the backedup data @ /data/here)

again depending on if you have 1 or 201 apps your times will vary

after the rsync process is completed, busybox run-parts exit out and the original shutdown thread continues.

the fact that it runs PERFECTLY over here, on a new install, and again on subsequents reboots etc... with no freezing and shutdown and reboot working correctly only shows me that there is something wrong on YOUR end.. something NON build related.. .and specific (at least at this point) to you.

next.. im going to get you a sample of what the bk2sdext feature looks like in logcat AS its running.. cause those logs you posted... NONE of them are related to this at all... I can't see a single line in there showing bk2sdext working.

standby....

some agreeing statements from those of you who KNOW linux and can verify what I'm saying would be (at this point) very helpful.. if they wont listen to me, maybe they'll listen to you.