Yes: it looks like it should be, and thanks for that reference, which I knew nothing about & haven’t seen anywhere else. But no, it is not “available” to the shell user:
$ adb unroot
restarting adbd as non root
$ adb shell
emerald:/ $ cd /mnt
emerald:/mnt $ ls -l
total 0
drwxr-x--- 3 root media_rw 60 2023-01-01 14:43 androidwritable
drwx--x--x 2 root root 40 2023-01-01 14:43 appfuse
d????????? ? ? ? ? ? asec
d--------- 2 system system 40 2023-01-01 14:43 cd-rom
drwxrwx--x 2 system system 40 2023-01-01 14:43 expand
drwxr-x--- 3 root media_rw 60 2023-01-01 14:43 installer
d????????? ? ? ? ? ? media_rw
drwxr-xr-x 2 root system 40 2023-01-01 14:43 obb
d????????? ? ? ? ? ? pass_through
d????????? ? ? ? ? ? product
drwx------ 6 root root 120 2023-01-01 14:43 runtime
l????????? ? ? ? ? ? sdcard -> ?
drwx------ 3 root root 60 2023-01-01 14:43 secure
drwxr-x--- 3 root media_rw 60 2023-01-01 14:43 user
d????????? ? ? ? ? ? vendor
emerald:/mnt $ cd media_rw
/system/bin/sh: cd: /mnt/media_rw: Permission denied
2|emerald:/mnt $ ls media_rw
ls: media_rw: Permission denied
It is more accessible as root
but still can’t create files there: it sometimes works but then the files don’t show up on directory listing (there are too many odd results to include all of them here). Whatever is at this mount point, it’s not a “normal” filesystem and doesn’t behave like implementations of fuse
that I’ve seen. Here’s one round:
26:matangi$ adb root
restarting adbd as root
27:matangi$ adb shell
emerald:/ # cd /mnt
emerald:/mnt # ls -l
drwxr-x--- 3 root media_rw 60 2023-01-01 14:43 androidwritable
drwx--x--x 2 root root 40 2023-01-01 14:43 appfuse
drwxr-xr-x 2 root system 40 2023-01-01 14:43 asec
d--------- 2 system system 40 2023-01-01 14:43 cd-rom
drwxrwx--x 2 system system 40 2023-01-01 14:43 expand
drwxr-x--- 3 root media_rw 60 2023-01-01 14:43 installer
drwxr-x--- 4 root external_storage 80 2023-01-02 15:35 media_rw
drwxr-xr-x 2 root system 40 2023-01-01 14:43 obb
drwx------ 3 root root 60 2023-01-01 14:43 pass_through
drwxr-xr-x 2 root root 40 2023-01-01 14:43 product
drwx------ 6 root root 120 2023-01-01 14:43 runtime
lrwxrwxrwx 1 root root 21 2023-01-01 14:43 sdcard -> /storage/self/primary
drwx------ 3 root root 60 2023-01-01 14:43 secure
drwxr-x--- 3 root media_rw 60 2023-01-01 14:43 user
drwxr-xr-x 8 root root 160 2023-01-01 14:43 vendor
emerald:/mnt/media_rw/5D04-1F04 # mkdir foodir
mkdir: 'foodir': File exists
/* ('foodir' was created as a directory in a previous test & doesn't even show up in 'ls' */
1|emerald:/mnt/media_rw/5D04-1F04 # mkdir Test
mkdir: 'Test': I/O error
1|emerald:/mnt/media_rw/5D04-1F04 # cd Music
emerald:/mnt/media_rw/5D04-1F04/Music # mkdir Test
mkdir: 'Test': Read-only file system
The subdirectories androidwritable
and user
sound promising but neither of them are accessible either (nor can the shell
user access them), including even stranger results:
emerald:/mnt/user/0/5D04-1F04 # touch foofile
emerald:/mnt/user/0/5D04-1F04 # ls -l
drwxrwx--- 2 root everybody 32768 2022-08-07 23:30 Alarms
drwxrwx--- 4 root everybody 32768 2022-11-24 19:41 Android
drwxrwx--- 2 root everybody 32768 2022-08-07 23:30 Audiobooks
drwxrwx--- 2 root everybody 32768 2022-08-07 23:30 DCIM
drwxrwx--- 2 root everybody 32768 2023-01-02 15:37 Documents
drwxrwx--- 2 root everybody 32768 2022-08-07 23:30 Download
drwxrwx--- 2 root everybody 32768 2022-08-07 23:30 LOST.DIR
drwxrwx--- 3 root everybody 32768 2022-08-07 23:30 Movies
drwxrwx--- 3 root everybody 32768 2023-01-01 14:43 Music
drwxrwx--- 2 root everybody 32768 2022-08-07 23:30 Notifications
drwxrwx--- 3 root everybody 32768 2022-08-07 23:30 Pictures
drwxrwx--- 2 root everybody 32768 2022-08-07 23:30 Podcasts
drwxrwx--- 2 root everybody 32768 2022-08-07 23:30 Ringtones
/* (it's not there) */
emerald:/mnt/user/0/5D04-1F04 # rm foofile
rm: foofile: Math result not representable
/* ???!!! */
We are back to my original question then: how does a shell user write to the SD card? Maybe some details from someone who has done it? Some further detail:
thanks: generally helpful to know it works there, but the above is on the R dev build. As reported in the link in the OP, Google has long been locking down these things progressively in successive Android versions. How has the /e/OS team responded to that? (at least with some workarounds I hope)
I hate having to repeat this but I need a shell user to write to the SD card. The phone supports memory cards, users, and SSH… and there’s no reason why we shouldn’t be allowed to write to the removable SD card. I won’t accept Google’s obvious pressure to herd all people’s personal data into application management. I’m grateful to know about better-adb-sync but it’s outside the scope of this question.