Where to find the directory of a attached mobile phone ?

27 views
Skip to first unread message

A

unread,
Feb 28, 2020, 3:01:04 PM2/28/20
to qubes-users
I have attached my mobile phone to a VM, but can’t find its directory in the file manager of that VM.

Where shall I look to find it ?

dhorf-hfre...@hashmail.org

unread,
Feb 28, 2020, 3:07:29 PM2/28/20
to A, qubes-users
On Fri, Feb 28, 2020 at 12:01:04PM -0800, A wrote:
> I have attached my mobile phone to a VM, but can’t find its directory
> in the file manager of that VM.

in which way did you attach it?
do qvm-block or qvm-usb show it as attached to the right vm?
does it show up in /proc/partitions or lsusb in the target vm?

and does whatever you are trying to do work in sys-usb?



A E

unread,
Feb 28, 2020, 4:02:57 PM2/28/20
to dhorf-hfre...@hashmail.org, qubes-users
Thank you for your very quick response.

The mobile phone is listed as two devices:

1)  sys-usb: sda - Disk ()

2)  sys-usb: 1-3 - ..._Mass_Storage_Device_...

I have tried to attach both - one at a time - in the following way.

I attached it by clicking on the device icon -> The device (mobile phone storage) -> The VM that I would like it to be attached to.

When attached, they both appear as such according to qvm-block and qvm-usb in dom0.

When I attached the second one, and execute lsusb in the VM terminal where it is attached to, it show up.

I don’t know how to check the attachment of the first device in the VM terminal.

In the file manager of the attached VM under /proc/partitions, I find a file that only displays partitions with xvd... I don’t know if the attached partitions is some of these.

No, I haven’t been able to locate the directory of the mobile phone in the file manager of the sys-usb VM either.

Any ideas on how to proceed... ?


dhorf-hfre...@hashmail.org

unread,
Feb 28, 2020, 4:40:05 PM2/28/20
to A E, qubes-users
On Fri, Feb 28, 2020 at 10:02:42PM +0100, A E wrote:

> Thank you for your very quick response.

and thanks for a good/comprehensive reply from you.


> The mobile phone is listed as two devices:
> 1) sys-usb: sda - Disk ()
> 2) sys-usb: 1-3 - ..._Mass_Storage_Device_...

this is normal. go with the first one.
thats the actual block device as used with qvm-block
(or upper half of the gui)


> In the file manager of the attached VM under /proc/partitions, I find a
> file that only displays partitions with xvd... I don’t know if the attached
> partitions is some of these.

qvm-block will tell you the name if the device is attached.
in general it will be xvdi for the first blockdevice.


> Any ideas on how to proceed... ?

my guess is just the "mounting it" part is missing.
try "sudo mount /dev/xvdi /mnt" in the vm.
then check the contents of /mnt.

not you also should "sudo unmount /mnt" in the vm and detach the device
though qvm-block (or gui) before unplugging the phone!

there are probably more clicky or even automatic ways to do this,
but i am not familiar with that kind of thing.



Steve Coleman

unread,
Feb 28, 2020, 4:47:53 PM2/28/20
to A E, dhorf-hfre...@hashmail.org, qubes-users
If using your file manager in the AppVM does not display the new
device you can always use qvm-block in dom0 to tell you where the
device is currently assigned, and under what name.
Once you have attached the device to your AppVM you can run qvm-block
in dom0 with no arguments and it will display the device name in the
results. You will see it as "frontend-dev=<your device name>" on that
line on the right. Probably "xvdi" or something close to that.

Then you can then use the mount command in the AppVM to mount the
device (e.g. "/dev/xvdi" ) wherever you like.

A E

unread,
Feb 29, 2020, 2:02:41 AM2/29/20
to Steve Coleman, dhorf-hfre...@hashmail.org, qubes-users
When I execute "sudo mount /dev/xvdi /mnt" in the terminal of the VM, I get this error: “mount: /dev/xvdi/mnt: can’t find in /etc/fstab.

And I get this with both devices.

dhorf-hfre...@hashmail.org

unread,
Feb 29, 2020, 5:36:05 AM2/29/20
to A E, qubes-users
On Sat, Feb 29, 2020 at 08:02:25AM +0100, A E wrote:
> When I execute "sudo mount /dev/xvdi /mnt" in the terminal of the VM, I get
> this error: “mount: /dev/xvdi/mnt: can’t find in /etc/fstab.

that error doesnt match the command. one of them must be incorrect.
if the error is real, it indicates you didnt put a space between
the device and the target path.
this part is "basic linux usage" btw, very much not qubes specific.
googling "how to mount a disk in linux" (or with the distro name
you are using instead of linux) might help.

check what xvd* device is actualy used by running "qvm-block" in dom0.
or "cat /proc/partitions" or "ls -l /dev/xvd*" in the target vm.
(hint: its not the xvda/b/c/d ones, those are the system "disks",
user attached devices should be xvdi, xvdj...)


> And I get this with both devices.

what "both devices"?


Reply all
Reply to author
Forward
0 new messages