Quote:
Originally Posted by makkonen
I've got commit access to the rootfs, so I can push it upstream... but I'd like to get the rest of the issues sorted before I do. (Perhaps I'm a little too proud of my generally clean commits. )
if you connect with adb during the bootanimation, chown to 1002 (or 1002:1002) works... I don't know at which point that change is made, and if it's sometime while the init script is running (in which case we can just change the order). Moving the bit about dbus.conf down to the bottom of the file might've worked for me last night -- or I might've just missed the error message and forgot to delete the cache folder, so I just thought it worked. I was a bit tired.
|
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.
Anyway, here is the updated rootfs.img. Check it out and see if all your errors go away. I tested with latest kernel/modules (6/6/2010), latest initrd (6/11/2010), almost latest rootfs (6/11/2010), and almost latest AOSP (5/31/2010). Prior to testing, I deleted data.img and /sdcard/cache. No errors on the console and it boots straight into Android initial config.