Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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.

I have updated my original post and the answer. I hope that helps explain how I resolved the issue, and perhaps shed light on what is outstanding.

share|improve this question
    
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 at 22:44
    
Try mount -o remount,rw /lib/modules without the space after the comma. –  G-Man Oct 2 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 at 18:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.