Walter,

On Wednesday, 2024-05-15 17:28:46 -0400, you wrote:

>   What I *CAN* do... upload/download/create/delete *FILES* on SD card
> 
>   What I *CANNOT* do... create new *DIRECTORIES* on SD card
> 
> [x8940][waltdnes][~/tablet/sdcard1] mkdir data
> mkdir: cannot create directory ‘data’: Input/output error
> 
>   This happens with both "jmtps" and "simple-mtpfs", so I think it's
> probably a systemic issue that affects all implementions.

Though I also have "simple-mtpfs" installed I'm mostly using it with the
SD cards mounted read-only.  For "real" work I'm using "adb" provided by
"dev-util/android-tools".  Among many other things like pushing files to
or pulling files from your mobile phone,  it provides a "shell" sub-com-
mand which allows executing a single shell command  on the mobile device
or opening a shell on it for issuing more commands in a row:

   $ adb shell
   herolte:/ $ cd /storage/emulated/0
   herolte:/storage/emulated/0 $ ls -ld .
   drwxrwx--x 27 root sdcard_rw 4096 2024-05-16 08:01 .
   herolte:/storage/emulated/0 $ touch xxx
   herolte:/storage/emulated/0 $ ls -l xxx
   -rw-rw---- 1 root sdcard_rw 0 2024-05-16 16:13 xxx
   herolte:/storage/emulated/0 $ mkdir yyy
   herolte:/storage/emulated/0 $ ls -ld yyy
   drwxrwx--x 2 root sdcard_rw 4096 2024-05-16 16:13 yyy
   herolte:/storage/emulated/0 $ rmdir yyy
   herolte:/storage/emulated/0 $ rm xxx
   herolte:/storage/emulated/0 $ cd /storage/5BC5-805B
   herolte:/storage/5BC5-805B $ ls -ld .
   drwxrwx--x 7 root sdcard_rw 32768 2024-02-21 20:20 .
   herolte:/storage/5BC5-805B $ touch xxx
   herolte:/storage/5BC5-805B $ ls -l xxx
   -rwxrwx--x 1 root sdcard_rw 0 2024-05-16 16:14 xxx
   herolte:/storage/5BC5-805B $ mkdir yyy
   herolte:/storage/5BC5-805B $ ls -ld yyy
   drwxrwx--x 2 root sdcard_rw 32768 2024-05-16 16:15 yyy
   herolte:/storage/5BC5-805B $ rmdir yyy
   herolte:/storage/5BC5-805B $ rm xxx
   herolte:/storage/5BC5-805B $ exit

Three additional remarks:

- The mobile phone is not required to be rooted.

- But to get "adb" working requires "USB Debugging" to be enabled on the
  mobile device.   On your mobile  device this option can be found under
  "Settings -> Developer Options" (if the "Developer Options"  are still
  hidden in the "Settings" menu,  make them visible  once and forever by
  opening "Settings -> About Device -> Software Information" and tapping
  "Build Number" seven times).

- For security reasons (for instance  when charging your phone at a pub-
  lic charging station)  you should only enable  "USB Debugging" on your
  own phone while connecting it with your own computer for file transfer
  or similar work.

Sincerely,
  Rainer

Reply via email to