#!/system/bin/sh

if ls /root >/dev/null 2>/dev/null
then
	/sh_tmp/busybox mkdir /sqlite_journals/is01root
	/sh_tmp/busybox cp /sh_tmp/su /sqlite_journals/is01root/
	/sh_tmp/busybox cp /sh_tmp/busybox /sqlite_journals/is01root/
	/sh_tmp/busybox cp /sh_tmp/boot.sh /sqlite_journals/is01root/

	/sh_tmp/busybox cp /sh_tmp/autoexec.sh /sqlite_journals/is01root/
	/sh_tmp/busybox cp /sh_tmp/_su /sqlite_journals/is01root/
	/sh_tmp/busybox cp /sh_tmp/libril-wrapper.so /sqlite_journals/is01root/
	/sh_tmp/busybox cp /sh_tmp/msm_nand_ex.ko /sqlite_journals/is01root/

	/sh_tmp/busybox cp /sh_tmp/sysremount_atmyownrisk.sh /sqlite_journals/is01root/

	chown root.root /sqlite_journals/is01root/su
	chown root.root /sqlite_journals/is01root/_su
	chmod 6755 /sqlite_journals/is01root/su
	chmod 6755 /sqlite_journals/is01root/_su

	/sh_tmp/busybox cat /sh_tmp/local.prop >/data/local.prop

	echo "Completed. please reboot the system!"

else
	/sh_tmp/rageagainstthecage

	while :
	do
		if ls / >/dev/null 2>/dev/null
			then echo "Wait.."
			else break
		fi
		sleep 1
	done

	echo "Shut down terminal and reexecute this script!"
fi

exit 0
