summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-06-19 03:27:37 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-06-26 01:57:41 +0200
commit56104cc6fa18347ca41df71eb87ae1a95b8302ce (patch)
treeaf0e2a1870ae7bb49cfb3c4a4ed8c0da61950aa0
parent88ea7c052750b11b8a8dff8f8074cdee13c98424 (diff)
downloadvendor_replicant-scripts-56104cc6fa18347ca41df71eb87ae1a95b8302ce.tar.gz
vendor_replicant-scripts-56104cc6fa18347ca41df71eb87ae1a95b8302ce.tar.bz2
vendor_replicant-scripts-56104cc6fa18347ca41df71eb87ae1a95b8302ce.zip
modem: setup.sh: fix adb push
Without that fix: - Copying the files to the device can fail with the following error: adb: error: failed to copy './device-files/modem.sh' to '/system/bin/modem.sh': remote Read-only file system This copying bug has been introduced by the following commit: ce8db3e networking: modem: setup.sh: use the same paths than Android.mk - using 'adb wait-for-device' instead of sleep 3 guarantees that the device is available and doesn't wait longer than necessary. - We re-set /system to read-only afterward and make sure that everything is written back to prevent any possible data corruption. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rwxr-xr-xnetworking/modem/setup.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/networking/modem/setup.sh b/networking/modem/setup.sh
index 0f4ce0b..8f943f5 100755
--- a/networking/modem/setup.sh
+++ b/networking/modem/setup.sh
@@ -1,5 +1,8 @@
#!/bin/sh
topdir=$(dirname $0)
adb root
-sleep 3
+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"