Many modifications to froyo sense, config.txt, ppp, lk, new kernel

This commit is contained in:
arif-ali 2011-03-13 13:17:33 +00:00
parent b6f7c6826d
commit 85048916f7
27 changed files with 2013 additions and 104 deletions

Binary file not shown.

BIN
build/boot/initrd/init.android Executable file

Binary file not shown.

@ -2,7 +2,7 @@ on init
mount rootfs rootfs / remount
mkdir /app-cache 01777 system system
mount tmpfs tmpfs /app-cache size=8m
mount rootfs rootfs / ro remount
mount rootfs rootfs / rw remount
# Define the memory thresholds at which the above process classes will
# be killed. These numbers are in pages (4k).

@ -10,7 +10,7 @@
# setup the global environment
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /vendor/lib:/system/lib
export ANDROID_BOOTLOGO 1
export ANDROID_BOOTLOGO 0
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
@ -426,7 +426,7 @@
service debuggerd /system/bin/debuggerd
service ril-daemon /system/bin/rild -l /system/lib/libhtc_ril_wrapper.so -- -d /dev/smd0 nand_init rmnet_mode
service ril-daemon /system/bin/rild -l /system/lib/libhtc_ril_wrapper.so -- -d /dev/smd0 nand_init
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root

@ -1 +1 @@
../init
../init.android

Binary file not shown.

File diff suppressed because it is too large Load Diff

172
build/system/etc/init.d/00setup Executable file

