replicant-vendor_replicant/addonsu/mount-system.sh
Gabriele M 5f124ae55b Add target to make a flashable su addon
Run 'make addonsu' to make a flashable zip to install the addon and
'make addonsu-remove' for a flashable zip that removes it.

Change-Id: I5b2fe67f98f2474b923c074dc6025b47c6db2ae0
2017-02-27 23:33:02 -05:00

14 lines
267 B
Bash

#!/sbin/sh
if mount /system; then
exit 0
fi
# Try to get the block from /etc/recovery.fstab
block=`cat /etc/recovery.fstab | cut -d '#' -f 1 | grep /system | grep -o '/dev/[^ ]*' | head -1`
if [ -n "$block" ] && mount $block /system; then
exit 0
fi
exit 1