I connect my Moto G Pure phone to my laptop (running NixOS) using the charging cable of the phone, with the phone turned on and with it turned off. In both cases, the phone doesn't show up in the output of lsblk in my laptop, so I can't mount it. (In contrast, when I connect another Kyocera Android phone to my laptop, it is shown up in lsblk output.) How can I transfer files between the phone and my laptop, using USB connection?

When the phone is on, upon connecting it to my laptop, the phone notifies me "USB debugging connected: Tap to turn off USB debugging", and when I tap the notification, it says "Please enable developer options first". What does the phone mean by the two messages, and how shall I follow them?



I run SimpleSSHD app on the phone and connect to it from my laptop. I wonder where I can find the "Download" directory? It seems that I can only access directories and files within the working directory for SimpleSSHD.

$ ssh -p 2222
The authenticity of host '[]:2222 ([]:2222)' can't be established.
ED25519 key fingerprint is SHA256:/DnSdeb9tCgbi2sUD2M57HgZc8R0IDvRs8mWCG7ou/A.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[]:2222' (ED25519) to the list of known hosts.
[email protected]'s password: 
:/data/user/0/org.galexander.sshd/files $ ls
dropbear.err  dropbear.pid  dropbear_ed25519_host_key
:/data/user/0/org.galexander.sshd/files $ cd ../
:/data/user/0/org.galexander.sshd $ cd ..
:/data/user/0 $ cd ..
:/data/user $ ls
ls: .: Permission denied
1|:/data/user $ sudo ls
sh: sudo: inaccessible or not found
127|:/data/user $ cd ..
:/data $ ls
ls: .: Permission denied
1|:/data $ ls /
ls: /: Permission denied
1|:/data $ su root
sh: su: inaccessible or not found
127|:/data $ cd user
:/data/user $ ls
ls: .: Permission denied
1|:/data/user $ cd 0
:/data/user/0 $ ls
ls: .: Permission denied
1|:/data/user/0 $ cd org.gal*
sh: cd: /data/user/0/org.gal*: No such file or directory
2|:/data/user/0 $ cd org.galexander.sshd                                                       :/data/user/0/org.galexander.sshd $ ls
cache  code_cache  files  lib  shared_prefs
:/data/user/0/org.galexander.sshd $ ls *


dropbear.err  dropbear.pid  dropbear_ed25519_host_key

libbuffersu.so  librsync.so  libscp.so  libsftp-server.so  libsimplesshd-jni.so


I also have permission problem to access the working directory of the sshd app using a terminal emulator on the phone

:/ $ cd /data/user/0/org.galexander.sshd/files
/system/bin/sh: cd: /data/user/0/org.galexander.sshd/files: Permission denied
2|:/ $ cd /data
:/data $ cd user
:/data/user $ ls
ls: .: Permission denied
1|:/data/user $ cd 0
:/data/user/0 $ ls
ls: .: Permission denied
1|:/data/user/0 $ cd org.galexander.sshd
/system/bin/sh: cd: /data/user/0/org.galexander.sshd: Permission denied
2|:/data/user/0 $

1 Answer 1


This is an answer to the Title (problem X), not the Body (problem Y), of the question.

You might consider installing SSHelper on your device. This allows the usual scp and rsync commands to work, as well as providing a handy ssh console session.

It also allows you to do it all via wi-fi, without the physical USB connection.

See How to rsync to android - Ask Ubuntu.

  • Thanks. See my update. I don't have permission to access files and directories outside the working directory of the SSHD server app. I don't have this problem with a Kyocera Hydro Icon phone.
    – Tim
    Commented Apr 18, 2022 at 1:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .