My sys-usb VM shows up in Qubes Devices for connection to sata drives, etc (not something I do.) But when I plug in my android cellphone and highlight the phone in Qubes Devices, the sys-usb connection option disappears. Phone is in MTP protocol according to the phone. On two other phone connection threads from this forum the suggestion seems to be to connect the phone to the sys-usb VM. I can seemingly connect to a debian or fedora VM and the phone shows up in Files, but clicking there on the phone icon results in an eventual error msg about not being able to connect in MTP to the device. I can access the phone successfully in linux mint and have done so. But it would be nice to do this in Qubes. Thanks
Thanks but afraid that doesn’t seem to work on my system. The disp sys-usb closes as soon as I try to connect.
Are you saying that your sys-usb qube shuts down when you connect the phone to a USB port? It sounds very strange and should not happen. Any relevant logs?
What would be the relavent log(s) please?
I think sys-usb is “carrying” the phone. But I don’t know how to access the phone’s files.
Reboot into Qubes — Qubes Manager - sys-usb is running. It also controls my usb mouse and keyboard. So I manually made a sys-usb according to the Qubes docs, after originally installing Qubes.
Qubes Devices – sys-usb available for connection to everything, except for the red items at the bottom of list, (already connected I thought) and for which the android phone is listed in red. If I click on the phone, sys-usb disappears from the list of available attachment “connections”. However if I have an open Files vm option based on either debian or fedora vm , then I can seemingly attach the phone to that vm successfully from the Qubes Devices option. If I do so, then the phone seems to mount in that vm and it shows up in the list on the left of available files. Clicking on the phone entry though results in a delay and eventual message of unable to connect to mtp device (xxx, xxx). The phone itself, by the way, shows that it is connected to usb for file transfer.
From this point, I get back out and back to square one. Click on the Q icon top left of screen and the only sys-usb option available is disposable: sys-usb. I think in hindsight this was a non-starter, but I clicked – disposable: sys-usb – sys-usb Files and then message indicates a disposable vm is starting up. But after a delay it then shuts down according to next message. A check of Qubes Manager shows the only sys-usb qube to be running is sys-usb from which I don’t seem to be able to access the phone’s files and no disposable vm’s running.
I should also mention, that I’ve been trying to attach the phone to sys-usb to access files, as a last resort, after I think following all available suggestions in a couple of other android phone threads in the Qubes forum. The last option, which is quoted is the GitHub link and I’ve now ground to a halt.
Can you even launch anything else in that sys-usb vm and have it stay up for longer than few seconds (like a terminal)? After installing 4.04rc2 the only disp VM I can reliably use is whonix dvm. Both debian and fedora based dvms close for me pretty much immediately. I’m guessing it’s the same issue as here DisposableVM shuts down when a child window is closed even though original window is still open · Issue #6346 · QubesOS/qubes-issues · GitHub
That’s really weird with nautilus (i.e., “Files” from the menu) and windows closing immediately (just confirmed in Fedora 32, this happens even if you right-click and select “Open in Terminal”). One workaround is to start a dvm by running xterm (and then of course keep it open around until you are done). xterm is a good old-style application, so nothing crazy should happen to it.
Thanks 427F11FD0FAA4B080123. Maybe I’m way off base here. I’m trying to access my phone’s files in a disposable sys-usb vm, because according to qubes forum posts I’ve read, apparently some users have success using sys-usb to access their phone’s files. Any other vm I’ve tried seems to be able to link to the phone via Qubes Devices and the phone is visible in the files listing, but will not then open.
I can open any of these vm’s by right clicking on them in Qubes Manager, choosing “Run command in qube” and then entering xterm. But then I don’t seem to be able to access the phone in the xterm window.
If on the other hand if I click top left on the Qubes button, then in the opening menu list for the “disposable: sys-usb” option, any left or right click on any sub-option such as Files results in the disp vm opening and then shutting down after a bit, with no opportunity to make use of the vm. The xterm man pages don’t seem to spell out how I could open the disp vm, directly from the xterm window either from what I can gather.
I’m slightly confused about your exact configuration. Are you using a named disposable qube, say,
sys-usb or are you attaching the usb card to a disposable qube named as in
If the former: make sure your qube’s virtualization mode is hvm and it’s assigned a fixed amount of memory (i.e., it cannot change).
If the latter, then what I meant is to start the disposable vm by starting xterm (not starting it from xterm in dom0). The xterm is supposed to run in your disposable vm. Then if you want to use Nautilus (i.e. “Files”), just write
nautilus in this xterm. And don’t close this xterm until you are done. I hope this clarifies things.
(Finally, if you still can’t make it work, did you verify first that everything works in a non-disposable vm?)
Disposable qube → Disposable: sys-usb
It is hvm and it has a max size of 2048MiB
No it doesn’t work in a non-disposable vm. For instance if I use a Personal Debian or default Personal fedora-32 vm. I seemingly can attach the phone via usb to the vm. If I then start up Files from that vm’s submenu, I can see that the phone is supposedly mounted to that filesystem, but clicking on it to show the phone’s files, results in a spinning wheel for about 15 seconds and then the error message, stating the vm cannot connect to the mtp device.
You mean via
qvm-usb or via
qvm-pci. For the former, sadly lots of devices do not properly support it as far as I understand from reading this and other forums and from my personal experience (and this includes usb webcams, for instance). So the question is “does this work if you create a (non-disposable) vm, say,
personal-usb, based off fedora-32, and attach your usb controller to it (not just your phone)?” By “this”, I mean you start nautilus and try to access your phone’s content.
I hope this is clear. I think I could figure things out in a few seconds if I were in front of your computer, but somehow communicating via a forum is difficult. Do not hesitate to ask more questions!
Is this what you mean? → In my non-disposable fedora-32 vm (does the same in a non-disposable debian), in Qube Settings I have added Files (nautilus) via Applications from Available in the left window to Selected in the right hand window. This is how I was originally trying to access the phone. I would attach the phone via usb and Qubes Devices to this (running) vm and then try to access the phone through the Files (nautilus) window, when Files was opened. The phone would show up in the resultant left hand window along with Recent, Starred, Home, etc. Then clicking there on the phone entry would result in the spinning activity wheel and about fifteen seconds later there would be the unable-to-connect-to mtp-device error message.
I’m still not sure what exactly you mean by attaching via usb in Qubes terms. The way it should work is attaching the whole USB controller to your non-disposable vm. In Qube Settings for this vm, in the “Devices” tab, did you select the whole USB controller to which you are connecting your phone via cable? You should do that.
Other related things to consider just in case in the “Advanced” tab in the same Qube Settings:
increase “Initial memory” to say “1000MB” so Nautilus has enough memory
unselect “include in memory balancing”
“Mode” should be “HVM”
This is what the lower half of my Qubes Devices drop down menu looks like, with the samsung highlighted.
I’m afraid I don’t know, what you mean by attaching the whole usb controller to my non disposable vm.
I will try to resume my experience:
It is not possible to attach a android device via device-widget to some random VM. The problem seems to be common to some non block device usb devices like usb cameras, but I am not shure.
It is possible to access files in your android device if you use sys-usb directly, and open nautilus there, for example. Of course, that may not be a very good idea, because you can compromise the VM that way.
So, the solution is to make sys-USB disposable (read the docs), and that way you improve security.
Now, for every disposable VM, if you start it with gnome-terminal, it will shutdown almost imediatly. Solution: start it with the ugly xterm, or start it with eg. firefox and after that start gnome-terminal. As long as you keep firefox open the VM will stay on (there is a issue about this on github).
I’m explaing this in my previews post. Read it once again. Look at the “Devices” tab in the VM in which you want to access your phone.
The attaching a single USB device approach does not work with lots of phones. You have to attach the entire controller.
P.S. Thinking more about it (I don’t know your configuration), it will most likely be the easiest for you to access your phone in your
sys-usb. If you really don’t know what to do just run
qvm-run sys-usb nautilus in your dom0 terminal.
You can attach the whole usb controller to a certain VM as described here for PCI devices. Note that you cannot attach it to two running VMs at the same time. In the default configuration it is attached to sys-usb automatically.
Thanks friends. The last two posts finally made sense to my old brain. I’ll plug away at it and I’m pretty sure I’ll get it soon. cheers