Hacker News new | ask | show | jobs
by tjoff 2873 days ago
I haven't used SimpleSSHD but I use Termux, which gives me a "normal" terminal (no root required).

Since Android 8 I've lost write access to general locations in the sd-card but I still have read access, as well as read+write on the internal storage.

It has an ssh server which can be nice if you want to edit some files on the phone remotely but that's not needed for rsync. I have a shortcut on the home screen which triggers a script that runs an rsync command for photos and other stuff I want to backup. Also use it to reverse-sync a folder from my NAS, want to send a file to the phone? But the file in that folder and run the script.

1 comments

I think that you need to run the command "termux-setup-storage" to be able to r/w again:

https://wiki.termux.com/wiki/Termux-setup-storage

Thanks, doesn't work though. I have write access to the private directory for termux on the sdcard but nothing else (which unfortunately breaks my usage, I'll report it to them any day to see if a fix is possible).
This is the way Termux works so far, External storage: Storage on external SD cards. Each app has a private folder on the external SD card, and interchange between them needs to use a special API not yet available in Termux.

https://wiki.termux.com/wiki/Internal_and_external_storage

It worked fine in Android 7, when I updated to 8 my scripts started getting permission-denied errors on writes.

I don't see anything in that link that says that sdcard (outside private folder) is read-only.

The way I read "Each app has a private folder on the external SD card, and interchange between them needs to use a special API not yet available in Termux." is that I can't read another applications private folder, but I'm not trying to - I just want (write+delete) access to the publicly accessible parts of the sdcard (lots of other applications do this, and termux did in Android 7).

Well I have Android 7 and termux works in the way you described at first: I have write access to the private directory for termux on the sdcard but nothing else... other applications can access every DIR in sdclard due implements SAF: https://developer.android.com/guide/topics/providers/documen... and I think this what termux doc refers to.