Hi to all guys i'm developing a new rom and i'd like to put an executable script in it. I'm not very goot at bash,but you can help me. Here it is:
It's all ok? Please answer me,in my last three topics nobody answered me.
Code:
Welcome to openOptimus modding script!
echo Choose an option:
echo 1.Change boot animation
echo 2.Disable/enable Stagefright player
echo 3.Enable/disable Hardware acceleration
echo 4.Check Wi-Fi Tx-Power
read -p "Change boot animation" choice
read -p "Disable/enable Stagefright player" choice
read -p "Enable/disable Hardware acceleration" choice
read -p "Enable/disable Hardware acceleration" choice
read -p "Check Wi-Fi Tx-Power" choice
if test "$choice" == "1"
then
goto bootanim
fi
if test "$choice" == "2"
then
goto stagefright
fi
if test "$choice" == "3"
then
goto hwacc
fi
if test "$choice" == "4"
then
echo You need to run this only if you have Wi-Fi on!
iwconfig wlan0
fi
:bootanim
echo *********************************************************
echo * Boot animation changer *
echo *********************************************************
echo Please choose one:
echo 1.Megatron boot animation
echo 2.Android particles
echo 3.CyanogenMod 7
echo 4.Coin
read -p "Megatron boot animation" bootchoice
read -p "Android particles" bootchoice
read -p "CyanogenMod 7" bootchoice
read -p "Coin" bootchoice
if test "$bootchoice" == "1"
then
busybox cp /sdcard/openOptimus_resources/Megatron/bootanimation.zip /data/local
echo Boot animation copied.
if test "$bootchoice" == "2"
then
busybox cp /sdcard/openOptimus_resources/Particles/bootanimation.zip /data/local
echo Boot animation copied.
if test "$bootchoice" == "3"
then
busybox cp /sdcard/openOptimus_resources/CM7/bootanimation.zip /data/local
echo Boot animation copied.
fi
if test "$bootchoice" == "4"
then
busybox cp /sdcard/openOptimus_resources/Coin/bootanimation.zip /data/local
echo Boot animation copied.
fi
:stagefright
Stagefright player enabler/disabler
echo Please choose an option:
echo 1.Enable Stagefright player
echo 2.Disable stagefright player
read -p "Enable Stagefright player" stagefright
read -p "Disable stagefright player" stagefright
if test "$stagefright" == "1"
then
busybox cp /sdcard/openOptimus_resources/Stagefright2/build.prop /system
echo Stagefright player enabled.
fi
if test "$stagefright" == "2"
then
busybox cp /sdcard/openOptimus_resources/Stagefright2/build.prop /system
echo Stagefright player disabled.
fi
:hwacc
echo
echo Hardware acceleration enabler/disabler
echo WARNING:This disables/enables Hwacc,but enables stagefright
echo
echo Please choose an option:
echo 1.Enable Hardware acceleration
echo 2.Disable Hardware acceleration
read -p "Enable Hardware acceleration" hwacc
read -p "Disable Hardware acceleration" hwacc
if test "$hwacc" == "1"
then
busybox cp /sdcard/openOptimus_resources/Hwacc1/build.prop /system
echo Hardware acceleration enabled.
fi
if test "$hwacc" == "2"
then
busybox cp /sdcard/openOptimus_resources/Hwacc2/build.prop /system
echo Hardware acceleration disabled.
fi