2

I have a Samsung Galaxy Tab 2 (actually, many of them) and I need to regularly push some files inside the external physically removable SD card of my tablets.

Android handles internal and external storage as follows:

/storage
  ├ emulated/0/ /* this is the internal storage partition */
  └ 9102-ABF4 /* this is the external removable SD card partition */

I thought I could find this path by browsing to the folder which is not named /emulated inside /storage since the other one is the one I want.

I want, using device's shell through adb, to navigate to (using command cd) a directory that I don't know the path of (9102-ABF4 written above, located inside /storage/)

5
  • what is your question? cd /storage/????-?????
    – alecxs
    Aug 14, 2019 at 10:44
  • @alecxs I want, using device's shell through adb, go (using command cd) inside a directory that I don't know (9102-ABF4 written above, located inside /storage)
    – puffo
    Aug 14, 2019 at 10:48
  • 1
    @puffo The command alecxs presented to you does exactly what you want to do: cd into a directory the name you don't know (but you know the pattern of the directory name). Just try it out.
    – Robert
    Aug 14, 2019 at 17:33
  • 1
    @alecxs You should make an answer from your comment. Using wildcards with cd is a nice trick especially as it should work perfectly for all sd-cards as the pattern is always the same.
    – Robert
    Aug 15, 2019 at 12:55
  • @Robert i am afraid the question is off-topic so i won't answer - besides this it's not worth it because that are basics in shell coding ;)
    – alecxs
    Aug 15, 2019 at 13:02

1 Answer 1

0

I don't believe adb shell supports tab completion. If make reference to a directory in a command, but don't know the path you will need to use adb shell ls command to list the directory before using the path in an adb push command. For example, adb shell ls storage/9102-ABF4 will let you explore the external SD card that is on your device.

In terms of changing the working directory on your terminal, I don't believe you can do this because adb does not support interactive mode like nslookup. You are using a shell (adb shell) within a shell (bash, PowerShell, cmd, etc).

You must log in to answer this question.

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