[Android Q&A, Help & Troubleshooting] HackitZ:
Hi everyone,

I hope this is the right place to try and get some help.

I built a ROM you can see it here. and have be trying different build.prop and init.d and updater-script tweaks and I still feel it could be better.

Here's the device i'm using.

I currently have a Sony Xperia T (lt30a) with LTE, my bootloader is locked and can not be unlocked so i'm stuck with a stock kernel.

I have spent days reading different post's about build.props and init.d tweaks. I have tried several different combinations but still feel i have not hit the magic spot of performance and battery life. (if one exists) lol.

This is what i think might be an issue,

1. are some of the tweaks specific for dual or quad core cpu's?

2. does the android version matter if the build is 4.04 compared to 4.03? i'm sure it matters if it's gb, ics, or jb?

3. how much does it affect the tweaks on different hardware with the same specs? (like same cpu, same memory).

I hope someone can help as i'm new to building roms and just want to make the best ROM as I can.

Here's a copy of both my current build.prop and init.d tweaks.

Build.prop

##### Merging of the /util/data/semc_kernel_time_stamp.prop file #####
ro.build.date=Thu Sep 20 11:30:51 2012
ro.build.date.utc=1348133451
ro.build.user=BuildUser
ro.build.host=BuildHost

##### Final patch of properties #####
ro.build.product=LT30a
ro.build.description=LT30a-user 4.0.4 7.0.A.3.195 PPP_xw test-keys

ro.product.brand=Sony
ro.product.name=LT30a_1266-7837
ro.product.device=LT30a
ro.build.tags=release-keys
ro.build.fingerprint=Sony/LT30a_1266-7837/LT30a:4.0.4/7.0.A.3.195/PPP_xw:user/release-keys

######################## Customized property values #########################

ro.semc.version.cust=1266-7837
ro.semc.version.cust_revision=R11F
ro.semc.enable.fast_dormancy=true
persist.cust.tel.adapt=0
ro.config.ringtone=james_bond_theme.ogg
ro.config.notification_sound=James_Bond_Theme.ogg

ro.roaming.no_acting_hplmn=true
ro.nfc.se.smx.enable=false
ro.nfc.icon.enable=true
ro.product.locale.language=en
ro.product.locale.region=CA
#########################################################################

ro.config.alarm_alert=alarm.ogg
ro.semc.content.number=PA14

################# Updating of the SW Version #################
ro.semc.version.fs_revision=7.0.A.3.195
ro.build.id=7.0.A.3.195
ro.build.display.id=HackitZ_LT30a_v2.5

##### Values from product package metadata #####
ro.semc.product.model=LT30a
ro.semc.ms_type_id=PM-0140-CV
ro.semc.version.fs=ROGERS-LTE
ro.semc.product.name=Xperia T
ro.semc.product.device=LT30
ro.product.model=LT30a

# begin build properties
# autogenerated by buildinfo.sh
ro.build.version.incremental=PPP_xw
ro.build.version.sdk=15
ro.build.version.codename=REL
ro.build.version.release=4.0.4
ro.build.type=user
ro.product.board=MINT
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=Sony
ro.wifi.channels=
ro.board.platform=msm8960
# ro.build.product is obsolete; use ro.product.device
# Do not try to parse ro.build.description or .fingerprint
ro.build.characteristics=nosdcard
# end build properties
#
# system.prop for surf
#

# Notify the system that the RIL only signals once
ro.telephony.call_ring.multiple=false

rild.libpath=/system/lib/libril-qc-qmi-1.so
rild.libargs=-d /dev/smd0
persist.rild.nitz_plmn=
persist.rild.nitz_long_ons_0=
persist.rild.nitz_long_ons_1=
persist.rild.nitz_long_ons_2=
persist.rild.nitz_long_ons_3=
persist.rild.nitz_short_ons_0=
persist.rild.nitz_short_ons_1=
persist.rild.nitz_short_ons_2=
persist.rild.nitz_short_ons_3=
ril.subscription.types=NV,RUIM
DEVICE_PROVISIONED=1
debug.sf.hw=1
debug.egl.hw=1
debug.composition.type=dyn
ro.sf.compbypass.enable=1
dev.pm.dyn_samplingrate=1
#
#General Performance
#
dalvik.vm.heapsize=36m
#
# system props for the cne module
#
persist.cne.UseCne=vendor
persist.cne.UseSwim=false
persist.cne.bat.range.low.med=30
persist.cne.bat.range.med.high=60
persist.cne.loc.policy.op=/system/etc/OperatorPolicy.xml
persist.cne.loc.policy.user=/system/etc/UserPolicy.xml
persist.cne.bwbased.rat.sel=false
persist.cne.snsr.based.rat.mgt=false
persist.cne.bat.based.rat.mgt=false
persist.cne.rat.acq.time.out=30000
persist.cne.rat.acq.retry.tout=0
persist.cne.nsrm.mode=false

ro.hdmi.enable=true
lpa.decode=true
lpa.use-stagefright=true

#system props for the MM modules

media.stagefright.enable-player=true
media.stagefright.enable-http=true
media.stagefright.enable-aac=true
media.stagefright.enable-qcp=true
media.stagefright.enable-scan=true
#
# system props for the data modules
#
ro.use_data_netmgrd=true

#system props for time-services
persist.timed.enable=true

# System props for audio
persist.audio.fluence.mode=endfire
persist.audio.vr.enable=false
persist.audio.handset.mic=analog
persist.audio.hp=true

# System prop to select audio resampler quality
af.resampler.quality=255

#
# system prop for opengles version
#
# 131072 is decimal for 0x20000 to report version 2
ro.opengles.version=131072

# NFC
ro.nfc.on.default=false
ro.nfc.se.sim.enable=true
ro.nfc.se.smx.enable=true
ro.nfc.icon.enable=false
ro.nfc.vendor.name=nxp

#
# system prop for Bluetooth SAP Profile
#
ro.qualcomm.bluetooth.sap=true

#
#system prop for Bluetooth hci transport
ro.qualcomm.bt.hci_transport=smd
#
# system prop for requesting Master role in incoming Bluetooth connection.
#
ro.bluetooth.request.master=true
#
# system prop for Bluetooth Auto connect for remote initated connections
#
ro.bluetooth.remote.autoconnect=true
# system property for Bluetooth discoverability time out in seconds
# 0: Always discoverable
#debug.bt.discoverable_time=0

#system prop for switching gps driver to qmi
persist.gps.qmienabled=true

#
# System prop for sending transmit power request to RIL during WiFi hotspot on/off
#
ro.ril.transmitpower=true

#
#Simulate sdcard on /data/media
#
persist.fuse_sdcard=false
ro.hwui.text_cache_width=2048

# System props for SOLS
ro.semc.sols.product-code=111
ro.semc.sols.company-code=5

#Default values/Locales for the hiding languages feature
ro.product.locale.excluded=ar_EG ar_IL fa_IR iw_IL

# prop to indicate what kind of external memory the product have.
ro.semc.product.user_storage=emmc_sdcard
ro.build.characteristics=default

# Properties controlling Qcom performance patches
net.webkit.setpri=1
net.webkit.cache.mindeadsize=4194304
net.webkit.cache.maxdeadsize=4194304
net.webkit.cache.size=12582912
net.dns.cache_size=512
net.dns.cache_ttl=600
net.early.sockets=0
stathub.pp.prfth=30
net.tcp.fin.aggregation=1
net.dnshostprio.enable=1
net.http.threads=10
net.http.idle_cache.size=40
net.http.idle_cache.shutdown=true
net.nw.cache.prioadvstep=86400000
net.nw.cache.weightadvstep=3600000
net.nw.cache.orderby=weight

#
# ADDITIONAL_BUILD_PROPERTIES
#
ro.product-res-path=framework/SemcGenericUxpRes.apk
ro.com.android.dataroaming=false
keyguard.no_require_sim=true
ro.com.android.dateformat=MM-dd-yyyy
ro.vendor.extension_library=/system/lib/libqc-opt.so
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=64m
dalvik.vm.heapsize=256m
ro.setupwizard.mode=DISABLED
ro.com.google.gmsversion=4.0_r5
ro.semc.xloud.supported=true
ro.com.google.clientidbase=android-sonyericsson
ro.com.google.clientidbase.ms=android-sonymobile
ro.emmc=1
ro.sf.lcd_density=320
ro.usb.pid_suffix=182
#
#makes apps load faster and frees more ram (new =m=y,o=y)
#
dalvik.vm.dexopt-flags=m=y
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt
ro.service.swiqi.supported=true
persist.service.swiqi.enable=1
ro.service.swiqi2.supported=true
persist.service.swiqi2.enable=1
ro.drm.active.num=4
ro.drm.active.0=marlin,1
ro.drm.active.1=playready,1
ro.drm.active.2=dtla,1
ro.drm.active.3=marlin_import,1
#
#My tweaks
#
ro.home_app_adj=1
#
#Faster Scrolling
#
ro.max.fling_velocity=12000
ro.min.fling_velocity=8000
#
#POWER SAVES
#
ro.ril.disable.power.collapse=0
pm.sleep_mode=1
persist.sys.purgeable_assets=1
windowsmgr.max_events_per_sec=60
wifi.supplicant_scan_interval=180
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
profiler.force_disable_err_rpt=1
profiler.force_disable_ulog=1
#
#Disable error checking (Should speed things up a bit)
#
ro.kernel.android.checkjni=0
ro.kernel.checkjni=0
#
#Disable sending usage data
#
ro.config.nocheckin=1
#
#To make the phone ring faster when dialing out
#
ro.telephony.call_ring.delay=0
#
#
#jpeg image quality
#
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
ro.media.enc.jpeg.quality=100
#
#touch responce
#
debug.performance.tuning=1
video.accelerate.hw=1

Init.d

#!/system/bin/sh

echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree

echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio

echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo "500,512000,64,2048" > /proc/sys/kernel/sem;

echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs

echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;

for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done

rm /dev/log/main

Updater-script

show_progress(0.500000, 40);

ui_print(" | *************************************** |");
ui_print(" | *=======================* |");
ui_print(" | * HackitZ-LT30a * |");
ui_print(" | * ====== Base_7.0.A.3.195 = * |");
ui_print(" | * ============ * |");
ui_print(" | *************************************** |");

ui_print("-- Format system");
format("ext4", "EMMC", "/dev/block/mmcblk0p12", "0");
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/data");
run_program("/sbin/busybox", "mount", "/cache");

ui_print("-- Delete files");
delete_recursive("/cache");
delete_recursive("/data/dalvik-cache");
delete_recursive("/data/resource-cache");
delete_recursive("/sdcard/.android_secure");
delete_recursive("/sdcard/.data");
delete_recursive("/sdcard/LOST.DIR");

ui_print("-- Installing system");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");

ui_print("-- Setting symlinks");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("busybox", "/system/xbin/[");
symlink("busybox", "/system/xbin/[[");
symlink("busybox", "/system/xbin/adjtimex");
symlink("busybox", "/system/xbin/arp");
symlink("busybox", "/system/xbin/ash");
symlink("busybox", "/system/xbin/awk");
symlink("busybox", "/system/xbin/base64");
symlink("busybox", "/system/xbin/basename");
symlink("busybox", "/system/xbin/bbconfig");
symlink("busybox", "/system/xbin/blkid");
symlink("busybox", "/system/xbin/blockdev");
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/chattr");
symlink("busybox", "/system/xbin/chgrp");
symlink("busybox", "/system/xbin/chmod");
symlink("busybox", "/system/xbin/chown");
symlink("busybox", "/system/xbin/chroot");
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/cut");
symlink("busybox", "/system/xbin/date");
symlink("busybox", "/system/xbin/dc");
symlink("busybox", "/system/xbin/dd");
symlink("busybox", "/system/xbin/depmod");
symlink("busybox", "/system/xbin/devmem");
symlink("busybox", "/system/xbin/df");
symlink("busybox", "/system/xbin/diff");
symlink("busybox", "/system/xbin/dirname");
symlink("busybox", "/system/xbin/dmesg");
symlink("busybox", "/system/xbin/dnsd");
symlink("busybox", "/system/xbin/dos2unix");
symlink("busybox", "/system/xbin/du");
symlink("busybox", "/system/xbin/echo");
symlink("busybox", "/system/xbin/ed");
symlink("busybox", "/system/xbin/egrep");
symlink("busybox", "/system/xbin/env");
symlink("busybox", "/system/xbin/expand");
symlink("busybox", "/system/xbin/expr");
symlink("busybox", "/system/xbin/false");
symlink("busybox", "/system/xbin/fdisk");
symlink("busybox", "/system/xbin/fgrep");
symlink("busybox", "/system/xbin/find");
symlink("busybox", "/system/xbin/flash_lock");
symlink("busybox", "/system/xbin/flash_unlock");
symlink("busybox", "/system/xbin/flashcp");
symlink("busybox", "/system/xbin/flock");
symlink("busybox", "/system/xbin/fold");
symlink("busybox", "/system/xbin/free");
symlink("busybox", "/system/xbin/freeramdisk");
symlink("busybox", "/system/xbin/fsync");
symlink("busybox", "/system/xbin/ftpget");
symlink("busybox", "/system/xbin/ftpput");
symlink("busybox", "/system/xbin/fuser");
symlink("busybox", "/system/xbin/getopt");
symlink("busybox", "/system/xbin/grep");
symlink("busybox", "/system/xbin/groups");
symlink("busybox", "/system/xbin/gunzip");
symlink("busybox", "/system/xbin/gzip");
symlink("busybox", "/system/xbin/halt");
symlink("busybox", "/system/xbin/head");
symlink("busybox", "/system/xbin/hexdump");
symlink("busybox", "/system/xbin/id");
symlink("busybox", "/system/xbin/ifconfig");
symlink("busybox", "/system/xbin/inetd");
symlink("busybox", "/system/xbin/insmod");
symlink("busybox", "/system/xbin/install");
symlink("busybox", "/system/xbin/iostat");
symlink("busybox", "/system/xbin/ip");
symlink("busybox", "/system/xbin/kill");
symlink("busybox", "/system/xbin/killall");
symlink("busybox", "/system/xbin/killall5");
symlink("busybox", "/system/xbin/length");
symlink("busybox", "/system/xbin/less");
symlink("busybox", "/system/xbin/ln");
symlink("busybox", "/system/xbin/losetup");
symlink("busybox", "/system/xbin/ls");
symlink("busybox", "/system/xbin/lsattr");
symlink("busybox", "/system/xbin/lsmod");
symlink("busybox", "/system/xbin/lsusb");
symlink("busybox", "/system/xbin/lzcat");
symlink("busybox", "/system/xbin/lzma");
symlink("busybox", "/system/xbin/lzop");
symlink("busybox", "/system/xbin/lzopcat");
symlink("busybox", "/system/xbin/man");
symlink("busybox", "/system/xbin/md5sum");
symlink("busybox", "/system/xbin/mesg");
symlink("busybox", "/system/xbin/mkdir");
symlink("busybox", "/system/xbin/mke2fs");
symlink("busybox", "/system/xbin/mkfifo");
symlink("busybox", "/system/xbin/mkfs.ext2");
symlink("busybox", "/system/xbin/mkfs.vfat");
symlink("busybox", "/system/xbin/mknod");
symlink("busybox", "/system/xbin/mkswap");
symlink("busybox", "/system/xbin/mktemp");
symlink("busybox", "/system/xbin/modinfo");
symlink("busybox", "/system/xbin/modprobe");
symlink("busybox", "/system/xbin/more");
symlink("busybox", "/system/xbin/mount");
symlink("busybox", "/system/xbin/mountpoint");
symlink("busybox", "/system/xbin/mpstat");
symlink("busybox", "/system/xbin/mv");
symlink("busybox", "/system/xbin/nanddump");
symlink("busybox", "/system/xbin/nandwrite");
symlink("busybox", "/system/xbin/netstat");
symlink("busybox", "/system/xbin/nice");
symlink("busybox", "/system/xbin/nohup");
symlink("busybox", "/system/xbin/nslookup");
symlink("busybox", "/system/xbin/ntpd");
symlink("busybox", "/system/xbin/od");
symlink("busybox", "/system/xbin/patch");
symlink("busybox", "/system/xbin/pgrep");
symlink("busybox", "/system/xbin/pidof");
symlink("busybox", "/system/xbin/ping");
symlink("busybox", "/system/xbin/pkill");
symlink("busybox", "/system/xbin/pmap");
symlink("busybox", "/system/xbin/poweroff");
symlink("busybox", "/system/xbin/printenv");
symlink("busybox", "/system/xbin/printf");
symlink("busybox", "/system/xbin/ps");
symlink("busybox", "/system/xbin/pstree");
symlink("busybox", "/system/xbin/pwd");
symlink("busybox", "/system/xbin/pwdx");
symlink("busybox", "/system/xbin/rdev");
symlink("busybox", "/system/xbin/readlink");
symlink("busybox", "/system/xbin/realpath");
symlink("busybox", "/system/xbin/renice");
symlink("busybox", "/system/xbin/reset");
symlink("busybox", "/system/xbin/resize");
symlink("busybox", "/system/xbin/rev");
symlink("busybox", "/system/xbin/rm");
symlink("busybox", "/system/xbin/rmdir");
symlink("busybox", "/system/xbin/rmmod");
symlink("busybox", "/system/xbin/route");
symlink("busybox", "/system/xbin/run-parts");
symlink("busybox", "/system/xbin/rx");
symlink("busybox", "/system/xbin/sed");
symlink("busybox", "/system/xbin/seq");
symlink("busybox", "/system/xbin/setconsole");
symlink("busybox", "/system/xbin/setserial");
symlink("busybox", "/system/xbin/setsid");
symlink("busybox", "/system/xbin/sh");
symlink("busybox", "/system/xbin/sha1sum");
symlink("busybox", "/system/xbin/sha256sum");
symlink("busybox", "/system/xbin/sha512sum");
symlink("busybox", "/system/xbin/sleep");
symlink("busybox", "/system/xbin/sort");
symlink("busybox", "/system/xbin/split");
symlink("busybox", "/system/xbin/stat");
symlink("busybox", "/system/xbin/strings");
symlink("busybox", "/system/xbin/stty");
symlink("busybox", "/system/xbin/sum");
symlink("busybox", "/system/xbin/swapoff");
symlink("busybox", "/system/xbin/swapon");
symlink("busybox", "/system/xbin/sync");
symlink("busybox", "/system/xbin/sysctl");
symlink("busybox", "/system/xbin/tac");
symlink("busybox", "/system/xbin/tail");
symlink("busybox", "/system/xbin/tar");
symlink("busybox", "/system/xbin/taskset");
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/true");
symlink("busybox", "/system/xbin/ttysize");
symlink("busybox", "/system/xbin/tune2fs");
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/unxz");
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/vi");
symlink("busybox", "/system/xbin/watch");
symlink("busybox", "/system/xbin/wc");
symlink("busybox", "/system/xbin/wget");
symlink("busybox", "/system/xbin/which");
symlink("busybox", "/system/xbin/whoami");
symlink("busybox", "/system/xbin/xargs");
symlink("busybox", "/system/xbin/xz");
symlink("busybox", "/system/xbin/xzcat");
symlink("busybox", "/system/xbin/yes");
symlink("busybox", "/system/xbin/zcat");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/lsusb");
symlink("toolbox", "/system/bin/wipe");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/kill");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/dd");
symlink("wiperiface_v02", "/system/bin/wiperiface");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/reboot");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/touch");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/ctrlaltdel");

ui_print("-- Setting permissions");
set_perm_recursive(0, 0, 0755, 0644, "/system");

set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm_recursive(0, 0, 0777, 0777, "system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/install-recovery.sh");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
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, 0644, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/etc");
set_perm(0, 0, 0644, "/system/vendor/etc/audio_effects.conf");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/drm");
set_perm(0, 0, 0644, "/system/vendor/lib/drm/libdrmwvmplugin.so");
set_perm(0, 0, 0644, "/system/build.prop");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
set_perm(0, 2000, 0755, "/system/btmgr/bin/busybox");
set_perm(0, 2000, 0755, "/system/bin/recovery.tar");
set_perm(0, 2000, 0755, "/system/bin/chargemon");
set_perm(0, 2000, 0755, "/system/bin/charger");
symlink("/system/xbin/busybox", "/system/bin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/sqlite3");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");

show_progress(0.100000, 0);

set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/xbin/su", "/system/bin/su");
show_progress(0.1, 10);
show_progress(0.2, 0);
show_progress(0.2, 10);
run_program("/sbin/busybox", "cp", "/tmp/recovery.log", "/sdcard/recovery.log");
run_program("/sbin/sleep", "5");
ui_print("-- Unmounting partitions");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/cache");
run_program("/sbin/busybox", "umount", "/data");
ui_print("");
ui_print(" | *************************************** |");
ui_print(" | *=======================* |");
ui_print(" | * ====== Enjoy ====== * |");
ui_print(" | *************************************** |");
ui_print(" | * Installation Complete! * |");
ui_print(" | *************************************** |");