0

I am trying to write a script to automate some testing, and the fist step is connect to my device and update the /lib/modules/ directory with the recent version of a device driver on my host. That is I need to push the updated file from my host machine to the phone. Here is what I have:

#!/bin/sh
adb shell mount | grep -e "modules"
echo
adb shell "su -c 'mount -o remount, rw /lib/modules/'"
echo
adb shell mount | grep -e "modules"
echo

But the above does not work, and I do not know how to get more information about it. Here is the output I get: mount: Invalid argument I am also not able to update the phone with the most recent file.

  • The answer for me was to write to /sdcard and the copy the file to whatever destination you want. Since my phone is rooted, I can use a superuser command to move files from and to anywhere I want. – user3326293 Oct 1 '15 at 22:44
  • Try mount -o remount,rw /lib/modules without the space after the comma. – G-Man Oct 2 '15 at 0:09
  • I tried the above command, but I get the following error: root@hltespr:/ # mount -o remount,rw /lib/modules Usage: mount [-r] [-w] [-o options] [-t type] device directory – user3326293 Oct 2 '15 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.