Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not handle multiple devices #54

Open
jdtimmerman opened this issue Aug 25, 2021 · 1 comment
Open

Does not handle multiple devices #54

jdtimmerman opened this issue Aug 25, 2021 · 1 comment

Comments

@jdtimmerman
Copy link

Adbfs does not know how to handle multiple connected devices.

joost@laptop: ~ $ mkdir droid          

joost@laptop: ~ $ ls -l | grep droid
drwxr-xr-x  2 joost joost      4096 25 aug 10:45 droid

joost@laptop: ~ $ adb devices
List of devices attached
XXX	device
YYY	device

joost@laptop: ~ $ adbfs ~/droid
--*-- exec_command: adb shell "ls"
adb: more than one device/emulator

It does however tries to mount something, making the ~/droid directory inaccessible.

joost@laptop: ~ $ ls -l | grep droid
ls: cannot access 'droid': No such file or directory
d?????????  ? ?     ?             ?            ? droid

joost@laptop: ~ $ mount | grep droid
adbfs on /home/joost/droid type fuse.adbfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

I cannot find a flag in the adbfs --help to select the device (like adb's -s-flag). Through reading the adb --help, however, i did learn about the existence of the $ANDROID_SERIAL variable. Using this also applies to adbfs and i was able to mount my device correctly.

joost@laptop: ~ $ ANDROID_SERIAL=XXX adbfs ~/droid
--*-- exec_command: adb shell "ls"

joost@laptop: ~ $ ls ~/droid
acct  bin         config  data           default.prop  etc         mnt  oem   product  sdcard   sys     system_ext
apex  bugreports  d       debug_ramdisk  dev           lost+found  odm  proc  res      storage  system  vendor

So there are two parts to this issue-report:

  • Prevent/undo the mounting things upon an error; to prevent the mount-directory to become inaccessible
  • Either support a device-flag or document the usage of $ANDROID_SERIAL
@Mannshoch
Copy link

ping @spion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants