Christopher N. Hesse | 1f94c93 | 2018-06-11 21:56:24 +0200 | [diff] [blame] | 1 | #!/sbin/sh |
| 2 | |
| 3 | # Modern devices use /system as root ("/") |
| 4 | system_as_root=`getprop ro.build.system_root_image` |
| 5 | if [ "$system_as_root" == "true" ]; then |
Michael Bestas | 79e91fe | 2019-02-11 19:04:11 +0200 | [diff] [blame] | 6 | if umount /system_root; then |
Christopher N. Hesse | 1f94c93 | 2018-06-11 21:56:24 +0200 | [diff] [blame] | 7 | exit 0 |
| 8 | fi |
Michael Bestas | 79e91fe | 2019-02-11 19:04:11 +0200 | [diff] [blame] | 9 | else |
| 10 | if umount /system; then |
Christopher N. Hesse | 1f94c93 | 2018-06-11 21:56:24 +0200 | [diff] [blame] | 11 | exit 0 |
Michael Bestas | 79e91fe | 2019-02-11 19:04:11 +0200 | [diff] [blame] | 12 | fi |
Christopher N. Hesse | 1f94c93 | 2018-06-11 21:56:24 +0200 | [diff] [blame] | 13 | fi |
| 14 | |
| 15 | exit 1 |