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

Commit cfe658a0 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

adb-remount-test: do not brick devices that support overlayfs but do not use it

restore() should not run adb enable-verity if device does not
use overlayfs even though it supports it.

Test: adb-remount-test
Bug: 132070014
Change-Id: I55d0e1a87eca9c5f258a1587c844f2a6e4b13b29
parent d07ab7e5
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -963,6 +963,15 @@ D=`adb_sh df -k ${D} </dev/null |
echo "${D}"
if [ X"${D}" = X"${D##* 100[%] }" ] && ${no_dedupe} ; then
  overlayfs_needed=false
  # if device does not need overlays, then adb enable-verity will brick device
  restore() {
    ${overlayfs_supported} || return 0
    inFastboot &&
      fastboot reboot &&
      adb_wait ${ADB_WAIT}
    inAdb &&
      adb_wait ${ADB_WAIT}
  }
elif ! ${overlayfs_supported}; then
  die "need overlayfs, but do not have it"
fi