Advertisement
v1ral_ITS

debug until.sh

Mar 30th, 2019
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.62 KB | None | 0 0
  1. #!/system/bin/sh
  2. #
  3. # zte debug util
  4. #BINDIR=/system/bin
  5. #cd $BINDIR
  6. #ln -s busybox [ > /dev/null 2>&1
  7. #ln -s busybox test > /dev/null 2>&1
  8. ###########command lists#############
  9. CMD_ENTERDOWNLOAD="enterdload"
  10. CMD_ONEKEYLOGENABLE="enablelog"
  11. CMD_ONEKEYLOGDISABLE="disablelog"
  12. CMD_REBOOT="reboot"
  13. CMD_PERFORMANCE="performance"
  14. #####################################
  15. echo "============debug util init==========="
  16. utilpara=`getprop sys.zte.debugutil.data`
  17. if busybox [ "$utilpara" == "" ];then  
  18.     echo "debugutil not get any parameters, abort."
  19. fi
  20. if busybox [ "$utilpara" == "$CMD_ENTERDOWNLOAD" ];then
  21.     echo "cmd $utilpara starting..."
  22.     setprop persist.sys.dlctrl 1
  23.     echo "set download mode done!"
  24.     sleep 1
  25.     echo "sysrq-triggersystem will cause reboot soon!"
  26.     echo c > /proc/sysrq-trigger
  27.     sleep 1    
  28. fi
  29. if busybox [ "$utilpara" == "$CMD_ONEKEYLOGENABLE" ];then  
  30.     echo "cmd $utilpara starting..."
  31.     setprop persist.sys.dlctrl 1
  32.     setprop persist.sys.ztelog.enable 1
  33.     echo "set ztelog enable done." 
  34.     sleep 1
  35.     echo "zte log full enable need resetart, executing reboot..."
  36.     reboot 
  37. fi
  38. if busybox [ "$utilpara" == "$CMD_ONEKEYLOGDISABLE" ];then 
  39.     echo "cmd $utilpara starting..."
  40.     setprop persist.sys.dlctrl 0
  41.     setprop persist.sys.ztelog.enable 0
  42.     echo "set ztelog disable done."
  43.     sleep 1
  44.     echo "zte log full disable need resetart, executing reboot..."
  45.     reboot 
  46. fi
  47. if busybox [ "$utilpara" == "$CMD_REBOOT" ];then   
  48.     echo "cmd $utilpara starting..."   
  49.     reboot
  50. fi
  51.  
  52. if busybox [ "$utilpara" == "$CMD_PERFORMANCE" ];then  
  53.     echo "cmd $utilpara starting..."   
  54.     /system/bin/performance1&
  55.     /system/bin/performance2&
  56. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement