[G1 Android Development] Firerat:
yeap,

it will replace the update-script

which will change where files get placed, also installing support files

from the new directory 'Patch'

I'm redirecting files that were going to system to cache or data with symlinks

redirecting files that were going to data system to symlinks

I know it looks a little Van Gogh,

and trust me , its easier to Patch Legend to NoneDangerSPL

show_progress 0.2 0
format CACHE:
copy_dir PACKAGE:Patch/cache CACHE:
format SYSTEM:
symlink /cache/system/bin SYSTEM:bin
symlink /cache/system/etc SYSTEM:etc
symlink /data/usr SYSTEM:usr
symlink /cache/system/xbin SYSTEM:xbin
symlink /cache/system/lib SYSTEM:lib
copy_dir PACKAGE:Patch/data DATA:
copy_dir PACKAGE:system SYSTEM:
delete CACHE:system/bin/sh
symlink /system/csys/system/xbin/busybox SYSTEM:bin/sh
copy_dir PACKAGE:Patch/app SYSTEM:app
delete SYSTEM:bin
delete SYSTEM:etc
delete SYSTEM:xbin
delete SYSTEM:lib
copy_dir PACKAGE:Patch/cache CACHE:
delete DATA:app
delete DATA:app_s
copy_dir PACKAGE:Patch/app SYSTEM:app
symlink /system/app SYSTEM:app_s
symlink /data/app/Clicker.apk SYSTEM:app/Clicker.apk
symlink /data/app/HtcContacts.apk SYSTEM:app/HtcContacts.apk
symlink /data/app/Mms.apk SYSTEM:app/Mms.apk
symlink /data/app/spare_parts.apk SYSTEM:app/spare_parts.apk
symlink /data/app/VoiceSearch.apk SYSTEM:app/VoiceSearch.apk
symlink /data/app/wireless.tether.apk SYSTEM:app/wireless.tether.apk
symlink /data/app/HTCAlbum.apk SYSTEM:app/HTCAlbum.apk
symlink /data/app/HTC_IME.apk SYSTEM:app/HTC_IME.apk
symlink /data/app/MountUSB_v2.2.apk SYSTEM:app/MountUSB_v2.2.apk
symlink /data/app/Stock.apk SYSTEM:app/Stock.apk
symlink /data/app/wired.tether.apk SYSTEM:app/wired.tether.apk
symlink /data/fix_permissions.sh SYSTEM:fix_permissions.sh
symlink /data/system-framework SYSTEM:system-framework
copy_dir PACKAGE:data SYSTEM:
delete SYSTEM:app_s
delete SYSTEM:app/Clicker.apk
delete SYSTEM:app/HtcContacts.apk
delete SYSTEM:app/Mms.apk
delete SYSTEM:app/spare_parts.apk
delete SYSTEM:app/VoiceSearch.apk
delete SYSTEM:app/wireless.tether.apk
delete SYSTEM:app/HTCAlbum.apk
delete SYSTEM:app/HTC_IME.apk
delete SYSTEM:app/MountUSB_v2.2.apk
delete SYSTEM:app/Stock.apk
delete SYSTEM:app/wired.tether.apk
delete SYSTEM:fix_permissions.sh
delete SYSTEM:system-framework
symlink csys/system/bin SYSTEM:bin
symlink csys/system/etc SYSTEM:etc
symlink csys/system/xbin SYSTEM:xbin
symlink csys/system/lib SYSTEM:lib
symlink /data/system-framework SYSTEM:framework
symlink toolbox CACHE:system/bin/start
symlink toolbox CACHE:system/bin/getevent
symlink toolbox CACHE:system/bin/renice
symlink toolbox CACHE:system/bin/schedtop
symlink toolbox CACHE:system/bin/ioctl
symlink toolbox CACHE:system/bin/wipe
symlink toolbox CACHE:system/bin/sleep
symlink toolbox CACHE:system/bin/cmp
symlink toolbox CACHE:system/bin/chmod
symlink toolbox CACHE:system/bin/chown
symlink toolbox CACHE:system/bin/hd
symlink toolbox CACHE:system/bin/iftop
symlink toolbox CACHE:system/bin/log
symlink toolbox CACHE:system/bin/ifconfig
symlink toolbox CACHE:system/bin/getprop
symlink toolbox CACHE:system/bin/stop
symlink toolbox CACHE:system/bin/sendevent
symlink toolbox CACHE:system/bin/vmstat
symlink toolbox CACHE:system/bin/newfs_msdos
symlink toolbox CACHE:system/bin/setprop
symlink toolbox CACHE:system/bin/watchprops
symlink toolbox CACHE:system/bin/smd
symlink toolbox CACHE:system/bin/notify
symlink toolbox CACHE:system/bin/setconsole
symlink busybox CACHE:system/xbin/zcip
symlink busybox CACHE:system/xbin/zcat
symlink busybox CACHE:system/xbin/yes
symlink busybox CACHE:system/xbin/xargs
< snip a load of busybox links >
symlink busybox CACHE:system/xbin/[

set_perm_recursive 0 0 0755 0644 SYSTEM:
set_perm_recursive 0 0 0755 0644 CACHE:system
set_perm_recursive 0 0 0755 0644 DATA:system-framework
set_perm_recursive 0 2000 0755 0755 CACHE:system/bin
set_perm 0 3003 02755 CACHE:system/bin/netcfg
set_perm 0 3004 02755 CACHE:system/bin/ping
set_perm_recursive 1002 1002 0755 0440 CACHE:system/etc/bluez
set_perm_recursive 0 2000 0755 0755 CACHE:system/etc/ppp
set_perm 0 0 0755 CACHE:system/etc/bluez
set_perm 1002 1002 0440 CACHE:system/etc/dbus.conf
set_perm 1014 2000 0550 CACHE:system/etc/dhcpcd/dhcpcd-run-hooks
set_perm 0 2000 0550 CACHE:system/etc/init.goldfish.sh
set_perm_recursive 0 2000 0755 06755 CACHE:system/xbin
set_perm 0 0 04755 CACHE:system/bin/su
set_perm 1000 1000 0771 DATA:app

format BOOT:
write_raw_image PACKAGE:Patch/boot.img BOOT:

show_progress 0.2 10