[Replicant] [replicant-scripts][PATCH 7/8] modem: setup.sh: fix adb push
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Fri Jun 19 04:08:48 UTC 2020
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
- 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 at cyberdimension.org>
---
networking/modem/setup.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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"
--
2.27.0
More information about the Replicant
mailing list