diff options
-rwxr-xr-x | networking/modem/setup.sh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/networking/modem/setup.sh b/networking/modem/setup.sh index 8f943f5..ba7a75c 100755 --- a/networking/modem/setup.sh +++ b/networking/modem/setup.sh @@ -1,8 +1,11 @@ #!/bin/sh topdir=$(dirname $0) -adb root -adb wait-for-device -adb remount -adb push "${topdir}/device-files/modem.sh" /system/bin/ -adb shell "mount -o remount,ro /system" -adb shell "sync" +adb root | grep "^root access" +ret="$?" +if [ "${ret}" -ne 0 ] ; then + adb wait-for-device + adb remount + adb push "${topdir}/device-files/modem.sh" /system/bin/ + adb shell "mount -o remount,ro /system" + adb shell "sync" +fi |