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 <[email protected]>
---
 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

_______________________________________________
Replicant mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/replicant

Reply via email to