Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a691c5be authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "envsetup.sh: add 'syswrite' function" am: cecc6440 am: 729f5600

Original change: https://android-review.googlesource.com/c/platform/build/+/1423411

Change-Id: I53eacb50d02b60e90ee0fc30498770664b0d44d5
parents 7638aecf 729f5600
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y
- gomod:      Go to the directory containing a module.
- pathmod:    Get the directory containing a module.
- refreshmod: Refresh list of modules for allmod/gomod/pathmod.
- syswrite:   Remount partitions (e.g. system.img) as writable, rebooting if necessary.

Environment options:
- SANITIZE_HOST: Set to 'address' to use ASAN for all host modules.
@@ -857,6 +858,18 @@ function qpid() {
    fi
}

# syswrite - disable verity, reboot if needed, and remount image
#
# Easy way to make system.img/etc writable
function syswrite() {
  adb wait-for-device && adb root || return 1
  if [[ $(adb disable-verity | grep "reboot") ]]; then
      echo "rebooting"
      adb reboot && adb wait-for-device && adb root || return 1
  fi
  adb wait-for-device && adb remount || return 1
}

# coredump_setup - enable core dumps globally for any process
#                  that has the core-file-size limit set correctly
#