@ -0,0 +1,172 @@
#!/bin/sh
fail() {
echo "Failed"
echo "$1"
exec /bin/sh
}
boot_normal()
{
# cleanup
umount /bootsdcard
rmdir /bootsdcard
mount -o remount,ro /
# exit script normally, and continue on
exit 0
}
mount -t proc proc /proc
mount -t sysfs sys /sys
mkdir -m 0777 /dev/block
mknod -m 0666 /dev/block/mmcblk0 b 179 0
mknod -m 0666 /dev/block/mmcblk0p1 b 179 1
mknod -m 0666 /dev/block/mmcblk0p2 b 179 2
mount -o remount,rw /
# wait for sdcard
while [ ! -b /dev/block/mmcblk0 ]; do
sleep 1
done
sleep 2
#Configure Devices
MAKEDEVS
PATH=/sbin:/bin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin
echo "Mounting debugfs"
mount -t debugfs none /dbgfs
echo "Activating backlight control..."
echo 3 > /sys/class/htc_hw/test
echo "Enabling smooth scrolling..."
echo 40 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo "Activating full charging..."
echo 2 > /dbgfs/htc_battery/charger_state
echo 1024 > /dbgfs/micropklt_dbg/sleep_leds
echo "+++++++ Tweaking MMC read-ahead by Rafpigna +++++++"
mmcfolder="/sys/devices/platform/msm_sdcc.2/mmc_host/mmc1"
cd $mmcfolder
folderlist=`ls -1`
mmcresult=`echo $folderlist | grep -o '\bmmc1:\w*' | sed 's/mmc1://'`
echo 32 > /sys/devices/platform/msm_sdcc.2/mmc_host/mmc1/mmc1:$mmcresult/block/mmcblk0/queue/read_ahead_kb
echo "+++++++ Auto-off keyled backlight by Rafpigna +++++++"
echo 0 > /sys/devices/platform/btn_backlight_manager/auto_off
####################################################
###### configs on boot ############################
###### idea by Dandiest, modified by me (rafpigna) #
####################################################
#first, mount sd card
# assume single partition, if found partition 1 use that
echo "+++++++ STARTING UPDATE SCRIPT +++++++"
echo "+++++++ MOUNTING SD CARD +++++++"
sdcard_partition=mmcblk0
[ -d /sys/block/mmcblk0/mmcblk0p1 ] && sdcard_partition=mmcblk0p1
# run fsck
# dosfsck -y /dev/block/$sdcard_partition
# mount sdcard
mkdir -m 0700 /bootsdcard
mount -t vfat -o fmask=0111,dmask=0000,rw,utf8,noatime,nodiratime /dev/block/$sdcard_partition /bootsdcard || bootsdcard=0
sleep 1
if [ $bootsdcard -eq 0 ]; then
# cleanup
rmdir /bootsdcard
rm -f /dev/block/mmcblk0
rm -f /dev/block/mmcblk0p1
rm -f /dev/block/mmcblk0p2
# boot normally
boot_normal
fi
# prepare
data_dir=/bootsdcard
init_log=/bootsdcard/init.log
update_dir=/bootsdcard/updates
# clear previous init.log
if [ -f $init_log ]; then
rm -f $init_log
fi
echo "+++++++ READING CONFIG FILE +++++++"
# read config file
config_file=$data_dir/config.txt
if [ -f $config_file ]; then
config=`awk -v RS='\r\n' -v ORS=' ' 1 $config_file`
gps_zone=`echo $config | grep -o '\bgps_zone=\w*' | sed 's/gps_zone=//'`
a2sd_mode=`echo $config | grep -o '\ba2sd_mode=\w*' | sed 's/a2sd_mode=//'`
fi
#write the values to logfile to have possibility to check if they are right
echo "gps_zone" >> $init_log
echo $gps_zone >> $init_log
echo "a2sd_mode" >> $init_log
echo $a2sd_mode >> $init_log
# load default value
[ -z $a2sd_mode ] && a2sd_mode="none"
#20 jan 2011
#ext3 can be mounted as ext4 with that option improving performances without major drawbacks
#reference: https://wiki.archlinux.org/index.php/Ext4#Mounting_ext3_Partitions_as_ext4_Without_Converting
#if second partition exists, mount it as data. if not exists, uncomment line in init.rc to mount data on yaffs
#also init.rc must be changed to mount /data on nand userdata if ext partition does not exists
if [ -d /sys/block/mmcblk0/mmcblk0p2 ] ; then
echo "Ext partition found. Mounting data on EXT"
echo "Ext partition found. Mounting data on EXT" >> $init_log
# Added by arif-ali
# set a2sd mode
if [ "$a2sd_mode" == "a2sd" ]; then
echo "+++++++ a2sd ACTVATED +++++++" >> $init_log
echo "+++++++ a2sd ACTVATED +++++++"
rm -rf /data/.noa2sd
rm -rf /data/.dalvikcache
elif [ "$a2sd_mode" == "dalvik" ]; then
echo "+++++++ dalvik a2sd ACTVATED +++++++" >> $init_log
echo "+++++++ dalvik a2sd ACTVATED +++++++"
rm -rf /data/.noa2sd
touch /data/.dalvikcache
elif [ "$a2sd_mode" == "data" ]; then
echo "+++++++ data a2sd ACTVATED +++++++" >> $init_log
echo "+++++++ data a2sd ACTVATED +++++++"
rm -rf /data/.noa2sd
touch /data/.dalvikcache
touch /data/.datasd
elif [ "$a2sd_mode" == "none" ]; then
touch /data/.noa2sd
echo "+++++++ a2sd DEACTVATED - running from NAND +++++++" >> $init_log
echo "+++++++ a2sd DEACTVATED - running from NAND +++++++"
else
echo "+++++++ Default a2sd ACTVATED +++++++" >> $init_log
echo "+++++++ Default a2sd ACTVATED +++++++"
rm -rf /data/.noa2sd
touch /data/.dalvikcache
fi
echo "+++++++ MOUNTED DATA ON EXT +++++++"
echo "+++++++ MOUNTED DATA ON EXT +++++++" >> $init_log
else
echo "Ext partition not found. disabling a2sd"
echo "Ext partition not found. disabling a2sd" >> $init_log
touch /data/.noa2sd
rm -rf /data/.dalvikcache
rm -rf /data/.datasd
echo "+++++++ MOUNTED DATA ON NAND +++++++" >> $init_log
echo "+++++++ MOUNTED DATA ON NAND +++++++"
fi
# set gps zone
if [ "$gps_zone" != "" ]; then
current_gps_zone=`awk -F"=" '/NTP_SERVER/ {print $2}' /system/etc/gps.conf`
[ "$gps_zone.pool.ntp.org" != "$current_gps_zone" ] && sed -i "s/$current_gps_zone/$gps_zone.pool.ntp.org/g" /system/etc/gps.conf
echo "+++++++ GPS ZONE CHANGED +++++++" >> $init_log
echo "+++++++ GPS ZONE CHANGED +++++++"
fi
boot_normal

@ -2,9 +2,15 @@
#
# Load MODULES
sleep 1
insmod /system/lib/modules/msm_rmnet.ko
if [ -f /system/ppp ]
then
echo "Not loading RMNET module as /system/ppp exists"
else
echo "Loading RMNET module as /system/ppp doesn't exist"
insmod /system/lib/modules/msm_rmnet.ko
fi
insmod /system/lib/modules/tun.ko
insmod /system/lib/modules/cifs.ko
insmod /system/lib/modules/nls_utf8.ko
insmod /system/lib/modules/fuse.ko
echo "+++ RMNET / TUN / CIFS activated +++";
echo "+++ TUN / CIFS activated +++";

17
build/system/etc/init.d/97ppp Executable file

@ -0,0 +1,17 @@
#!/system/bin/sh
chown 1001.1001 /dev/smd1;
touch /etc/ppp/active;
touch /etc/ppp/pap-secrets;
touch /etc/ppp/chap-secrets;
touch /etc/ppp/options.smd;
touch /etc/ppp/options.smd1;
touch /etc/ppp/ppp-gprs.pid;
chown 0.1001 /system/etc/ppp/*
chmod 775 /system/etc/ppp/*
chown 0.0 /system/bin/pppd;
chmod 4755 /system/bin/pppd;
#/system/bin/pppd /dev/smd1 defaultroute;
# Create link for resolv.conf (generated by pppd)
ln -s /etc/ppp/resolv.conf /etc/resolv.conf

@ -1,4 +1,43 @@
#!/bin/sh
#/bin/touch /etc/ppp/ppp0.pid
#/bin/chmod 777 /etc/ppp/ppp0.pid
case $1 in
ppp1)
iptables --flush;
iptables --table nat --flush;
iptables --delete-chain;
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE;
iptables --append FORWARD --in-interface ppp1 -j ACCEPT;
echo 0 > /proc/sys/net/ipv4/ip_forward;
echo 1 > /proc/sys/net/ipv4/ip_forward;
;;
ppp0)
echo "ip-up fired" > /tmp/ppp.log
# /system/bin/setprop "net.interfaces.defaultroute" "gprs"
;;
esac
# Use interface name if linkname is not available
NAME=${LINKNAME:-"$1"}
/bin/touch /etc/ppp/ppp0.pid
/bin/chmod 777 /etc/ppp/ppp0.pid
/bin/chmod 777 /etc/ppp/ppp0.pid
/bin/echo $(pidof pppd) > /etc/ppp/ppp0.pid
/system/bin/setprop "net.$NAME.dns1" "$DNS1"
/system/bin/setprop "net.$NAME.dns2" "$DNS2"
/system/bin/setprop "net.$NAME.local-ip" "$IPLOCAL"
/system/bin/setprop "net.$NAME.remote-ip" "$IPREMOTE"
/system/bin/setprop "net.dns1" "$DNS1"
/system/bin/setprop "net.dns2" "$DNS2"
modem_log()
{
/bin/echo -e "${@}" >> /tmp/ppp.log
}
modem_log "Connection attempt SUCCESSFUL!"
modem_log "Phone IP: `/bin/ifconfig ppp0 | /bin/grep 'inet addr:' | /bin/cut -d':' -f2 | /bin/cut -d' ' -f1`"
modem_log "Subnet : `/bin/ifconfig ppp0 | /bin/grep 'inet addr:' | /bin/cut -d':' -f4 | /bin/cut -d' ' -f1`"
modem_log "P-t-P : `/bin/ifconfig ppp0 | /bin/grep 'inet addr:' | /bin/cut -d':' -f3 | /bin/cut -d' ' -f1`"
modem_log "Done!"

@ -0,0 +1,12 @@
noauth
defaultroute
usepeerdns
ipcp-accept-remote
ipcp-accept-local
holdoff 3
noaccomp
noccp
nobsdcomp
nodeflate
nopcomp
novjccomp

@ -0,0 +1,12 @@
noauth
defaultroute
usepeerdns
ipcp-accept-remote
ipcp-accept-local
holdoff 3
noaccomp
noccp
nobsdcomp
nodeflate
nopcomp
novjccomp

@ -0,0 +1,12 @@
noauth
defaultroute
usepeerdns
ipcp-accept-remote
ipcp-accept-local
holdoff 3
noaccomp
noccp
nobsdcomp
nodeflate
nopcomp
novjccomp

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -3,14 +3,29 @@
VER=2.5
ROM=Froyo_Sense_Revolution
MAGLDR=1.13
BUILD1_NAME=${ROM}_${VER}_CWM
BUILD2_NAME=${ROM}_${VER}_DFT
BUILD3_NAME=${ROM}_${VER}_LK
BUILD1=/tmp/${BUILD1_NAME}
BUILD2=/tmp/${BUILD2_NAME}
BUILD3=/tmp/${BUILD3_NAME}
TOOLS=${PWD}/../tools
MKYAFFS=${TOOLS}/mkyaffs2image
UNYAFFS=${TOOLS}/unyaffs
MAIN=${PWD}
syncDirs()
{
mkdir -p ${BUILD1}
echo -n "Synchronising the build ... "
rsync --exclude ".svn" -az ${MAIN}/../build/* ${BUILD1}/.
echo "DONE"
rm -rf ${BUILD1}/boot/initrd
# Change the version number in build.prop
sed -i s/ro.product.version=.*/ro.product.version=${VER}/g ${BUILD1}/system/build.prop
sed -i s/ro.build.description=.*/ro.build.description=${ROM}/g ${BUILD1}/system/build.prop
}
set_perm_recursive()
{
@ -27,55 +42,50 @@ set_perm()
chmod $3 $file
}
createDFT()
doFiles()
{
cd ${BUILD1}
rm -rf ../${BUILD2_NAME}.7z
rm -rf ${BUILD2}
mkdir ${BUILD2}
cd -
# create symlinks for busybox
cd ${BUILD1}/system/xbin
pushd ${BUILD1}/system/xbin > /dev/null 2>&1
for file in `cat ${TOOLS}/busybox`
do
ln -s busybox $file
ln -sf busybox $file
done
cd -
popd > /dev/null 2>&1
# create symlinks for toolbox
cd ${BUILD1}/system/bin
pushd ${BUILD1}/system/bin > /dev/null 2>&1
for file in `cat ${TOOLS}/toolbox`
do
ln -s toolbox $file
ln -sf toolbox $file
done
cd -
popd > /dev/null 2>&1
# create symlink for su
cd ${BUILD1}/system/bin
ln -s ../xbin/su
cd -
pushd ${BUILD1}/system/bin > /dev/null 2>&1
ln -sf ../xbin/su
popd > /dev/null 2>&1
# To enable a2sd+ by default
# app, app-private and dalvik-cache
#cd ${BUILD1}/data
#ln -s /sd-ext/app
#ln -s /sd-ext/app-private
#ln -s /sd-ext/dalvik-cache
#cd -
pushd ${BUILD1}/data > /dev/null 2>&1
ln -s /sd-ext/app
ln -s /sd-ext/app-private
ln -s /sd-ext/dalvik-cache
touch .dalvikcache
popd > /dev/null 2>&1
# To enable datasd uncomment the lines below
#cd ${BUILD1}/data
#pushd ${BUILD1}/data > /dev/null 2>&1
#ln -s /sd-ext/data
#touch .datasd
#cd -
#popd > /dev/null 2>&1
cd ${BUILD1}/system/etc/init.d
pushd ${BUILD1}/system/etc/init.d > /dev/null 2>&1
mv dtapp 04apps2sd
cd -
popd > /dev/null 2>&1
# change permissions
cd ${BUILD1}
pushd ${BUILD1} > /dev/null 2>&1
set_perm_recursive 0 0 0755 0644 "/system"
set_perm_recursive 0 2000 0755 0755 "/system/bin"
set_perm 0 3003 02750 "/system/bin/netcfg"
@ -90,7 +100,7 @@ createDFT()
set_perm_recursive 0 2000 0755 0750 "/system/etc/init.d"
set_perm 0 0 0755 "/system/etc/init.d"
set_perm 0 2000 0550 "/system/etc/init.goldfish.sh"
set_perm 0 0 0544 "/system/etc/install-recovery.sh"
#set_perm 0 0 0544 "/system/etc/install-recovery.sh"
set_perm_recursive 0 0 0755 0555 "/system/etc/ppp"
set_perm_recursive 0 2000 0755 0755 "/system/xbin"
set_perm 0 0 06755 "/system/xbin/hcitool"
@ -99,58 +109,169 @@ createDFT()
set_perm 0 0 06755 "/system/xbin/procrank"
set_perm 0 0 06755 "/system/xbin/su"
set_perm 0 0 06755 "/system/xbin/tcpdump"
cd -
set_perm 0 0 04755 "/system/bin/pppd"
popd > /dev/null 2>&1
}
createDFT()
{
syncDirs
pushd ${BUILD1} > /dev/null 2>&1
rm -rf ../${BUILD2_NAME}.7z
rm -rf ${BUILD2}
mkdir ${BUILD2}
popd > /dev/null 2>&1
doFiles
# create images
cd ${BUILD1}
[ -d system ] && ${MKYAFFS} system ${BUILD2}/system.img
[ -d boot ] && ${MKYAFFS} boot ${BUILD2}/boot.img
[ -d data ] && ${MKYAFFS} data ${BUILD2}/data.img
[ -d recovery ] && ${MKYAFFS} recovery ${BUILD2}/recovery.img
cd -
echo -n "Creating DFT img files ... "
pushd ${BUILD1} > /dev/null 2>&1
[ -d system ] && echo -n "system ... " && ${MKYAFFS} system ${BUILD2}/system.img > /dev/null 2>&1
[ -d boot ] && echo -n "boot ... " && ${MKYAFFS} boot ${BUILD2}/boot.img > /dev/null 2>&1
[ -d data ] && echo -n "data ... " && ${MKYAFFS} data ${BUILD2}/data.img > /dev/null 2>&1
[ -d recovery ] && echo -n "recovery ... " && ${MKYAFFS} recovery ${BUILD2}/recovery.img > /dev/null 2>&1
popd > /dev/null 2>&1
echo "DONE"
cp ${TOOLS}/DFT/* ${BUILD2}/.
cd ${BUILD2}/..
7zr a ${BUILD2_NAME}.7z ${BUILD2_NAME}
cd -
pushd ${BUILD2}/.. > /dev/null 2>&1
echo -n "Creating DFT archive ... "
7zr a ${BUILD2_NAME}.7z ${BUILD2_NAME} > /dev/null 2>&1
echo "DONE"
popd > /dev/null 2>&1
}
createCWM()
{
cd ${BUILD1}
rm -rf ../${BUILD1_NAME}.zip
syncDirs
pushd ${BUILD1} > /dev/null 2>&1
rsync --exclude ".svn" -az ${TOOLS}/META-INF .
zip -9Dry -X- ../${BUILD1_NAME}.zip *
pushd ${BUILD1}/boot > /dev/null 2>&1
if [[ "$1" == "LK" ]] ; then
genInitrd LK
${TOOLS}/mkbootimg --kernel zImage --ramdisk initrd.gz --cmdline "console=null" --base 0x11800000 -o ${BUILD1}/boot.img
popd > /dev/null 2>&1
rm -rf boot
cp META-INF/com/google/android/updater-script.lk META-INF/com/google/android/updater-script
touch system/ppp
rm -rf ../${BUILD1_NAME}_LK.zip
echo -n "Creating CWM LK zip file ... "
zip -9Dry -q ../${BUILD1_NAME}_LK.zip *
echo "DONE"
rm -rf system/ppp
else
genInitrd
popd > /dev/null 2>&1
cp META-INF/com/google/android/updater-script.std META-INF/com/google/android/updater-script
rm -rf system/etc/init.d/00setup
rm -rf ../${BUILD1_NAME}.zip
echo -n "Creating CWM zip file ... "
zip -9Dry -q ../${BUILD1_NAME}.zip *
echo "DONE"
fi
rm -rf META-INF
cd -
popd > /dev/null 2>&1
}
date
createLK()
{
syncDirs
pushd ${BUILD1} > /dev/null 2>&1
rm -rf ../${BUILD3_NAME}.7z
rm -rf ${BUILD3}
mkdir ${BUILD3}
popd > /dev/null 2>&1
mkdir ${BUILD1}
echo "Synchronising the build"
rsync --exclude ".svn" -az ${PWD}/../build/* ${BUILD1}/.
doFiles
touch ${BUILD1}/system/ppp
genInitrd LK
pushd ${BUILD1}/boot > /dev/null 2>&1
${TOOLS}/mkbootimg --kernel zImage --ramdisk initrd.gz --cmdline "console=null" --base 0x11800000 -o ${BUILD3}/boot.img
popd > /dev/null 2>&1
echo "creating initrd"
cd ${BUILD1}/boot/initrd
pushd ${BUILD1} > /dev/null 2>&1
[ -d system ] && ${MKYAFFS} system ${BUILD3}/system.img > /dev/null 2>&1
[ -d data ] && ${MKYAFFS} data ${BUILD3}/data.img > /dev/null 2>&1
popd
find .|cpio -H newc -o|gzip -9 -c - > ../initrd.gz
cp ${TOOLS}/fastboot* ${BUILD3}/.
cp ${TOOLS}/recovery_lk.img ${BUILD3}/recovery.img
pushd ${BUILD3}/.. > /dev/null 2>&1
echo -n "Creating LK archive ... "
7zr a ${BUILD3_NAME}.7z ${BUILD3_NAME} > /dev/null 2>&1
echo "DONE"
popd > /dev/null 2>&1
cd -
rm -rf ${BUILD1}/system/ppp
}
rm -rf ${BUILD1}/boot/initrd
genInitrd()
{
# Change the version number in build.prop
sed -i s/ro.product.version=.*/ro.product.version=${VER}/g ${BUILD1}/system/build.prop
sed -i s/ro.build.description=.*/ro.build.description=${ROM}/g ${BUILD1}/system/build.prop
mkdir -p ${BUILD1}/boot/initrd
rsync --exclude ".svn" -az ${MAIN}/../build/boot/initrd/ ${BUILD1}/boot/initrd
echo -n "Creating initrd ... "
pushd ${BUILD1}/boot/initrd > /dev/null 2>&1
chmod 770 bin/*
if [[ "$1" == "LK" ]] ; then
mv init.android init
pushd sbin > /dev/null 2>&1
ln -sf ../init ueventd
popd > /dev/null 2>&1
fi
find .|cpio --quiet -H newc -o|gzip -9 -c - > ../initrd.gz
popd > /dev/null 2>&1
rm -rf ${BUILD1}/boot/initrd
echo "DONE"
if [[ `echo $0 | grep createInitrd.sh` ]]; then
cp ${BUILD1}/boot/initrd.gz /tmp/initrd.gz.$$
rm -rf ${BUILD1}
mkdir ${BUILD1}
cp /tmp/initrd.gz.$$ ${BUILD1}/initrd.gz
ls -lh ${BUILD1}/initrd.gz
exit 0
fi
}
echo Build started on `date`
echo
if [[ `echo $0 | grep createInitrd.sh` ]]; then
if [[ "$1" == "LK" ]] ; then
genInitrd LK
else
genInitrd
fi
fi
syncDirs
createCWM
createDFT
createCWM LK
#createDFT
#createLK
rm -rf ${BUILD1}
rm -rf ${BUILD2}
rm -rf ${BUILD3}
echo "your files are here"
echo ""
ls -lh /tmp/${ROM}_${VER}*
echo
echo Build finished on `date`

@ -0,0 +1,124 @@
ui_print("Welcome to Froyo Sense Revolution");
show_progress(0.500000, 0);
ui_print("Formatting Boot...");
format("MTD", "boot");
ui_print("Formatting System...");
format("MTD", "system");
mount("MTD", "boot", "/boot");
mount("MTD", "system", "/system");
show_progress(0.500000, 40);
ui_print("Copying files to system...");
package_extract_dir("recovery", "/system");
package_extract_dir("system", "/system");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
"/system/xbin/arp", "/system/xbin/ash", "/system/xbin/awk",
"/system/xbin/basename", "/system/xbin/bbconfig", "/system/xbin/brctl",
"/system/xbin/bunzip2", "/system/xbin/bzcat", "/system/xbin/bzip2",
"/system/xbin/cal", "/system/xbin/cat", "/system/xbin/catv",
"/system/xbin/chgrp", "/system/xbin/chmod", "/system/xbin/chown",
"/system/xbin/chroot", "/system/xbin/cksum", "/system/xbin/clear",
"/system/xbin/cmp", "/system/xbin/cp", "/system/xbin/cpio",
"/system/xbin/cut", "/system/xbin/date", "/system/xbin/dc",
"/system/xbin/dd", "/system/xbin/depmod", "/system/xbin/devmem",
"/system/xbin/df", "/system/xbin/diff", "/system/xbin/dirname",
"/system/xbin/dmesg", "/system/xbin/dnsd", "/system/xbin/dos2unix",
"/system/xbin/du", "/system/xbin/echo", "/system/xbin/ed",
"/system/xbin/egrep", "/system/xbin/env", "/system/xbin/expr",
"/system/xbin/false", "/system/xbin/fdisk", "/system/xbin/fgrep",
"/system/xbin/find", "/system/xbin/fold", "/system/xbin/free",
"/system/xbin/freeramdisk", "/system/xbin/fuser", "/system/xbin/getopt",
"/system/xbin/grep", "/system/xbin/gunzip", "/system/xbin/gzip",
"/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
"/system/xbin/ifconfig", "/system/xbin/insmod", "/system/xbin/install",
"/system/xbin/ip", "/system/xbin/kill", "/system/xbin/killall",
"/system/xbin/killall5", "/system/xbin/length", "/system/xbin/less",
"/system/xbin/ln", "/system/xbin/losetup", "/system/xbin/ls",
"/system/xbin/lsmod", "/system/xbin/lspci", "/system/xbin/lsusb",
"/system/xbin/lzop", "/system/xbin/lzopcat", "/system/xbin/md5sum",
"/system/xbin/mkdir", "/system/xbin/mke2fs", "/system/xbin/mkfifo",
"/system/xbin/mkfs.ext2", "/system/xbin/mknod", "/system/xbin/mkswap",
"/system/xbin/mktemp", "/system/xbin/modprobe", "/system/xbin/more",
"/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/mv",
"/system/xbin/netstat", "/system/xbin/nice", "/system/xbin/nohup",
"/system/xbin/nslookup", "/system/xbin/ntpd", "/system/xbin/od",
"/system/xbin/patch", "/system/xbin/pgrep", "/system/xbin/pidof",
"/system/xbin/ping", "/system/xbin/pkill", "/system/xbin/printenv",
"/system/xbin/printf", "/system/xbin/ps", "/system/xbin/pwd",
"/system/xbin/rdev", "/system/xbin/readlink", "/system/xbin/realpath",
"/system/xbin/renice", "/system/xbin/reset", "/system/xbin/rm",
"/system/xbin/rmdir", "/system/xbin/rmmod", "/system/xbin/route",
"/system/xbin/run-parts", "/system/xbin/sed", "/system/xbin/seq",
"/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
"/system/xbin/sha256sum", "/system/xbin/sha512sum",
"/system/xbin/sleep", "/system/xbin/sort", "/system/xbin/split",
"/system/xbin/stat", "/system/xbin/strings", "/system/xbin/stty",
"/system/xbin/swapoff", "/system/xbin/swapon", "/system/xbin/sync",
"/system/xbin/sysctl", "/system/xbin/tac", "/system/xbin/tail",
"/system/xbin/tar", "/system/xbin/tee", "/system/xbin/telnet",
"/system/xbin/test", "/system/xbin/tftp", "/system/xbin/time",
"/system/xbin/top", "/system/xbin/touch", "/system/xbin/tr",
"/system/xbin/traceroute", "/system/xbin/true", "/system/xbin/tty",
"/system/xbin/tune2fs", "/system/xbin/umount", "/system/xbin/uname",
"/system/xbin/uniq", "/system/xbin/unix2dos", "/system/xbin/unlzop",
"/system/xbin/unzip", "/system/xbin/uptime", "/system/xbin/usleep",
"/system/xbin/uudecode", "/system/xbin/uuencode", "/system/xbin/vi",
"/system/xbin/watch", "/system/xbin/wc", "/system/xbin/wget",
"/system/xbin/which", "/system/xbin/whoami", "/system/xbin/xargs",
"/system/xbin/yes",
"/system/xbin/zcat");
symlink("iwmulticall", "/system/xbin/iwconfig", "/system/xbin/iwgetid",
"/system/xbin/iwlist", "/system/xbin/iwpriv",
"/system/xbin/iwspy");
symlink("toolbox", "/system/bin/cat", "/system/bin/cmp",
"/system/bin/date", "/system/bin/dd", "/system/bin/dmesg",
"/system/bin/getevent", "/system/bin/getprop", "/system/bin/hd",
"/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop",
"/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
"/system/bin/kill", "/system/bin/log", "/system/bin/lsmod",
"/system/bin/mkdir", "/system/bin/nandread", "/system/bin/netstat",
"/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
"/system/bin/ps", "/system/bin/reboot", "/system/bin/renice",
"/system/bin/rmdir", "/system/bin/rmmod", "/system/bin/route",
"/system/bin/schedtop", "/system/bin/sendevent",
"/system/bin/setconsole", "/system/bin/setprop", "/system/bin/sleep",
"/system/bin/smd", "/system/bin/start", "/system/bin/stop",
"/system/bin/sync", "/system/bin/top", "/system/bin/uptime",
"/system/bin/vmstat", "/system/bin/watchprops",
"/system/bin/wipe");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
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_recursive(0, 2000, 0755, 0750, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 0544, "/system/etc/install-recovery.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/hcitool");
set_perm(0, 0, 06755, "/system/xbin/librank");
set_perm(0, 0, 06755, "/system/xbin/procmem");
set_perm(0, 0, 06755, "/system/xbin/procrank");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/tcpdump");
show_progress(0.200000, 0);
show_progress(0.200000, 10);
package_extract_file("system/bin/verify_cache_partition_size.sh", "/tmp/verify_cache_partition_size.sh");
set_perm(0, 0, 0777, "/tmp/verify_cache_partition_size.sh");
run_program("/tmp/verify_cache_partition_size.sh");
show_progress(0.200000, 10);
ui_print("installing boot");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
show_progress(0.100000, 0);
unmount("/system");
unmount("/boot");
ui_print("All Done...");

@ -0,0 +1,122 @@
ui_print("Welcome to Froyo Sense Revolution");
show_progress(0.500000, 0);
ui_print("Formatting Boot...");
format("MTD", "boot");
ui_print("Formatting System...");
format("MTD", "system");
mount("MTD", "boot", "/boot");
mount("MTD", "system", "/system");
show_progress(0.500000, 40);
ui_print("Copying files to system...");
package_extract_dir("recovery", "/system");
package_extract_dir("system", "/system");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
"/system/xbin/arp", "/system/xbin/ash", "/system/xbin/awk",
"/system/xbin/basename", "/system/xbin/bbconfig", "/system/xbin/brctl",
"/system/xbin/bunzip2", "/system/xbin/bzcat", "/system/xbin/bzip2",
"/system/xbin/cal", "/system/xbin/cat", "/system/xbin/catv",
"/system/xbin/chgrp", "/system/xbin/chmod", "/system/xbin/chown",
"/system/xbin/chroot", "/system/xbin/cksum", "/system/xbin/clear",
"/system/xbin/cmp", "/system/xbin/cp", "/system/xbin/cpio",
"/system/xbin/cut", "/system/xbin/date", "/system/xbin/dc",
"/system/xbin/dd", "/system/xbin/depmod", "/system/xbin/devmem",
"/system/xbin/df", "/system/xbin/diff", "/system/xbin/dirname",
"/system/xbin/dmesg", "/system/xbin/dnsd", "/system/xbin/dos2unix",
"/system/xbin/du", "/system/xbin/echo", "/system/xbin/ed",
"/system/xbin/egrep", "/system/xbin/env", "/system/xbin/expr",
"/system/xbin/false", "/system/xbin/fdisk", "/system/xbin/fgrep",
"/system/xbin/find", "/system/xbin/fold", "/system/xbin/free",
"/system/xbin/freeramdisk", "/system/xbin/fuser", "/system/xbin/getopt",
"/system/xbin/grep", "/system/xbin/gunzip", "/system/xbin/gzip",
"/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
"/system/xbin/ifconfig", "/system/xbin/insmod", "/system/xbin/install",
"/system/xbin/ip", "/system/xbin/kill", "/system/xbin/killall",
"/system/xbin/killall5", "/system/xbin/length", "/system/xbin/less",
"/system/xbin/ln", "/system/xbin/losetup", "/system/xbin/ls",
"/system/xbin/lsmod", "/system/xbin/lspci", "/system/xbin/lsusb",
"/system/xbin/lzop", "/system/xbin/lzopcat", "/system/xbin/md5sum",
"/system/xbin/mkdir", "/system/xbin/mke2fs", "/system/xbin/mkfifo",
"/system/xbin/mkfs.ext2", "/system/xbin/mknod", "/system/xbin/mkswap",
"/system/xbin/mktemp", "/system/xbin/modprobe", "/system/xbin/more",
"/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/mv",
"/system/xbin/netstat", "/system/xbin/nice", "/system/xbin/nohup",
"/system/xbin/nslookup", "/system/xbin/ntpd", "/system/xbin/od",
"/system/xbin/patch", "/system/xbin/pgrep", "/system/xbin/pidof",
"/system/xbin/ping", "/system/xbin/pkill", "/system/xbin/printenv",
"/system/xbin/printf", "/system/xbin/ps", "/system/xbin/pwd",
"/system/xbin/rdev", "/system/xbin/readlink", "/system/xbin/realpath",
"/system/xbin/renice", "/system/xbin/reset", "/system/xbin/rm",
"/system/xbin/rmdir", "/system/xbin/rmmod", "/system/xbin/route",
"/system/xbin/run-parts", "/system/xbin/sed", "/system/xbin/seq",
"/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
"/system/xbin/sha256sum", "/system/xbin/sha512sum",
"/system/xbin/sleep", "/system/xbin/sort", "/system/xbin/split",
"/system/xbin/stat", "/system/xbin/strings", "/system/xbin/stty",
"/system/xbin/swapoff", "/system/xbin/swapon", "/system/xbin/sync",
"/system/xbin/sysctl", "/system/xbin/tac", "/system/xbin/tail",
"/system/xbin/tar", "/system/xbin/tee", "/system/xbin/telnet",
"/system/xbin/test", "/system/xbin/tftp", "/system/xbin/time",
"/system/xbin/top", "/system/xbin/touch", "/system/xbin/tr",
"/system/xbin/traceroute", "/system/xbin/true", "/system/xbin/tty",
"/system/xbin/tune2fs", "/system/xbin/umount", "/system/xbin/uname",
"/system/xbin/uniq", "/system/xbin/unix2dos", "/system/xbin/unlzop",
"/system/xbin/unzip", "/system/xbin/uptime", "/system/xbin/usleep",
"/system/xbin/uudecode", "/system/xbin/uuencode", "/system/xbin/vi",
"/system/xbin/watch", "/system/xbin/wc", "/system/xbin/wget",
"/system/xbin/which", "/system/xbin/whoami", "/system/xbin/xargs",
"/system/xbin/yes",
"/system/xbin/zcat");
symlink("iwmulticall", "/system/xbin/iwconfig", "/system/xbin/iwgetid",
"/system/xbin/iwlist", "/system/xbin/iwpriv",
"/system/xbin/iwspy");
symlink("toolbox", "/system/bin/cat", "/system/bin/cmp",
"/system/bin/date", "/system/bin/dd", "/system/bin/dmesg",
"/system/bin/getevent", "/system/bin/getprop", "/system/bin/hd",
"/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop",
"/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
"/system/bin/kill", "/system/bin/log", "/system/bin/lsmod",
"/system/bin/mkdir", "/system/bin/nandread", "/system/bin/netstat",
"/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
"/system/bin/ps", "/system/bin/reboot", "/system/bin/renice",
"/system/bin/rmdir", "/system/bin/rmmod", "/system/bin/route",
"/system/bin/schedtop", "/system/bin/sendevent",
"/system/bin/setconsole", "/system/bin/setprop", "/system/bin/sleep",
"/system/bin/smd", "/system/bin/start", "/system/bin/stop",
"/system/bin/sync", "/system/bin/top", "/system/bin/uptime",
"/system/bin/vmstat", "/system/bin/watchprops",
"/system/bin/wipe");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
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_recursive(0, 2000, 0755, 0750, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 0544, "/system/etc/install-recovery.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/hcitool");
set_perm(0, 0, 06755, "/system/xbin/librank");
set_perm(0, 0, 06755, "/system/xbin/procmem");
set_perm(0, 0, 06755, "/system/xbin/procrank");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/tcpdump");
show_progress(0.200000, 0);
show_progress(0.200000, 10);
package_extract_file("system/bin/verify_cache_partition_size.sh", "/tmp/verify_cache_partition_size.sh");
set_perm(0, 0, 0777, "/tmp/verify_cache_partition_size.sh");
run_program("/tmp/verify_cache_partition_size.sh");
show_progress(0.200000, 10);
ui_print("Copying zImage and initrd.gz...");
package_extract_dir("boot", "/boot");
show_progress(0.100000, 0);
unmount("/system");
unmount("/boot");
ui_print("All Done...");

BIN
tools/fastboot Executable file

Binary file not shown.

BIN
tools/mkbootimg Executable file

Binary file not shown.

@ -1,7 +1,11 @@
cat
chmod
chown
chownto
cmp
date
dd
df
dmesg
getevent
getprop
@ -13,17 +17,21 @@ insmod
ioctl
ionice
kill
ln
log
ls
lsmod
mkdir
mount
mv
nandread
netstat
newfs_msdos
notify
printenv
ps
reboot
renice
rm
rmdir
rmmod
route
@ -36,8 +44,9 @@ smd
start
stop
sync
toolbox
top
uptime
umount
vmstat
watchprops
wipe