[Touch Pro, Fuze Android Development] sfhub:
I figured out the root cause of the problems and got rid of all the errors. All the other "fixes" are for red herrings.

The real cause of the problem is "/system/bin" is placed in front of "/bin" in the PATH. The versions of many commands in /system/bin appear to be restricted versions which don't accept common options. This problem was exacerbated when people started making changes to the init script *without* using the full path of commands, ie "chown" instead of "/bin/chown". Early on in the init script, it seems folks used the full path, but that practice died off later on. I considered changing every command to be full path, but there were too many lines which would be changed. I figured that should be left for the script maintainer should they so choose.

Instead, the change I made was to adjust the PATH early on in the script to place "/bin" in front of "/system/bin" and then at the end of the script, adjust it back to what it was before, in case init.android or something later on actually required the PATH to be in that order but didn't explicitly set it that way.

I also proved the chmod/chown of /etc/dbus.conf was a red herring by removing those commands completely from the init script. I had previously verified that the permissions and ownership in system.sqfs were *already* 440 and 1002:1002 respectively, and would be preserved by the "cp -a", so how could the "fix" of making a change, that was already there, work. This led me to investigate the actual cause of the problem.

Here is the context diff of the change I made. It got rid of all the console errors and also booted to Android initial setup without looping at the X animation.

*** init-orig	Sat Jun 12 08:41:42 2010
--- init-fix	Sat Jun 12 09:30:39 2010
***************
*** 7,13 ****

/bin/mount -o remount,rw / /

! PATH=/sbin:/system/sbin:/system/bin:/bin:/system/xbin:/system/xbin/bb:/data/local/bin

/bin/echo "Rootfs loaded."

--- 7,20 ----

/bin/mount -o remount,rw / /

! # Looping X animation fix
! # change PATH to put /bin in front of /system/bin to fix looping X animation
! # bug. /system/bin versions of some commands were being run which appear to
! # accept restricted options causing commands to fail and therefore not setup
! # the system properly. User would see errors on the console like
! # "no such user '-R'" or "no such user '1000:1000'"
! #
! PATH=/sbin:/bin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin

/bin/echo "Rootfs loaded."

***************
*** 156,167 ****
cp -a /system/etc/* /etc
cp -ar /init.etc/* /etc/

- #Possible fix for looping animation. stinebd/gm112
- #First push by babijoee :)
- chown 1002:1002 /etc/dbus.conf
- chmod 440 /etc/dbus.conf
-
-
LCDDENSITY=`/bin/grep -o "lcd.density=.*" /proc/cmdline | /bin/sed -e "s/.*lcd.density=//g" -e "s/ .*//g"`

if [ "$LCDDENSITY" != "" ] ; then
--- 163,168 ----
***************
*** 513,516 ****
--- 514,524 ----
mknod /dev/msm_camera/frame0 c 250 2
chmod a+s /bin/pppd

+ # Looping X animation fix
+ # Change PATH back to original in case the change is required for init.android
+ # whether for security purposes or just for it to run properly. See earlier
+ # change above.
+ #
+ PATH=/sbin:/system/sbin:/system/bin:/bin:/system/xbin:/system/xbin/bb:/data/local/bin
+
exec /init.android