[XPERIA X10 Android Development] bestialbub:
install script thread jack

i'm gonna take a moment to threadjack my rom thread, so i don't get the subject moderated out of developement, and because the subject held up the rom release for a week.

the present state of se21 modrom install scripts is the pits. here's mine so you can see and discuss anything i did correctly FOR THIS ROM (on topic);

update-script

#
# Generated by dsixda's HTC Android Kitchen
# xda-developers.com
# modified by bestialbub for x10 se21 roms
#
show_progress 0.1 0
format SYSTEM:
delete SYSTEM:xbin/busybox
delete_recursive SYSTEM:xbin
format DATA:
delete DATA:local
run_program PACKAGE:check_data_app
copy_dir PACKAGE:data DATA:
set_perm 2000 2000 0771 DATA:local
set_perm_recursive 1000 1000 0771 0644 DATA:app
format CACHE:
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:
set_perm_recursive 0 2000 0755 0755 SYSTEM:bin
set_perm_recursive 1002 1002 0755 0440 SYSTEM:etc/bluez
set_perm 0 3003 2755 SYSTEM:bin/netcfg
set_perm 0 3004 2755 SYSTEM:bin/ping
set_perm 0 0 0755 SYSTEM:etc/bluez
set_perm 1002 1002 0440 SYSTEM:etc/dbus.conf
set_perm 1014 2000 0550 SYSTEM:etc/dhcpcd/dhcpcd-run-hooks
set_perm 0 2000 0550 SYSTEM:etc/init.goldfish.sh
set_perm 0 0 06755 SYSTEM:bin/su
set_perm_recursive 0 0 0755 0555 SYSTEM:etc/ppp
set_perm_recursive 0 2000 0755 0755 SYSTEM:xbin
set_perm 0 0 4755 SYSTEM:bin/busybox
set_perm 0 0 4755 SYSTEM:bin/charger
set_perm 0 0 4755 SYSTEM:bin/chargemon
set_perm 0 0 4755 SYSTEM:recovery/sh
set_perm 0 0 0444 SYSTEM:recovery/recovery.tar.bz2
symlink dumpstate SYSTEM:bin/dumpcrash
symlink es209ra_keypad.kcm.bin SYSTEM:usr/keychars/qwerty.kcm.bin
symlink toolbox SYSTEM:bin/cat
symlink toolbox SYSTEM:bin/chmod
symlink toolbox SYSTEM:bin/chown
symlink toolbox SYSTEM:bin/cmp
symlink toolbox SYSTEM:bin/date
symlink toolbox SYSTEM:bin/dd
symlink toolbox SYSTEM:bin/df
symlink toolbox SYSTEM:bin/dmesg
symlink toolbox SYSTEM:bin/getevent
symlink toolbox SYSTEM:bin/getprop
symlink toolbox SYSTEM:bin/hd
symlink toolbox SYSTEM:bin/id
symlink toolbox SYSTEM:bin/ifconfig
symlink toolbox SYSTEM:bin/iftop
symlink toolbox SYSTEM:bin/insmod
symlink toolbox SYSTEM:bin/ioctl
symlink toolbox SYSTEM:bin/kill
symlink toolbox SYSTEM:bin/ln
symlink toolbox SYSTEM:bin/log
symlink toolbox SYSTEM:bin/ls
symlink toolbox SYSTEM:bin/lsmod
symlink toolbox SYSTEM:bin/mkdir
symlink toolbox SYSTEM:bin/mount
symlink toolbox SYSTEM:bin/mv
symlink toolbox SYSTEM:bin/netstat
symlink toolbox SYSTEM:bin/newfs_msdos
symlink toolbox SYSTEM:bin/notify
symlink toolbox SYSTEM:bin/printenv
symlink toolbox SYSTEM:bin/ps
symlink toolbox SYSTEM:bin/reboot
symlink toolbox SYSTEM:bin/renice
symlink toolbox SYSTEM:bin/rm
symlink toolbox SYSTEM:bin/rmdir
symlink toolbox SYSTEM:bin/rmmod
symlink toolbox SYSTEM:bin/route
symlink toolbox SYSTEM:bin/schedtop
symlink toolbox SYSTEM:bin/sendevent
symlink toolbox SYSTEM:bin/setconsole
symlink toolbox SYSTEM:bin/setprop
symlink toolbox SYSTEM:bin/sleep
symlink toolbox SYSTEM:bin/smd
symlink toolbox SYSTEM:bin/start
symlink toolbox SYSTEM:bin/stop
symlink toolbox SYSTEM:bin/sync
symlink toolbox SYSTEM:bin/top
symlink toolbox SYSTEM:bin/umount
symlink toolbox SYSTEM:bin/vmstat
symlink toolbox SYSTEM:bin/watchprops
symlink toolbox SYSTEM:bin/wipe
run_program PACKAGE:fix_permissions
show_progress 0.1 10
show_progress 0.2 0
show_progress 0.2 10
run_program PACKAGE:installbusybox

it would seem every example i looked at neglected to correctly remove dead links, make appropriate symlinks or get all the appropriate file permissions.

prior to this project, i knew little of linux file permissions, but i systematically went thru ALMOST every folder in adb shell and "ls -l" for all file group/user id's, and performed "stat -c %a,%U,%G,%t,%n *" to obtain all the octal permissions. some folks missed alot.

i think you can pick out the 49 toolbox symlinks, the 1 symlink for dumpstate/dumpcrash and the symlink for es209ra_keypad.kcm.bin /qwerty.kcm.bin.

i might also note that when /system/bin/su is installed by flashtool its given a octal permission of 4755 that seems to work during live install, but i learned from zdzihu's script that 6755 is required for prerooting.

alot of folks copied that same script and had missed some importing /system/bin permissions/groups such as ping and netcfg that rendered some wireless/data apps unusable (speedtest being an example).

also, folks need to look closer at the /etc/customization folders, or just remove the files entirely as these may likely explain why you have sms/mms messaging problems, as some of these roms has customized settings regulating how communication is done, if its allowed at all. ;)

oh, and

installbusybox

#!/system/bin/sh
cd /system/bin
./busybox --install -s /system/bin

..I didn't use a kitchen for this rom. Just borrowed the same script everyone else used from one.