syswrite ‐ disable verity, reboot if needed, and remount - Dieptranivsr/DroneIVSR GitHub Wiki

function syswrite() {
  adb wait-for-device && adb root || return 1
  if [ $(adb disable-verity ](/Dieptranivsr/DroneIVSR/wiki/grep-"reboot")-); then
      echo "rebooting"
      adb reboot && adb wait-for-device && adb root || return 1
  fi
  adb wait-for-device && adb remount || return 1
}
function remountAndroid() {
  adb wait-for-device && adb root || return 1
  if [ $(adb disable-verity ](/Dieptranivsr/DroneIVSR/wiki/grep-"reboot")-); then
      echo "rebooting ..."
      adb reboot && adb wait-for-device && adb root || return 1
  fi
  adb wait-for-device && adb remount || return 1
}