diff --git a/make.sh b/make.sh index 670d6e2..c01a439 100755 --- a/make.sh +++ b/make.sh @@ -1,2 +1,2 @@ -cross rustc --target armv7-unknown-linux-gnueabihf -- -C target-feature=+crt-static -adb push target/armv7-unknown-linux-gnueabihf/debug/diag /tmp/diag +cargo build +adb push target/armv7-unknown-linux-gnueabihf/debug/wavehunter /tmp/wavehunter diff --git a/scripts/misc-daemon b/scripts/misc-daemon new file mode 100644 index 0000000..4181f5a --- /dev/null +++ b/scripts/misc-daemon @@ -0,0 +1,102 @@ +#!/bin/sh + +set -e + +case "$1" in + start) + echo -n "Starting miscellaneous daemons: " + search_dir="/sys/bus/msm_subsys/devices/" + for entry in `ls $search_dir` + do + subsys_temp=`cat $search_dir/$entry/name` + if [ "$subsys_temp" == "modem" ] + then + break + fi + done + counter=0 + while [ ${counter} -le 10 ] + do + msstate=`cat $search_dir/$entry/state` + if [ "$msstate" == "ONLINE" ] + then + break + fi + counter=$(( $counter + 1 )) + sleep 1 + done + + if [ -f /etc/init.d/init_qcom_audio ] + then + /etc/init.d/init_qcom_audio start + fi + + if [ -f /sbin/reboot-daemon ] + then + /sbin/reboot-daemon & + fi + + if [ -f /etc/init.d/start_atfwd_daemon ] + then + /etc/init.d/start_atfwd_daemon start + fi + + if [ -f /etc/init.d/wavehunter_daemon ] + then + /etc/init.d/wavehunter_daemon start + fi + + if [ -f /etc/init.d/start_stop_qti_ppp_le ] + then + /etc/init.d/start_stop_qti_ppp_le start + fi + + if [ -f /etc/init.d/start_loc_launcher ] + then + /etc/init.d/start_loc_launcher start + fi + + echo -n "Completed starting miscellaneous daemons" + ;; + stop) + echo -n "Stopping miscellaneous daemons: " + + + if [ -f /etc/init.d/start_atfwd_daemon ] + then + /etc/init.d/start_atfwd_daemon stop + fi + + if [ -f /etc/init.d/start_loc_launcher ] + then + /etc/init.d/start_loc_launcher stop + fi + + if [ -f /etc/init.d/wavehunter_daemon ] + then + /etc/init.d/wavehunter_daemon stop + fi + + if [ -f /etc/init.d/init_qcom_audio ] + then + /etc/init.d/init_qcom_audio stop + fi + + if [ -f /etc/init.d/start_stop_qti_ppp_le ] + then + /etc/init.d/start_stop_qti_ppp_le stop + fi + + echo -n "Completed stopping miscellaneous daemons" + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage misc-daemon { start | stop | restart}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/scripts/wavehunter_daemon b/scripts/wavehunter_daemon new file mode 100644 index 0000000..92f7d4a --- /dev/null +++ b/scripts/wavehunter_daemon @@ -0,0 +1,26 @@ +#! /bin/sh + +set -e + +case "$1" in +start) + echo -n "Starting wavehunter: " + start-stop-daemon -S -b -a /data/wavehunter + echo "done" + ;; + stop) + echo -n "Stopping wavehunter: " + start-stop-daemon -K -n /data/wavehunter + echo "done" + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage atfwd_daemon{ start | stop | restart }" >&2 + exit 1 + ;; +esac + +exit 0