Advertisement
v1ral_ITS

charter_monitor.sh

Mar 30th, 2019
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.41 KB | None | 0 0
  1. #!/system/bin/sh
  2.  
  3. # Move from init.qcom.sh
  4. # Check if download mode is enabled; // changed from 8974 shilinfeng
  5. # 0 means disable;1 means enable
  6. # default is zero=disable download, but in eng mode as below: defualt dlctrl is NULL, so the value will keep in code enabled status
  7. #
  8. zte_user_eng_status=`getprop ro.secure`
  9. dlctrl=`getprop persist.sys.dlctrl`
  10.  
  11. case "$zte_user_eng_status" in
  12.   "0")
  13.         case "$dlctrl" in
  14.              "1")
  15.                  echo 1 > /sys/module/restart/parameters/download_mode;;
  16.              "0")
  17.                  echo 0 > /sys/module/restart/parameters/download_mode;;
  18.         esac
  19.         ;;
  20.   "1")
  21.         case "$dlctrl" in
  22.              "1")
  23.                  echo 1 > /sys/module/restart/parameters/download_mode;;
  24.              *)
  25.                  echo 0 > /sys/module/restart/parameters/download_mode;;
  26.         esac
  27.         ;;
  28. esac
  29.  
  30. #
  31. # Start Charge_Monitor with iusbmax parameter
  32. #
  33. name=`getprop ro.product.name`
  34.  
  35. case "$name" in
  36.     "zte_warp5")
  37.         /system/bin/charger_monitor qpnp_charger 300000 0
  38.         ;;
  39.     "P892A12")
  40.         /system/bin/charger_monitor qpnp_charger 300000 0
  41.         ;;
  42.         "P892U12")
  43.                 /system/bin/charger_monitor qpnp_charger 300000 0
  44.                 ;;
  45.                 "P892R30")
  46.                         /system/bin/charger_monitor qpnp_charger 300000 0
  47.                         ;;
  48.     *)
  49.         /system/bin/charger_monitor qpnp_charger 400000 50
  50.         ;;
  51. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement