[Hero, G2 Touch Android Development] Eddie1506:
You need something along these lines

Edit to match your environment (xbin/su -> bin/su etc...)

assert compatible_with("0.2") == "true"
assert getprop("ro.product.device") == "hero" || getprop("ro.build.product") == "hero"

show_progress 0.1 0

format CACHE:

copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app

format SYSTEM:
copy_dir PACKAGE:system SYSTEM:

symlink busybox SYSTEM:xbin/[
symlink busybox SYSTEM:xbin/[[
symlink busybox SYSTEM:xbin/acpid
symlink busybox SYSTEM:xbin/addgroup
symlink busybox SYSTEM:xbin/adduser
symlink busybox SYSTEM:xbin/adjtimex
symlink busybox SYSTEM:xbin/ar
symlink busybox SYSTEM:xbin/arp
symlink busybox SYSTEM:xbin/arping
symlink busybox SYSTEM:xbin/ash
symlink busybox SYSTEM:xbin/awk
symlink busybox SYSTEM:xbin/basename
symlink busybox SYSTEM:xbin/beep
symlink busybox SYSTEM:xbin/blkid
symlink busybox SYSTEM:xbin/brctl
symlink busybox SYSTEM:xbin/bunzip2
symlink busybox SYSTEM:xbin/bzcat
symlink busybox SYSTEM:xbin/bzip2
symlink busybox SYSTEM:xbin/cal
symlink busybox SYSTEM:xbin/cat
symlink busybox SYSTEM:xbin/catv
symlink busybox SYSTEM:xbin/chat
symlink busybox SYSTEM:xbin/chattr
symlink busybox SYSTEM:xbin/chgrp
symlink busybox SYSTEM:xbin/chmod
symlink busybox SYSTEM:xbin/chown
symlink busybox SYSTEM:xbin/chpasswd
symlink busybox SYSTEM:xbin/chpst
symlink busybox SYSTEM:xbin/chroot
symlink busybox SYSTEM:xbin/chrt
symlink busybox SYSTEM:xbin/chvt
symlink busybox SYSTEM:xbin/cksum
symlink busybox SYSTEM:xbin/clear
symlink busybox SYSTEM:xbin/cmp
symlink busybox SYSTEM:xbin/comm
symlink busybox SYSTEM:xbin/cp
symlink busybox SYSTEM:xbin/cpio
symlink busybox SYSTEM:xbin/crond
symlink busybox SYSTEM:xbin/crontab
symlink busybox SYSTEM:xbin/cryptpw
symlink busybox SYSTEM:xbin/cttyhack
symlink busybox SYSTEM:xbin/cut
symlink busybox SYSTEM:xbin/date
symlink busybox SYSTEM:xbin/dc
symlink busybox SYSTEM:xbin/dd
symlink busybox SYSTEM:xbin/deallocvt
symlink busybox SYSTEM:xbin/delgroup
symlink busybox SYSTEM:xbin/deluser
symlink busybox SYSTEM:xbin/depmod
symlink busybox SYSTEM:xbin/devmem
symlink busybox SYSTEM:xbin/df
symlink busybox SYSTEM:xbin/dhcprelay
symlink busybox SYSTEM:xbin/diff
symlink busybox SYSTEM:xbin/dirname
symlink busybox SYSTEM:xbin/dmesg
symlink busybox SYSTEM:xbin/dnsd
symlink busybox SYSTEM:xbin/dnsdomainname
symlink busybox SYSTEM:xbin/dos2unix
symlink busybox SYSTEM:xbin/du
symlink busybox SYSTEM:xbin/dumpkmap
symlink busybox SYSTEM:xbin/dumpleases
symlink busybox SYSTEM:xbin/echo
symlink busybox SYSTEM:xbin/ed
symlink busybox SYSTEM:xbin/egrep
symlink busybox SYSTEM:xbin/eject
symlink busybox SYSTEM:xbin/env
symlink busybox SYSTEM:xbin/envdir
symlink busybox SYSTEM:xbin/envuidgid
symlink busybox SYSTEM:xbin/ether-wake
symlink busybox SYSTEM:xbin/expand
symlink busybox SYSTEM:xbin/expr
symlink busybox SYSTEM:xbin/fakeidentd
symlink busybox SYSTEM:xbin/false
symlink busybox SYSTEM:xbin/fbset
symlink busybox SYSTEM:xbin/fbsplash
symlink busybox SYSTEM:xbin/fdflush
symlink busybox SYSTEM:xbin/fdformat
symlink busybox SYSTEM:xbin/fdisk
symlink busybox SYSTEM:xbin/fgrep
symlink busybox SYSTEM:xbin/find
symlink busybox SYSTEM:xbin/findfs
symlink busybox SYSTEM:xbin/flash_eraseall
symlink busybox SYSTEM:xbin/flash_lock
symlink busybox SYSTEM:xbin/flash_unlock
symlink busybox SYSTEM:xbin/flashcp
symlink busybox SYSTEM:xbin/fold
symlink busybox SYSTEM:xbin/free
symlink busybox SYSTEM:xbin/freeramdisk
symlink busybox SYSTEM:xbin/fsck
symlink busybox SYSTEM:xbin/fsck.minix
symlink busybox SYSTEM:xbin/fsync
symlink busybox SYSTEM:xbin/ftpd
symlink busybox SYSTEM:xbin/ftpget
symlink busybox SYSTEM:xbin/ftpput
symlink busybox SYSTEM:xbin/fuser
symlink busybox SYSTEM:xbin/getopt
symlink busybox SYSTEM:xbin/getty
symlink busybox SYSTEM:xbin/grep
symlink busybox SYSTEM:xbin/gunzip
symlink busybox SYSTEM:xbin/gzip
symlink busybox SYSTEM:xbin/halt
symlink busybox SYSTEM:xbin/hd
symlink busybox SYSTEM:xbin/hdparm
symlink busybox SYSTEM:xbin/head
symlink busybox SYSTEM:xbin/hexdump
symlink busybox SYSTEM:xbin/hostid
symlink busybox SYSTEM:xbin/hostname
symlink busybox SYSTEM:xbin/httpd
symlink busybox SYSTEM:xbin/hush
symlink busybox SYSTEM:xbin/hwclock
symlink busybox SYSTEM:xbin/id
symlink busybox SYSTEM:xbin/ifconfig
symlink busybox SYSTEM:xbin/ifdown
symlink busybox SYSTEM:xbin/ifenslave
symlink busybox SYSTEM:xbin/ifplugd
symlink busybox SYSTEM:xbin/ifup
symlink busybox SYSTEM:xbin/inetd
symlink busybox SYSTEM:xbin/init
symlink busybox SYSTEM:xbin/inotifyd
symlink busybox SYSTEM:xbin/insmod
symlink busybox SYSTEM:xbin/install
symlink busybox SYSTEM:xbin/ionice
symlink busybox SYSTEM:xbin/ip
symlink busybox SYSTEM:xbin/ipaddr
symlink busybox SYSTEM:xbin/ipcalc
symlink busybox SYSTEM:xbin/ipcrm
symlink busybox SYSTEM:xbin/ipcs
symlink busybox SYSTEM:xbin/iplink
symlink busybox SYSTEM:xbin/iproute
symlink busybox SYSTEM:xbin/iprule
symlink busybox SYSTEM:xbin/iptunnel
symlink busybox SYSTEM:xbin/kbd_mode
symlink busybox SYSTEM:xbin/kill
symlink busybox SYSTEM:xbin/killall
symlink busybox SYSTEM:xbin/killall5
symlink busybox SYSTEM:xbin/klogd
symlink busybox SYSTEM:xbin/last
symlink busybox SYSTEM:xbin/length
symlink busybox SYSTEM:xbin/less
symlink busybox SYSTEM:xbin/linux32
symlink busybox SYSTEM:xbin/linux64
symlink busybox SYSTEM:xbin/linuxrc
symlink busybox SYSTEM:xbin/ln
symlink busybox SYSTEM:xbin/loadfont
symlink busybox SYSTEM:xbin/loadkmap
symlink busybox SYSTEM:xbin/logger
symlink busybox SYSTEM:xbin/login
symlink busybox SYSTEM:xbin/logname
symlink busybox SYSTEM:xbin/logread
symlink busybox SYSTEM:xbin/losetup
symlink busybox SYSTEM:xbin/lpd
symlink busybox SYSTEM:xbin/lpq
symlink busybox SYSTEM:xbin/lpr
symlink busybox SYSTEM:xbin/ls
symlink busybox SYSTEM:xbin/lsattr
symlink busybox SYSTEM:xbin/lsmod
symlink busybox SYSTEM:xbin/lspci
symlink busybox SYSTEM:xbin/lsusb
symlink busybox SYSTEM:xbin/lzmacat
symlink busybox SYSTEM:xbin/lzop
symlink busybox SYSTEM:xbin/lzopcat
symlink busybox SYSTEM:xbin/makedevs
symlink busybox SYSTEM:xbin/makemime
symlink busybox SYSTEM:xbin/man
symlink busybox SYSTEM:xbin/md5sum
symlink busybox SYSTEM:xbin/mdev
symlink busybox SYSTEM:xbin/mesg
symlink busybox SYSTEM:xbin/microcom
symlink busybox SYSTEM:xbin/mkdir
symlink busybox SYSTEM:xbin/mkdosfs
symlink busybox SYSTEM:xbin/mke2fs
symlink busybox SYSTEM:xbin/mkfifo
symlink busybox SYSTEM:xbin/mkfs.ext2
symlink busybox SYSTEM:xbin/mkfs.minix
symlink busybox SYSTEM:xbin/mkfs.vfat
symlink busybox SYSTEM:xbin/mknod
symlink busybox SYSTEM:xbin/mkpasswd
symlink busybox SYSTEM:xbin/mkswap
symlink busybox SYSTEM:xbin/mktemp
symlink busybox SYSTEM:xbin/modprobe
symlink busybox SYSTEM:xbin/more
symlink busybox SYSTEM:xbin/mount
symlink busybox SYSTEM:xbin/mountpoint
symlink busybox SYSTEM:xbin/msh
symlink busybox SYSTEM:xbin/mt
symlink busybox SYSTEM:xbin/mv
symlink busybox SYSTEM:xbin/nameif
symlink busybox SYSTEM:xbin/nc
symlink busybox SYSTEM:xbin/netstat
symlink busybox SYSTEM:xbin/nice
symlink busybox SYSTEM:xbin/nmeter
symlink busybox SYSTEM:xbin/nohup
symlink busybox SYSTEM:xbin/nslookup
symlink busybox SYSTEM:xbin/ntpd
symlink busybox SYSTEM:xbin/od
symlink busybox SYSTEM:xbin/openvt
symlink busybox SYSTEM:xbin/passwd
symlink busybox SYSTEM:xbin/patch
symlink busybox SYSTEM:xbin/pgrep
symlink busybox SYSTEM:xbin/pidof
symlink busybox SYSTEM:xbin/ping
symlink busybox SYSTEM:xbin/ping6
symlink busybox SYSTEM:xbin/pipe_progress
symlink busybox SYSTEM:xbin/pivot_root
symlink busybox SYSTEM:xbin/pkill
symlink busybox SYSTEM:xbin/popmaildir
symlink busybox SYSTEM:xbin/poweroff
symlink busybox SYSTEM:xbin/printenv
symlink busybox SYSTEM:xbin/printf
symlink busybox SYSTEM:xbin/ps
symlink busybox SYSTEM:xbin/pscan
symlink busybox SYSTEM:xbin/pwd
symlink busybox SYSTEM:xbin/raidautorun
symlink busybox SYSTEM:xbin/rdate
symlink busybox SYSTEM:xbin/rdev
symlink busybox SYSTEM:xbin/readahead
symlink busybox SYSTEM:xbin/readlink
symlink busybox SYSTEM:xbin/readprofile
symlink busybox SYSTEM:xbin/realpath
symlink busybox SYSTEM:xbin/reboot
symlink busybox SYSTEM:xbin/reformime
symlink busybox SYSTEM:xbin/renice
symlink busybox SYSTEM:xbin/reset
symlink busybox SYSTEM:xbin/resize
symlink busybox SYSTEM:xbin/rm
symlink busybox SYSTEM:xbin/rmdir
symlink busybox SYSTEM:xbin/rmmod
symlink busybox SYSTEM:xbin/route
symlink busybox SYSTEM:xbin/rpm
symlink busybox SYSTEM:xbin/rpm2cpio
symlink busybox SYSTEM:xbin/rtcwake
symlink busybox SYSTEM:xbin/run-parts
symlink busybox SYSTEM:xbin/runlevel
symlink busybox SYSTEM:xbin/runsv
symlink busybox SYSTEM:xbin/runsvdir
symlink busybox SYSTEM:xbin/rx
symlink busybox SYSTEM:xbin/script
symlink busybox SYSTEM:xbin/scriptreplay
symlink busybox SYSTEM:xbin/sed
symlink busybox SYSTEM:xbin/sendmail
symlink busybox SYSTEM:xbin/seq
symlink busybox SYSTEM:xbin/setarch
symlink busybox SYSTEM:xbin/setconsole
symlink busybox SYSTEM:xbin/setfont
symlink busybox SYSTEM:xbin/setkeycodes
symlink busybox SYSTEM:xbin/setlogcons
symlink busybox SYSTEM:xbin/setsid
symlink busybox SYSTEM:xbin/setuidgid
symlink busybox SYSTEM:xbin/sh
symlink busybox SYSTEM:xbin/sha1sum
symlink busybox SYSTEM:xbin/sha256sum
symlink busybox SYSTEM:xbin/sha512sum
symlink busybox SYSTEM:xbin/showkey
symlink busybox SYSTEM:xbin/slattach
symlink busybox SYSTEM:xbin/sleep
symlink busybox SYSTEM:xbin/softlimit
symlink busybox SYSTEM:xbin/sort
symlink busybox SYSTEM:xbin/split
symlink busybox SYSTEM:xbin/start-stop-daemon
symlink busybox SYSTEM:xbin/stat
symlink busybox SYSTEM:xbin/strings
symlink busybox SYSTEM:xbin/stty
symlink busybox SYSTEM:xbin/sulogin
symlink busybox SYSTEM:xbin/sum
symlink busybox SYSTEM:xbin/sv
symlink busybox SYSTEM:xbin/svlogd
symlink busybox SYSTEM:xbin/swapoff
symlink busybox SYSTEM:xbin/swapon
symlink busybox SYSTEM:xbin/switch_root
symlink busybox SYSTEM:xbin/sync
symlink busybox SYSTEM:xbin/sysctl
symlink busybox SYSTEM:xbin/syslogd
symlink busybox SYSTEM:xbin/tac
symlink busybox SYSTEM:xbin/tail
symlink busybox SYSTEM:xbin/tar
symlink busybox SYSTEM:xbin/taskset
symlink busybox SYSTEM:xbin/tcpsvd
symlink busybox SYSTEM:xbin/tee
symlink busybox SYSTEM:xbin/telnet
symlink busybox SYSTEM:xbin/telnetd
symlink busybox SYSTEM:xbin/test
symlink busybox SYSTEM:xbin/tftp
symlink busybox SYSTEM:xbin/tftpd
symlink busybox SYSTEM:xbin/time
symlink busybox SYSTEM:xbin/timeout
symlink busybox SYSTEM:xbin/top
symlink busybox SYSTEM:xbin/touch
symlink busybox SYSTEM:xbin/tr
symlink busybox SYSTEM:xbin/traceroute
symlink busybox SYSTEM:xbin/traceroute6
symlink busybox SYSTEM:xbin/true
symlink busybox SYSTEM:xbin/tty
symlink busybox SYSTEM:xbin/ttysize
symlink busybox SYSTEM:xbin/tunctl
symlink busybox SYSTEM:xbin/tune2fs
symlink busybox SYSTEM:xbin/udhcpc
symlink busybox SYSTEM:xbin/udhcpd
symlink busybox SYSTEM:xbin/udpsvd
symlink busybox SYSTEM:xbin/umount
symlink busybox SYSTEM:xbin/uname
symlink busybox SYSTEM:xbin/uncompress
symlink busybox SYSTEM:xbin/unexpand
symlink busybox SYSTEM:xbin/uniq
symlink busybox SYSTEM:xbin/unix2dos
symlink busybox SYSTEM:xbin/unlzma
symlink busybox SYSTEM:xbin/unlzop
symlink busybox SYSTEM:xbin/unzip
symlink busybox SYSTEM:xbin/uptime
symlink busybox SYSTEM:xbin/usleep
symlink busybox SYSTEM:xbin/uudecode
symlink busybox SYSTEM:xbin/uuencode
symlink busybox SYSTEM:xbin/vconfig
symlink busybox SYSTEM:xbin/vi
symlink busybox SYSTEM:xbin/vlock
symlink busybox SYSTEM:xbin/volname
symlink busybox SYSTEM:xbin/wall
symlink busybox SYSTEM:xbin/watch
symlink busybox SYSTEM:xbin/watchdog
symlink busybox SYSTEM:xbin/wc
symlink busybox SYSTEM:xbin/wget
symlink busybox SYSTEM:xbin/which
symlink busybox SYSTEM:xbin/who
symlink busybox SYSTEM:xbin/whoami
symlink busybox SYSTEM:xbin/xargs
symlink busybox SYSTEM:xbin/yes
symlink busybox SYSTEM:xbin/zcat
symlink busybox SYSTEM:xbin/zcip

symlink toolbox SYSTEM:bin/getevent
symlink toolbox SYSTEM:bin/getprop
symlink toolbox SYSTEM:bin/iftop
symlink toolbox SYSTEM:bin/ioctl
symlink toolbox SYSTEM:bin/log
symlink toolbox SYSTEM:bin/newfs_msdos
symlink toolbox SYSTEM:bin/notify
symlink toolbox SYSTEM:bin/printenv
symlink toolbox SYSTEM:bin/schedtop
symlink toolbox SYSTEM:bin/sendevent
symlink toolbox SYSTEM:bin/setprop
symlink toolbox SYSTEM:bin/smd
symlink toolbox SYSTEM:bin/start
symlink toolbox SYSTEM:bin/stop
symlink toolbox SYSTEM:bin/vmstat
symlink toolbox SYSTEM:bin/watchprops
symlink toolbox SYSTEM:bin/wipe
symlink dumpstate SYSTEM:bin/dumpcrash

set_perm_recursive 0 0 0755 0644 SYSTEM:
set_perm_recursive 0 2000 0755 0755 SYSTEM:bin
set_perm 0 3003 06755 SYSTEM:bin/ip
set_perm 0 3003 02755 SYSTEM:bin/netcfg
set_perm 0 3004 02755 SYSTEM:bin/ping
set_perm 0 2000 04755 SYSTEM:bin/pppd
set_perm 0 2000 06755 SYSTEM:bin/reboot
set_perm 0 1000 06755 SYSTEM:bin/wifitools
set_perm 1001 1005 0444 SYSTEM:etc/AudioPara4.csv
set_perm_recursive 1002 1002 0755 0440 SYSTEM:etc/bluez
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_recursive 0 0 0755 0555 SYSTEM:etc/ppp
set_perm_recursive 0 2000 0755 0755 SYSTEM:xbin

set_perm 0 0 04755 SYSTEM:etc/ppp/ip-up-vpn

symlink ../xbin/su SYSTEM:bin/su
set_perm 0 0 06755 SYSTEM:xbin/su

show_progress 0.1 10

show_progress 0.2 0

format BOOT:
write_raw_image PACKAGE:boot.img BOOT:

show_progress 0.2 10