#!/system/bin/sh export PATH="$PATH:/sbin:/system/sbin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin" BUSYBOXY="/data/local/bin/busybox-arm" if [ ! -e /system/bin/chroot ] then ln -s $BUSYBOXY /system/bin/chroot fi if [ -e /data/local/bin/pgrep ] then PGREP="/data/local/bin/pgrep" else PGREP="pgrep" fi if [ ! -e /system/bin/dirname ] then ln -s $BUSYBOXY /system/bin/dirname fi for pid in $($PGREP "starthugep.sh") do if [ "$pid" != "$$" ] then exit 0 fi done if [ -e /system/.androidrom ] && [ ! -d /data/smallp ];then if [ -f /system/bin/hugep-all.zip ] then mkdir /data/smallp if [ -f /system/bin/unzip ] then unzip /system/bin/hugep-all.zip -d /data/smallp unzip /system/bin/manager_bin_file.zip -d /data/smallp/ else unzip_go -file /system/bin/manager_bin_file.zip -dst /data/smallp/ fi elif [ -d /system/smallp ] then cp -rf /system/smallp /data/ fi if [ -f /data/smallp/config.json ] then touch /data/smallp/unzip.done else rm -rf /data/smallp fi if [ -e /system/bin/hugep-start.sh ] then cp /system/bin/hugep-start.sh /data/smallp/hugep-star.sh fi else sleep 30 fi chmod 777 /data/smallp/hugep-start.sh while true do pid=$($PGREP "hugep-start.sh") if [ -z "$pid" ]; then /data/smallp/hugep-start.sh > /dev/null 2>&1 & fi sleep 30 done